It looks like the access model for MySQL has changed between F17 and F18.
openstack-db fails with a permission on the root user. However, the following works:
- As the keystone user (I suspect the openstack-db call made the keystone user, or maybe that is done by the RPM install?)
- run mysql, (no params, using the default identification, which I assume is PAM based?)
- create a user named keystone.
- and grant that user perms to create a db.
su - keystone mysql
create user 'keystone'@'localhost' identified by 'keystone'; grant all PRIVILEGES on *.* to 'keystone'@'localhost';
exit mysql and log in as that user:
mysql --user=keystone --password=keystone
Create the keystone database:
create database keystone;
Log out and run the dbsync
keystone-manage db_sync
Obviously, this leaves the DB User with too many permissions, but it is a start.
If I now try to run the command
openstack-db --service glance --init Please enter the password for the 'root' MySQL user:
Even setting the password in MySQL doesn’t work
UPDATE mysql.user SET Password=PASSWORD('keystone') WHERE User='root' AND Host='localhost';
[root@f18-keystone mysql]# openstack-db --service glance --init Please enter the password for the 'root' MySQL user: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) Failed to connect to the MySQL server. Please check your root user credentials.
I tried it with the unix password as well.
Note that I can connect using the following SQL Alchemy URL:
connection = mysql://keystone:keystone@localhost/keystone?unix_socket=/var/lib/mysql/mysql.sock
I think this is preferable to exposing TCP sockets around in the case that the Keystone server and MySQL server are co-located.
thx a lot! it helps 🙂 I was trying to solve this things for an week… as I’ve been studying connecting MySQL(Maria DB) to PHP5 on my Fedora 19, but it keeps telling me that there’s a permission error…. and other materials on internet were for antique… so I’ve been doing that again and again… that was not working, still! but it did, and I can be able to… finally… do SQL on PHP5… geeee lol