Several solutions to remote login to MySQL

Source: Internet
Author: User

Method One:

Try MySQL adminstrator GUI tool login to MySQL server,server but reply error message: Host ' 60-248-32-13.hinet-ip.hinet.net ' is not allowed to Connect to this

MySQL Server

This is because of the permissions of the problem, the processing method is as follows:

Shell>mysql--user=root-p

Enter password

Mysql>use MySQL

Mysql>grant select,insert,update,delete on [db_name].* to [Username]@[ipadd] identified by ' [Password] ';

[Username]: Remote login user code

[db_name]: A database that is intended to be open to users

[Password]: remote login user Password

[Ipadd]:ip address or IP back-check DNS Name, the contents of this case should be filled in ' 60-248-32-13. Hinet-ip.hinet.net ', Enclosed letter quotes (')

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

If you want to open all permissions, do so:

The following are the referenced contents:

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] ';

Method Two:

How to troubleshoot client to server-side connection (MySQL): xxx.xxx.xxx.xxx is isn't allowed to connect to this MySQL serv

1, enter MySQL, 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.234 identified by "xuys1234";

View the results and execute:

Use MySQL;

Select Host,user,password from user;

You can see that the Xuys user that you just created is already in the user table. The Host field indicates which hosts are logged on, their values can be IP, and host names are available.

Changing the value of the host field to% indicates that the Xuys user can log on to the MySQL server on any client machine, and it is recommended that you set it to% at development time.

3./mysqld_safe--user-root &

Remember: Any changes to the authorization table need to be reload, that is, step 3rd.

If you cannot connect from the client through the above 3 steps, insert a record in the DB table of the MySQL database by doing the following:

Use MySQL;

INSERT into DB values (' 192.168.88.234 ', '% ', ' xuys ', ' y ', ' y ', ' y ', ' y ', ' y ' ', ' y ', ' y ', ' y ', ' y ', ' y ', ' y-axis ', ' y ', ' y ';

Update db Set host = '% ' where user = ' Xuys ';

Repeat the 2nd and 3 steps above.

Method Three:

Additional fbysss resolves phpMyAdmin connection to remote users:

1, with the root account login remote MySQL server,

Grant Select,update,insert,delete on *.* to sss@192.168.0.114 identified by "SSS";

Update user Set host = '% ' where user = ' SSS ';

Exit MySQL, execute under shell

#MySQLadmin-u root-p [Password] Reload

#MySQLadmin-u root-p [password] shutdown

#/etc/rc.d/init.d/mysqld start

2, modify the phpMyAdmin directory of Config.inc.PHP files, find

$cfg [' Servers '] [$i] [' Host '] modified to a remote server address

$cfg [' Servers '] [$i] [' User '] modified to SSS

$cfg [' Servers '] [$i] [' Password '] modified to SSS password

Note that the grant all privilege cannot assign permissions to "grant" to the user, and if so, you can use Mysql;update user set grant_priv = ' Y ' directly in MySQL to achieve the requirement.



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.