Deploy the MySQL environment locally (192.168.1.152), authorize the remote client 192.168.1.% to connect to the local MySQL, and open port 3306 in the iptables firewall. as follows: mysql> select host,user,password from mysql.user; question: Remotely connect to mysql on the 192.168.1.152 machine above on the client (for example, 192.168.1.20), the connection fails! [root@huanqiu ~]# mysql -udb_ro_hqsb -h 192.168.1.152 -pmhxzkhl0802xqsjdb ERROR 1130 (HY000): Host '192.168.1.20' is not allowed to connect to this MySQL server solve: This is caused by the statement "host is localhost, user and password are empty" in the mysql of 192.168.1.152. Deleting this statement can solve the problem! mysql> delete from mysql.user where host="localhost" and user=""; In this way, the client computer authorized to connect can successfully connect! [root@huanqiu ~]# mysql -uxqsj_db_ro_user -h 192.168.1.152 -pmhxzkhl0802xqsjdb Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 28 Server version: 5.1.73 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> The above article perfectly solves the problem of connection failure after MySQL client authorization. This is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Native JavaScript to achieve skinning
>>: VMware vSphere 6.7 (ESXI 6.7) graphic installation steps
Preface JavaScript is one of the widely used lang...
The Nginx ngx_http_image_filter_module module (ng...
1. Download address https://dev.mysql.com/downloa...
Table of contents Application scenarios: Method 1...
First, download the diagram 1. First uninstall th...
Table of contents 1. What is Set 2. Set Construct...
Table of contents Solution, Summarize: vue projec...
1. Problem Forgot password for mysql5.7 under lin...
HTML page jump: window.open(url, "", &q...
A Docker container starts a single process when i...
This article shares the specific code of jquery t...
Table of contents 1 Use of v-if and v-show 2. Dif...
The vue part is as follows: <template> <...
Preface Recently, I encountered a requirement at ...