In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to solve the problem of not logging into MySQL database remotely". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Solution for not logging in to the MySQL database remotely:
Tried to log in to MySQL Server,Server with MySQL Adminstrator GUI Tool but replied with an error message: Host 60-24832-13.HINET-IP.hinet.net is not allowed to connect to this MySQL server
This is due to the problem of permissions, which is handled 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]: user code for remote login
[db_name]: indicates that the database to be opened to users is called
[password]: user password for remote login
[ipadd]: IP address or DNS Name after IP check. Enter 60-24832-13.HINET-IP.hinet.net in this example, and enclose quotation marks ()
(it is actually executed on the remote server, filling in the ip address of the local host.)
If you want to open all permissions, do the following:
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 for not logging in to the MySQL database remotely:
How to solve the client-server connection (mysql): xxx.xxx.xxx.xxx is not allowed to connect to this mysql serv
1. Enter mysql and create a new user xuys:
Format: grant permissions 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 results and execute:
Use mysql
Select host,user,password from user
You can see that you already have the xuys user you just created in the user table. The host field indicates the host logged in, and its value can be either IP or hostname
Changing the value of the host field to% means that you can log in to the mysql server as a xuys user on any client machine, and it is recommended to set it to% at development time.
3. / mysqld_safe-user-root &
Remember: any changes to the authorization table require re-reload, that is, step 3.
If you cannot connect from the client after the above three 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)
Update db set host =% where user = xuys
Repeat steps 2 and 3 above.
Solution 3 for not logging in to the MySQL database remotely:
How to attach fbysss to solve the problem of connecting remote users with MyAdmin:
1. Log in to the remote Mysql server with a root account
Grant select,update,insert,delete on *. * to sss@192.168.0.114identified by "sss"
Update user set host =% where user = sss
Exit, execute under shell
# mysqladmin-u root-p [password] reload
# mysqladmin-u root-p [password] shutdown
# / etc/rc.d/init.d/mysqld start
two。 Modify the config.inc.php file in the phpMyAdmin directory and find the
$cfg [Servers] [$I] [host] is modified to a remote server address
$cfg [Servers] [$I] [user] is modified to sss
$cfg [Servers] [$I] [password] changed to the password of sss
It should be noted that: grant all privilege can not assign "grant" permissions to users, if you want to add, you can directly use use mysql; update user set Grant_priv = Y in mysql to achieve the requirements.
This is the end of the content of "how to solve the problem of unable to log in to the MySQL database remotely". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.