Paper Lantern for cPanel accounts is being retired this year. Find out more »
cPanel & WHM Version 102 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!
This object is in archive! 

Prevent WHM >> "MySQL Root Password" from creating passwords containing single quotes (breaks mysql_upgrade)

Guest shared this idea 8 years ago
Open Discussion

mysql_upgrade is unable to handle passwords that contain single quotes. This was reported to MySQL by cPanel's own JD Lightsey in 2009 here:

mysql_upgrade improperly escapes passwords with single quotes

I can confirm that the issue still exists. A customer has recently stated that they were getting the following error when copying accounts via WHM:


warn [pkgacct] someuser_somedb: mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'someuser_somedb'': Column count of mysql.proc is wrong. Expected 20, found 16. The table is probably corrupted (1547)


They later stated that they had upgraded MySQL via WHM, which appears to be the cause of the mysql.proc column count issue, as that was ultimately resolved after they changed the mysql root user's pass to something without a single quote, then ran "mysql_upgrade".

I have not built a test server with MySQL < 5.5 to test with as of yet (that is, give the mysql root user a password that contains a single quote, then use WHM to upgrade MySQL), but knowing that single quotes break the mysql_upgrade utility, it is requested that WHM not create mysql root passwords that contain single quotes.

Alternatively, patch mysql_upgrade if possible.

Thank you for your consideration of this feature.

Replies (0)

Leave a Comment
Attach a file