FAQs about MySQL

Source: Internet
Author: User

FAQs about MySQL
Problem 1: the user cannot log on after the user is created on the local machine.
Problem description:
Create a database using root, and specify the user name that the database is allowed to access.

Mysql> create database keystone; mysql> grant all privileges on keystone. * TO 'keystone '@' % 'identified by '000000'; mysql> flush privileges;


Check whether the user can access mysql normally
# Mysql-u keystone-p123456-D keystoneERROR 1045 (28000): Access denied for user 'keystone '@ 'localhost' (using password: YES)


Solution: analyze the authorization statement. All permissions are granted to the user 'keystone '@' % ', and % indicates that access from any IP address is allowed, however, the 'localhost' cannot be parsed '. If you log on to mysql locally on the server, the above error will pop up, 'keystone '@ 'localhost'. The solution is as follows:
Mysql> grant all privileges on keystone. * TO 'keystone '@ 'localhost' identified by '123 ';


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.