MySQL: Allow Remote connect to MySQL from any host

person Jason Huangfolder_openHOW-TO, MySQL, Ubuntulocal_offer, , , , , access_time February 23, 2017

By default, you’re not allowed to connect to your MySQL database from other machine.

To enabled that, you first need to set a password to root user in your MySQL Database:

mysqladmin -u root password 'password'

To login to MySQL, use

mysql -u root -p

Once you login to your MySQL, use the following command in MySQL:

GRANT ALL on *.* to 'username'@'localhost' identified by 'password';

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>