User Management for mysql in Linux

Source: Internet
Author: User

The database part in the deployment system is mysql, which is used in linux.

In mysql, there is no password for Local root Login by default.

Execute a grant statement as follows:
Grant all on *. * to 'livesky 'IDENTIFIED by '20140901 ';

Explanation: Create a new user "livesky" and set the password to "123456". Grant all permissions to all tables in all databases to the user. The user can log on to any host, if you set the user to log on from the local device only, use the following statement:

Grant all on *. * to 'livesky @ localhost' IDENTIFIED by '123 ';

Set successfully. log on to another host and be notified every time "ERROR 1045 (28000): Access denied for user 'livesky '@ '192. 168.3.30 '(using password: YES) "is strange. the user name and password are correct. I don't understand.

Later, I asked the experts to say that after setting this item, I had to restart mysql to "service mysql restart"

After the restart, haha... OK.

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.