MySQL database remote connection Configuration

Source: Internet
Author: User


Follow these steps to avoid any problems. Step 1: GRANT the remote ip access permission grant all on test. * TO zhc @ '2017. 168.0.103 'identified BY 'Password'; test is the database name, zhc is the new user name you want to remotely access, without quotation marks. PASSWORD is the PASSWORD you want to set, the IP address must be enclosed in quotation marks. Www.2cto.com if all the ip addresses can log on with zhc, % indicates all ip addresses. Grant all on test. * TO zhc @ '%' identified by 'Password'; if you encounter access denied in this step, use the highest-privilege user or perform the new step in local access. Step 2: Activate the network settings in the mysql installation directory. You need to edit the mysql configuration file my. cnf and the my. ini configuration file in Windows. 1. Make sure that the skip-networking does not appear in this configuration file. Otherwise, the access from TCP/IP is not supported. 2. add bind-address = 192.168.0.185 to replace 192.168.0.185 with your server address. if you have modified this step, do not use localhost to connect to it during logon and use your own IP address. Step 3: restart the mysql server Windows to go to the control panel management tool and restart the mysql service. Step 4 of www.2cto.com, start the Remote Test and execute mysql-h 192.168.0.67-u zhang-p on another server. If not, let's see what the problem is. If the root cannot be connected to the local machine, the root user is not authorized to log on remotely. You can remove the bind-address in the configuration file, save it, and restart mysql, use root to log on locally, authorize yourself, and then try again. Author: hongchangfirst

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.