0

I've commented out the bind-address line in my /etc/mysql/my.cnf

When I do nmap localhost, I see that mysql is correctly listening on 3306, but when I try to connect, I get error 1045.

Do I have to somehow specify whitelist of allowed ips (I've seen this on some shared hosts), or is it possible to allow access from any ip?

I'm using Ubuntu 9.04 x64.

Jakub Arnold
  • 1,674
  • 10
  • 25
  • 33

2 Answers2

2

Use a wildcard grant in MySQL to connect from a known range.

Darth, I'm assuming you're on the same LAN as your database and are trying to connect from a remote host AND!!! IPTables is either off or configured to allow 3306. You can grant that specific IP permission, or you can grant a subnet permission.

Granting a specific IP to your server LAN (10.1.1.0/24):

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE 
ON mydatabase.* 
TO 'myappuser'@'10.1.1.%'
IDENTIFIED BY 'mypassword';

To be clear, using a wildcard is not the best practice, but may be safe depending on your situation. Just be a diligent DBA and monitor the traffic to make sure this configuration is not a threat to your data.

randomx
  • 1,004
  • 1
  • 8
  • 14
0

The old MySQL Query Browser and MySQL Administrator have been replaced by MySQL Workbench.

MySQL Workbench includes: - Model (replacing DBDesigner) - Query (replacing MySQL Query Browser) - Admin (replacing MySQL Administrator) - SSH-Tunnel (Remote Admin)

MySQL Workbench discussions:
- http://forums.mysql.com/index.php?151