[MDEV-19290] mariabackup password with characters @#$ fails to connect Created: 2019-04-19  Updated: 2020-09-23  Resolved: 2020-09-23

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System, mariabackup
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Hendrey Chikane Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: None
Environment:

MariaDB 10.2.22 on Ubuntu // MariaDB 10.5.4 on RHEL



 Description   

Fail to connect when using complex password: Maria@#$backup202 but works with a simple password: mypassword

Also fails to connect with root account which has all privileges, however, mysql -u mariabackup -p does connect.

Failed to connect to MySQL server: Access denied for user 'mariabackup'@'localhost' (using password: YES)



 Comments   
Comment by Elena Stepanova [ 2019-04-28 ]

Please specify the version and the error that you are getting while trying to connect as root (the last line in your description is not that, it's connect as mariabackup user).

Comment by Sylvain ARBAUDIE [ 2020-09-18 ]

i reproduced the bug on MariaDB galera 10.2.22 and on 10.5.4
here are some logs :

??MariaDB [(none)]> create user 'test1'@'localhost' identified by 'P4$$word';
Query OK, 0 rows affected (0.002 sec)

[root@srv-gra2-mdb3 ~]# mysql -utest1 -p
MariaDB [(none)]> exit
Bye

[root@srv-gra2-mdb3 ~]# mariabackup --user=test1 --password=P4$$word --backup
[00] 2020-09-18 17:54:40 Connecting to MySQL server host: localhost, user: test1, password: set, port: not set, socket: /mariadbdatas/mariadb.sock
[00] 2020-09-18 17:54:40 Failed to connect to MySQL server: Access denied for user 'test1'@'localhost' (using password: YES).

MariaDB [(none)]> set password for 'test1'@'localhost'=password('P4ssword_');
Query OK, 0 rows affected (0.002 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.003 sec)
MariaDB [(none)]> exit
Bye

[root@srv-gra2-mdb3 ~]# mariabackup --user=test1 --password=P4ssword_ --backup
[00] 2020-09-18 17:57:59 Connecting to MySQL server host: localhost, user: test1, password: set, port: not set, socket: /mariadbdatas/mariadb.sock
[00] 2020-09-18 17:57:59 Using server version 10.5.4-2-MariaDB-enterprise-log
[00] 2020-09-18 17:57:59 Error: missing required privilege RELOAD on .
[00] 2020-09-18 17:57:59 Error: missing required privilege PROCESS on .
[00] 2020-09-18 17:57:59 Current privileges, as reported by 'SHOW GRANTS':
[00] 2020-09-18 17:57:59 1.GRANT USAGE ON . TO `test1`@`localhost` IDENTIFIED BY PASSWORD '*1023393B00121637DBE886BE3365B52F25D835BD'

??

Comment by Sylvain ARBAUDIE [ 2020-09-18 ]

i cannot reproduce with @ neither with #. only $ seem to be an issue.

Comment by Elena Stepanova [ 2020-09-21 ]

SylvainArbaudie,

Did you try to connect as

mariabackup --user=test1 --password='P4$$word' --backup

(note the quote marks around the password)?
Your shell is likely to be expanding $$.

Comment by Sylvain ARBAUDIE [ 2020-09-21 ]

i'll try and test that asap

Comment by Sylvain ARBAUDIE [ 2020-09-23 ]

Ok. Using the simple quotes around the password is working. i guess we can close this issue again.

Generated at Thu Feb 08 08:50:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.