![]() ![]() ![]() CREATE USER ' ' remote_server_ip' IDENTIFIED WITH mysql_native_password BY ' password'.If you plan to use this database with a PHP application - phpMyAdmin, for example - you may want to create a remote user that will authenticate with the older, though still secure, mysql_native_password plugin instead: However, there is a known issue with some versions of PHP that can cause problems with this plugin. Note: This command will create a user that authenticates with MySQL’s default authentication plugin, caching_sha2_password. ![]() CREATE USER ' ' remote_server_ip' IDENTIFIED BY ' password'.RENAME USER ' 'localhost' TO ' ' remote_server_ip' Īlternatively, you can create a new user account that will only connect from the remote host with the following command:.Run the following command, making sure to change sammy to the name of your MySQL user account and remote_server_ip to your remote server’s IP address: To change a user’s host, you can use MySQL’s RENAME USER command. If you’ve enabled password authentication for root, you will need to use the following command to access the MySQL shell instead: To do so, open up the MySQL client as your root MySQL user or with another privileged user account: If you have an existing MySQL user account which you plan to use to connect to the database from your remote host, you’ll need to reconfigure that account to connect from the remote server instead of localhost. Then restart the MySQL service to put the changes you made to mysqld.cnf into effect: After changing this line, save and close the file ( CTRL + X, Y, then ENTER if you edited it with nano). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |