Use Navicat for MySQL to connect to the MySQL service in the server

Source: Internet
Author: User

First step: Log in to the MySQL server and create a new user.

In the MySQL installation, the default root user, but the root user's default connection host is localhost or 127.0.0.1, which restricts the root user to use as a local connection.


Log in to MySQL service into the MySQL installation directory bin directory


View database show databases;

Select Database Use MySQL;


View current Database account information select User,host from user;

Users can only connect locally and require an external connection, creating a new database account with remote connection privileges:


Create a SOUVC user, and give permissions. Grant all privileges on * * to [email protected] '% ' identified by ' abc123 ' with GRANT option;

Grant is the authorization command, where SOUVC is the user name that we connect with, "Abc123″ is the connection password, and the"% "general character after the user name indicates that the host operation is allowed.


Refresh Database account permissions: flush Privileges;


After you refresh the permissions, Requery: select User,host from user;

Exit database command: quit;


To restart the MySQL database server : ./mysql--defaults-file=/home/chenzw/mysqldb/my.cnf-u root-p


Step two: Turn off the firewall

Log in to root user, since this version belongs to version 7 and above, you can turn off the firewall by using the following command


version 6:service    iptables  stop             Close firewall           

version systemctl   stop     firewalld.service   close
     systemctl  start    firewalld.service   open
     systemctl   disable  firewalld.service   permanently closed systemctl enable Firewalld.service will open every time you turn on

          

  connection Navicat for Mysql  

                                   

Use regular connection, establish connection name, hostname, port, username, password (all based on MySQL information set in Linux)





Use Navicat for MySQL to connect to the MySQL service in the server

Related Article

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.