Remote connection to MySQL under Windows

Source: Internet
Author: User

  1. Use the CTRL + R key combination to quickly open the cmd window and enter the cmd command to open the cmd window.

  2. Use the "mysql-uroot-proot" command to connect to the local MySQL service.

  3. Using the "Use MySQL" command, select the database you want to use, modify the basic information of the remote connection, save it in the MySQL database, and use the MySQL database.

  4. Use "grant all privileges on * * to ' root ' @ '% ' identified by ' root ' with Grant OPTION;" command to change the settings for a remote connection.

  5. Use "flush privileges;" command to refresh the permission that you just modified to take effect.

  6. Use "select Host,user from User;" See if the changes were successful.

    Firewall organization Access when resolving remote connections: xp/2003 Adding firewall exception ports
    Open firewall, select the Exceptions tab, add ports
    Name: Mysqlport
    Port number: 3306
    Select TCP


    Win7 and above add firewall exception ports: Control Panel-Firewall Settings-Advanced settings
    Inbound rule Settings
    The first step is to select the inbound rule and then create a new rule, select the port, and then next
    The second step is to select TCP to select a specific port and then enter the port, where multiple ports need to be separated by commas for example: 3306
    Step three select Allow connection
    Fourth Step Select configuration file
    Fifth Step enter the rule name Mysqlport


    Outbound Rule Settings
    The first step is to select the outbound rule, then create a new rule, select the port, and then next
    The second step is to select TCP to select a specific port and then enter the port, where multiple ports need to be separated by commas for example: 3306
    Step three select Allow connection
    Fourth Step Select configuration file
    Fifth Step enter the rule name Mysqlport (or no special requirements to directly turn off the firewall) Reprint Please specify the Source: http://www.cnblogs.com/fnlingnzb-learner/p/5848405.html

Remote connection to MySQL under Windows

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.