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 have a question about mysql settings now i want to figure out why i cannot connect.

I made sure bind-address was commented out. I can ping the server within the VM but i cannot ping it from within the VM using mysqladmin --protocol=tcp --host=self_ip ping. I also followed along and check if my ports were open and they look like they are. I setup samba on that VM and can access that with no problem as well. It looks like ubuntu does not have a firewall either (i figured this out before) so i am stumped why the server isnt allowing my connection.

Apparently the config file works on another person side

I am using Ubuntu 6.06 LTS just because of 'support' reasons. So hopefully this will be 'easy'?

share|improve this question
i often forget to accept but i dont think that matters. Also many of my questions are wiki so i dont feel its right to accept. Anyways i looked at /var/log/ mysql .err and .log and both are empty – acidzombie24 Dec 15 '09 at 1:47
Run sudo mysqld by hand: you'll see the errors :) – kolypto Dec 15 '09 at 9:18

My guess is it's the last step from the linked question:

If logins are working on the machine, but permission is being denied remote machines, remember that MySQL performs access control using username, password and hostname (with wildcards permitted). You may need to adjust your grant tables.

Try logging into MySQL as root on the MySQL server and running:

# grant all on [database name].* to '[user name]'@'[remote client hostname or IP address]' identified by '[password]'

You might want to reduce the "all" permission to something more restrictive, depending on your access requirements.

share|improve this answer

Hmm. When you use --host=self_ip Do you mean --host= or --host=192.168.NNN.NNN or do you mean literally --host='self_ip' ?

Because --host=self_ip literally typed may mean to actually call up a host on the network whose name is "self_ip"

Could that be it?

share|improve this answer

First locally establish: Is mysql running at all (ps aux | grep mysql)?

Is mysql listening on any ports (netstat -ln | grep mysql)?

Can you connect to it?

(If you can't follow the procedure for resetting the root password here (stop mysql, start from command line with skip-grant-tables. Also, a nice link for Can't connect to [local] MySQL server straight from the ref manual.).

If it works on local then you problem is VM related.

Which VM is it? What kind of networking you use (bridged or NAT)?

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.