Navicat connection CENTOS7 MYSQL error in 2003 and 1130

One: solve 2003:

     Firewall issues, need to open the corresponding port (3306), or turn off the firewall;

    1. Open ports 3306: firewall-cmd --zone = public --add-port = 3306 / tcp --permanent then restart the firewall
               Command Meaning:
 
            --zone # Scope
 
            --add-port = 3306 / tcp # Add port, the format is: port / protocol
 
            --permanent # permanent, this parameter does not restart after failure
 
        Firewall simple command:
                Restart the firewall: Firewall-cmd --reload
                   Check firewall status: firewall-cmd --state
                Turn off the firewall: systemctl stop firewalld.service
                Turn on the firewall: systemctl start firewalld.service
                Prohibition boot start the firewall: systemctl disable firewalld.service

    2. Turn off the firewall: turn off the firewall: systemctl stop firewalld.service (temporarily closed)
                          Prohibition boot start the firewall: systemctl disable firewalld.service


II: 1130 to address:
    
    In the virtual machine to install mysql mysql account to log in, change the "mysql" database of "user" list item "host", the original "localhost" to "%";
   
    mysql -uroot -p password
    mysql>use mysql;
    mysql>update user set host = '%' where user = 'root';
    mysql>select host, user from user;
    mysql> flush privileges or mysql> service mysqld restart the above settings to take effect
Published 10 original articles · won praise 2 · Views 9263

Guess you like

Origin blog.csdn.net/VincentLee7/article/details/80320872