Linux system MySQL open remote connection

Source: Internet
Author: User

remotely connect to MySQL on the server.

Navicat Software Connection Database error: 2003-can ' t connect to MYSQL serve

Tools/Materials
    • CRT, Navicat, Linux system, MySQL.
Method/Step
  1. Connect the Linux system remotely to ensure that the Linux system is installed on the MySQL database. Log in to the database. Mysql-uroot-p (password).

  2. Create a user to connect remotely

    GRANT all privileges on * * to ' itoffice ' @ ' percent ' identified by ' Itoffice ' with GRANT OPTION;

    (The first itoffice represents the user name,% means that all computers can connect, you can set an IP address to run the connection, and the second itoffice represents a password).

  3. Execute flush privileges; command takes effect immediately

  4. The user who queried the database (see the following indicating that the creation of the new user succeeded)

    SELECT DISTINCT CONCAT (' User: ', user, ' @ ', host, '; ') as query from Mysql.user;

  5. Exit MySQL using the exit command

    Then open vim/etc/mysql/my.cnf.

    Will bind-address = 127.0.0.1

    Set to Bind-address = 0.0.0.0 (device address)

    Reboot (command below):

    /etc/init.d/mysql stop

    /etc/init.d/mysql start

  6. View Port Numbers

    Show global variables like ' port ';

  7. Sets the Navicat connection.

  8. Click Connect Test to see that the following indicates success.

    Http://jingyan.baidu.com/article/363872ec3263236e4ba16f07.html

Linux system MySQL open remote connection

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.