Bug #103383 | setting password via non interactive session | ||
---|---|---|---|
Submitted: | 20 Apr 2021 10:45 | Modified: | 20 Apr 2021 19:54 |
Reporter: | Ankit Kapoor | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 8.0.23 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | MariaDB, MySQL, percona mysql |
[20 Apr 2021 10:45]
Ankit Kapoor
[20 Apr 2021 10:49]
Ankit Kapoor
Sorry I missed the last step when it worked. Hence I am pasting output of all the 3 steps: [root@xyz ~]# /mysql-8.0.23-linux-glibc2.12-x86_64/bin/mysql -uroot -p';(d._-CZi8po' -connect-expired-password -e "alter user root@localhost identified by ';(d._-CZi8po';flush privileges;exit" mysql: [Warning] Using a password on the command line interface can be insecure. Please use --connect-expired-password option or invoke mysql in interactive mode. [root@xyz ~]# /mysql-8.0.23-linux-glibc2.12-x86_64/bin/mysql -uroot -p';(d._-CZi8po' --connect-expired-password -e "alter user root@localhost identified by ';(d._-CZi8po';flush privileges;exit" mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'exit' at line 1 [root@xyz ~]# /mysql-8.0.23-linux-glibc2.12-x86_64/bin/mysql -uroot -p';(d._-CZi8po' -connect-expired-password -e "alter user root@localhost identified by ';(d._-CZi8po';flush privileges;exit" mysql: [Warning] Using a password on the command line interface can be insecure.
[20 Apr 2021 12:57]
MySQL Verification Team
Not a bug. Just remove "exit" from the command you're running. "exit" is not a valid SQL.
[20 Apr 2021 19:54]
Ankit Kapoor
Thanks for your response. Yes I am agree that exit is not a part of SQL but even without removing "exit" clause, it worked.