Frequent errors during Remote logon to the MySQL database

Source: Internet
Author: User
The following articles mainly describe the detailed analysis and specific solutions for frequent errors when logging on to the MySQL database remotely (you cannot log on to the MySQL database remotely ), the following is a solution for failing to remotely log on to the MySQL database during actual operations: Try to use MySQLAdminstratorGUITool to log on to MySQLServer, but the Server

The following articles mainly describe the detailed analysis and specific solutions for frequent errors when logging on to the MySQL database remotely (you cannot log on to the MySQL database remotely ), the following is a solution for failing to remotely log on to the MySQL database during actual operations: Try to use the MySQL Adminstrator GUI Tool to log on to the MySQL Server, but the Server

The following articles mainly describe the detailed analysis and specific solutions for frequent errors when logging on to the MySQL database remotely (you cannot log on to the MySQL database remotely ), the following is a solution to remote login to the MySQL database during actual operations:

Log on to the MySQL Server using the MySQL Adminstrator GUI Tool, but the Server returns the error message:

Host '60 -248-32-13.HINET-IP.hinet.net 'is not allowed to connect to this MySQL server

This is because of permission issues. The solution is as follows:

Shell> mysql-user = root-p

Enter Password

 
 
  1. mysql>use mysql
  2. mysql>GRANT SELECT,INSERT,UPDATE,DELETE ON [db_name].* TO [username]@[ipadd] identified by ‘[password]‘;

[Username]: User code for remote login

[Db_name]: indicates the name of the database to be opened to the user.

[Password]: User password for remote login

[Ipadd]: The DNS Name after IP address or IP address reverse lookup. In this example, enter '60-248-32-13.hinet-ip.hinet.net '. Enclose the quotation marks (')

(In fact, it is executed on the remote server. Fill in the IP address of the local host .)

If you want to open all permissions, execute:

 
 
  1. mysql>update user set select_priv=’Y’ , Insert_priv=’Y', Update_priv=’Y',
    delete_priv=’Y', Create_priv=’Y', Drop_priv=’Y',Reload_priv=’Y',
    shutdown_priv=’Y', Process_priv=’Y', File_priv=’Y', Grant_priv=’Y',
    references_priv=’Y',Index_priv=’Y', Alter_priv=’Y', Show_db_priv=’Y',
    Super_priv=’Y',Create_tmp_table_priv=’Y',Lock_tables_priv=’Y',
    Execute_priv=’Y',Repl_slave_priv=’Y',Repl_client_priv=’Y’ where user=’[username]‘;

Solution 2:

How to solve the connection between the client and the server (mysql): xxx. xxx is not allowed to connect to this mysql serv

1. Go to mysql and create a new user, xuys:

Format: grant permission on database name. Table name user @ login host identified by "User Password ";

Grant select, update, insert, delete on *. * to xuys@192.168.88.234identified by "xuys1234 ″;

View the result and execute:

 
 
  1. use mysql;
  2. select host,user,password from user;

You can see that the created xuys user already exists in the user table. The host field indicates the host to log on to. The value can be an IP address or a host name,

Changing the value of the host field to % indicates that you can log on to the mysql server as an xuys user on any client machine. We recommend that you set the value to % during development.

3../mysqld_safe-user-root &

Remember: Any modification to the authorization table must be reload again, that is, step 1.

If you still cannot connect from the client after the above three steps, perform the following operations to insert a record in the db table of the mysql database:

 
 
  1. use mysql;
  2. insert into db values(‘192.168.88.234′,’%',’xuys’,'Y’,'Y’,'Y’,'Y’,'Y’,'Y’,'Y’,'Y’,'Y’,'Y’,'Y’,'Y’);
  3. update db set host = ‘%’ where user = ‘xuys’;

Repeat steps 2nd and 3 above.

Solution 3:

Add fbysss to connect phpMyAdmin to a remote user:

1. log on to the remote Mysql server with the root account,

 
 
  1. grant select,update,insert,delete on *.* to sss@192.168.0.114identified by “sss”;
  2. update user set host = ‘%’ where user = ’sss’;

Exit mysql and run the command in shell.

 
 
  1. #mysqladmin -u root -p [password] reload
  2. #mysqladmin -u root -p [password] shutdown
  3. #/etc/rc.d/init.d/mysqld start

2. Modify the config. inc. php file in the phpMyAdmin directory and find

$ Cfg ['servers'] [$ I] ['host'] to the remote server address

$ Cfg ['servers'] [$ I] ['user'] To sss

$ Cfg ['servers'] [$ I] ['Password'] change to sss password

Note that grant all privilege cannot grant the "grant" permission to the user. To add the permission, you can directly use mysql In the mysql database; update user set Grant_priv = 'y' to meet the requirements.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.