Mariadb 10 cluster access denied for user 'root'@'localhost'

Bug #1680850 reported by Jack Ivanov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Expired
Undecided
Unassigned

Bug Description

Hello!

I can not create a cluster based on Mariadb 10.

Environment:
Guest - Ubuntu 16.04, mariadb-server-10.0, trove-guestagent 6.0.0
Host - trove 6.0.0

How to reproduce:

build an image with mariadb-server-10 and trove-guestagent

try to run a cluster: trove cluster-create mariadb_cluster mariadb "10" --instance flavor=6,volume=2 --instance flavor=6,volume=2 --instance flavor=6,volume=2

check the guest-agent log:
http://paste.openstack.org/show/605725/

In short: the guestagent fails because - "Access denied for user 'root'@'localhost'"

There is no password for the root user at all and I'm able to use it from the console.

Thanks!

Jack Ivanov (gunph1ld)
summary: - Mariadb 10 cluster ccess denied for user 'root'@'localhost'
+ Mariadb 10 cluster access denied for user 'root'@'localhost'
Revision history for this message
Jack Ivanov (gunph1ld) wrote :

I found this: CONNECTION_STR_FORMAT = "mysql+pymysql://%s:%s@127.0.0.1:3306"
Why all the parameters are hardcoded? We need to avoid that

You must consider that TCP/127.0.0.1 is not working in mariadb 10 by default due to the unix_socket plugin:
# mysql -e 'SELECT User, Host, plugin FROM mysql.user;'
+------+-----------+-------------+
| User | Host | plugin |
+------+-----------+-------------+
| root | localhost | unix_socket |
+------+-----------+-------------+

# mysql -uroot -hlocalhost -e '\q'
# mysql -uroot -h127.0.0.1 -e '\q'
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

Here is the workaround:
mysql -uroot -hlocalhost -e "UPDATE mysql.user SET plugin='mysql_native_password' WHERE User='root'; FLUSH PRIVILEGES;"

Amrith Kumar (amrith)
Changed in trove:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack DBaaS (Trove) because there has been no activity for 60 days.]

Changed in trove:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.