Rumah >pangkalan data >tutorial mysql >MySQL常见问题解决办法整理_MySQL
bitsCN.com
MySQL常见问题解决办法整理
问题一:本机创建用户后,该用户无法登录。
问题描述:
通过root创建一个数据库,然后指定该数据库允许访问的用户名
mysql> CREATE DATABASE keystone;mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY '123456'; mysql> FLUSH PRIVILEGES;
# mysql -u keystone -p123456 -D keystoneERROR 1045 (28000): Access denied for user 'keystone'@'localhost' (using password: YES)
mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY '123456';