This forum is no longer active. Please post your questions to our new community site

MySQL client access from other machines

Subscribe to MySQL client access from other machines 5 post(s), 2 voice(s)

Avatar mmwnins 3 post(s)

In the LAMP stack, I’ve been able to access MySQL from the phpMyAdmin console and even add a user. On another machine, when I try to connect using a client application (MySql Administrator or TOAD for MySql) and my new user account, access is denied.

I’m assuming the mysqld process is binding to the local machine only and won’t accept outside connections. How can I modify this to access MySql from another machine?

Avatar Beltrán Rueda Administrator 3,714 post(s)


You can access from a remote machine if you give privileges to the user to access from a remote machine.

1. Login in the mysql database in the same machine:

$ cd /mysql/bin
$ ./mysql -u root -p

2. Change the privileges:

mysql> grant all privileges on *.* to 'root'@'%' identified by 'root_password';
mysql> flush privileges;

If you use “%” you are giving access from all machines or you can specify an IP address.

I hope it helps.

Avatar mmwnins 3 post(s)

No luck with the grant commands. The commands are accepted but I still can’t access the database from a remote client.

I am using bitnami-lampstack-1.2-0-opensuse-11.1

I can access the server welcome page, access the phpMyAdmin page and administer everything in the database.

This leads me to believe that MySQL is bound to the localhost and won’t accept outside connections. Elsewhere I’ve read that removing the bind-addresses line from my.cnf solves this problem, but this setup does not use that approach. Otherwise, perhaps port 3306 is being blocked?

Avatar Beltrán Rueda Administrator 3,714 post(s)


If you are using the Virtual Machine you need to open the 3306 port in the firewall. Take a look this article In the “How to configure the firewall” section you can find how to configure it.

Avatar mmwnins 3 post(s)

As I suspected, port 3306 is closed. Definitely worth reading (and re-reading!) the FAQ.

Three things are required to access with a client like MySQL Administrator:
1) Open port 3306 (as described in the FAQ).
2) From the mysql prompt, add your user to the user table with CREATE USER ’user’@’%’ IDENTIFIED BY ‘password’ (where % means any host, or use a specific host or IP you want to restrict to).
3) From the mysql prompt, grant access on whatever objects you wish to this newly created user.