input license here

Instructions for configuring remote access MySQL 8


If you are in need of remote access to mysql 8 remotely, you can follow the following instructions:


Change MySQL Configuration


By default MySQL will disable the remote feature, you need to enable it by opening the MySQL configuration file and adjusting the following:


vi /etc/my.cnf


Change the following line


bind-address = 127.0.0.1


skip-networking


Wall




Restart MySQL


service mysql restart


Decentralize remote access MySQL


By default, MySQL is only authorized to access from local, so you need to update a few more steps to be able to connect from the outside:


MySQL Login


mysql -u root -p


Starting with MySQL 8, you can no longer (implicitly) create users with the GRANT command. Use CREATE USER instead, followed by a GRANT statement:


Run the command below to allow root user access from all machines


CREATE USER 'root'@'%' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;


In case you only want to allow access from IP, you can change % to IP, can be run multiple times to allow access from multiple IPs for example under allow IP 1.2.3.4


GRANT ALL PRIVILEGES ON *.* TO 'root'@'1.2.3.4' WITH GRANT OPTION;


In some cases, low client access may cause errors:


Client does not support authentication protocol requested by server; consider upgrading MySQL client


to fix run the following command


ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'PASSWORD';


FLUSH PRIVILEGES;


Thank you customer


Related Posts
Diệp Quân
Nguyen Manh Cuong is the author and founder of the vmwareplayerfree blog. With over 14 years of experience in Online Marketing, he now runs a number of successful websites, and occasionally shares his experience & knowledge on this blog.
SHARE

Related Posts

Subscribe to get free updates

Post a Comment

Sticky