mysql-createuser.sh still using GRANT ... IDENTIFIED BY, fails with MySQL 8
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wwwconfig-common (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The mysql-createuser.sh script in wwwconfig-common fails with MySQL 8.0 because it uses GRANT ... IDENTIFIED BY, which has been deprecated since MySQL 5.7 (although it still worked)
Script called within an internal package postinst on Ubuntu 20.04 (focal) which has MySQL 8.0. Previously worked on 18.04 (MySQL 5.7):
Debug added to script to print out the command issued:
GRANT ALL PRIVILEGES ON `psbridge`.* TO `psbridge`
Error:
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1064 (42000) at line 2: 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 'IDENTIFIED BY 'foo'' at line 2