How to Enable Remote Connections for MySQL Database

Log into mysql  

mysql -u root  -p123456

After logging into MySQL, execute the following commands one by one:
 
MySQL>use mysql;
 
MySQL>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION ;
 
MySQL>FLUSH PRIVILEGES;

Leave a Comment

Your email address will not be published.