"MySQL" setting allows users to Telnet

Source: Internet
Author: User

Yesterday the basic system was deployed on the server, everything is OK .


However, the developer to remote access to the MySQL database on the server, found that root remote connection is not, prompting the error :"1045-access denied for user [email protected] ... "


The workaround is as follows, execute the command:


mysql> use MySQL;

Mysql> selecthost,user from user;

view result is not root user only allow local (localhost) login , Here's the situation . .

Yes, , It's going to be modified. Host to be %, represents any IP address can be logged in .



mysql> Update user set host = '% ' where user = ' Root ';

may prompt when finished executing error. then mysql> select Host,user from user; check it out. .

Root corresponding to the Host Become a %, indicates that you can arbitrarily IP address is logged in. .




Mysql> flushprivileges;

flush out the cache . . after modifying a user record with the UPDATE statement, the FLUSH statement is required to tell the server to overload the authorization table .


"MySQL" setting allows users to Telnet

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.