mysql增長新用戶沒法上岸處理辦法。本站提示廣大學習愛好者:(mysql增長新用戶沒法上岸處理辦法)文章只能為提供參考,不一定能成為您想要的結果。以下是mysql增長新用戶沒法上岸處理辦法正文
明天裝置openstack folsom版本,裝置完mysql,為各個辦事增長對應的數據庫和用戶後,發明
沒法應用新增的用戶上岸mysql。我增長用戶的辦法以下:
mysql -uroot -p$MYSQL_PASS <<EOF
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY '$MYSQL_PASS';
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY '$MYSQL_PASS';
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%'IDENTIFIED BY '$MYSQL_PASS';
CREATE DATABASE cinder;
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%'IDENTIFIED BY '$MYSQL_PASS';
CREATE DATABASE quantum;
GRANT ALL PRIVILEGES ON quantum.* TO 'quantum'@'%'IDENTIFIED BY '$MYSQL_PASS';
FLUSH PRIVILEGES;
EOF
但應用用戶上岸掉敗:
root@controller:~# mysql -h localhost -ukeystone -ppassword
ERROR 1045 (28000): Access denied for user 'keystone'@'localhost' (using password: YES)
處理辦法:
增長通俗用戶後,履行:
mysql> use mysql
mysql> delete from user where user='';
mysql> flush privileges;
意思是刪除匿名用戶。
OK,弄定,enjoy!