I have a newly install Ubuntu installed the MySQL server.

After the basic config:

  • I changed the my.cnf file and commented out the bind_address
  • I can start the server and added iptable for 3306.
  • I also added the privileges to MySQL server as follow:
    • GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
    • exit

However, after I connected from the MySQL workbench, it shows no database. But it seems that have login.

Anyone have faced that or can help me?

closed as off-topic by Stephen Ostermiller Sep 2 '14 at 10:21

  • This question does not appear to be about webmastering within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.


I did a quick search and found these two answers that may help. They seem complete to me where much of the other information I found was too fragmented and incomplete. I like the first link best.




Here is a run-down:

Log-on using your favorite SSH terminal.

Edit /etc/mysql/my.cnf (may be /etc/my.cnf) with your favorite editor (vi or pico are most popular).

Find the section marked as [mysqld].

Add or modify the line: bind-address=*YOUR-SERVER-IP* where YOUR-SERVER-IP is your public IP address.

Restart MySql: /etc/init.d/mysql restart

If your MySql user does not exist:

CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypass';
CREATE USER 'myuser'@'%' IDENTIFIED BY 'mypass';

... where myuser is your desired username and mypass your desired password...

GRANT ALL ON *.* TO 'myuser'@'localhost';
GRANT ALL ON *.* TO 'myuser'@'%';

... to grant privileges to the user.

If your user already exists, then just issue the GRANT statements.

I use MySql Workbench which can make this process point and click. You can find it here for free: http://www.mysql.com/products/workbench/

Let us know if this helps.

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