1. Link remote Linux server
2. Then enter ->
mysql -u root -p
Enter appear Enter password: Then we enter the root password into the carriage again
3. Switch to mysql database ->
use mysql
4. look at the existing user permissions and connection ->
select user, password, host from user;
5. Add a root user password temporarily empty, to allow access to any Ip '%' ->
GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘’ WITH GRANT OPTION;
Add a password can also be added directly to the root user ->
GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘123456’ WITH GRANT OPTION;
6. modify the root password ->
update user set password=PASSWORD(‘123456’) where user=‘root’;
7. The refresh of the permissions mysql ->
flush privileges;