mysql-createuser.sh still using GRANT ... IDENTIFIED BY, fails with MySQL 8

Bug #1988762 reported by Paul Clark
6
This bug affects 1 person
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`@'localhost' IDENTIFIED BY 'foo'; GRANT ALL PRIVILEGES ON `psbridge`.* TO `psbridge`@localhost IDENTIFIED BY 'foo'; flush privileges;

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

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.