Mobile app version of vmapp.org
Login or Join
Ann8826881

: Ubuntu server MySQL remote access from MySQL Workbench 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

@Ann8826881

Posted in: #Mysql

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'@'%'
IDENTIFIED BY 'P@ssw0rd' WITH GRANT OPTION;
FLUSH PRIVILEGES;
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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Ann8826881

1 Comments

Sorted by latest first Latest Oldest Best

 

@Alves908

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.
www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html stackoverflow.com/questions/15663001/remote-connections-mysql-ubuntu
[Update]

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: www.mysql.com/products/workbench/
Let us know if this helps.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme