How can I log on to mysql after I add a common user? Today, the openstack folsom version is installed. After installing mysql and adding the corresponding database and user for each service, I find that
You cannot use the new user to log on to mysql. The method for adding a user is as follows: www.2cto.com 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 PRIV Ileges 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, but User Logon Failed: root @ controller :~ # Mysql-h localhost-ukeystone-ppasswordERROR 1045 (28000): Access denied for user 'keystone '@ 'localhost' (using password: YES) solution: After adding a common user, run mysql> use mysqlmysql> delete from user where user = ''; mysql> flush privileges; to delete anonymous users. OK, get it done, enjoy!