Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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 (

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.

share|improve this answer
Actualy, I'm not on the same LAN, I'm connecting to my VPS in a galaxy far far away ... IPTables is off – Jakub Arnold Oct 15 '09 at 18:46

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:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.