ERROR: database mysql is not available
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla |
Invalid
|
Critical
|
Unassigned |
Bug Description
following the below guide to start kolla , but I meet the error: database mysql is not available, so the keystone fail to start.
https:/
by debugging this issue, I find the root cause is that the compose_keystone_1 container cannot connect to compose_
[root@ ~]# mysql -h <IP> -uroot -pkolla
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'HOSTNAME' (using password: YES)
The code segment raising this error is here:
check_for_db() {
local database=
check_
mysql -h ${MARIADB_
-e "select 1" $database > /dev/null 2>&1 || {
echo "ERROR: database $database is not available @ $MARIADB_
return 1
}
echo "database is active @ ${MARIADB_
}
so I use the below steps to fix this issue manually:
1. delete from mysql.user where user='root' and host='<IP>';
2. delete from mysql.user where user='root' and host='';
3. flush privileges;
3. grant all privileges on *.* to 'root'@'<IP>' identified by 'kolla' with grant option;
description: | updated |
description: | updated |
Changed in kolla: | |
milestone: | liberty-2 → liberty-3 |
I'm not sure what the exact cause of this problem is, or why the suggested workaround works, but I have marked it critical for liberty-2 to fix, because it is a serious problem that seems to happen to me about 10% of the kolla start operations.