Mysql settings for Remote Accessing

less than 1 minute read

mysql -u root mysql> SET PASSWORD FOR 'ROOT'@'LOCALHOST" > = PASSWORD('new_password');

Now while we’re still here, we’ll create a new HOST for root and allow root to login from anywhere.

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' > IDENTIFIED BY 'password' WITH GRANT OPTION; mysql> FLUSH PRIVILEGES; mysql> exit