如何在mysql中创建用户并分配密码

时间:2015-12-13 14:27:01

标签: mysql

以下是怎么回事?为什么mysql不让我进去?我正在使用5.6

root@ip-10-93-145-98:/home/ubuntu# echo "grant all privileges on *.* to 'really'@'%' identified by 'stupid';" | mysql -u root -ptest101
Warning: Using a password on the command line interface can be insecure.
root@ip-10-93-145-98:/home/ubuntu# mysql -u really -pstupid
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'really'@'localhost' (using password: YES)

1 个答案:

答案 0 :(得分:0)

FLUSH PRIVILEGES之后运行GRANT ..。 之后尝试再次登录。