
mysqld -defaults-file=/etc/my.cnf -initialize -user=mysql -console Now Initialize the data directory using the following command inside bin directory (/usr/local/mysql/bin) Now add the configuration as " lower_case_table_names=1" in my.cnf under MYSQLD section (/etc/my.cnf) Once the backup is taken delete the existing data folder in Mysql Home(/usr/local/mysql/) using the command mysqldump -uroot -p password > dump.sql Just take the backup of the existing db Schema using the following command inside bin folder (/usr/local/mysql/bin) Change the password of MySQL user root either by:ĪLTER USER IDENTIFIED BY 'MyNewPa$$w0rd' Īfterwards, OR by calling the "hardening" script anyway:Īfter that, you can verify the lower_case_table_names setting by entering the MySQL shell: sudo mysql -u root -pĪnd executing: SHOW VARIABLES LIKE 'lower_case_%' Įxpected output: +-+-+.Sudo grep 'temporary password' /var/log/mysql/error.log Retrieve the new generated password for MySQL user root:.Sudo mysqld -defaults-file=/etc/mysql/my.cnf -initialize -lower_case_table_names=1 -user=mysql -console Re-initialize MySQL with -lower_case_table_names=1:.Add lower_case_table_names = 1 to the section in /etc/mysql//mysqld.cnf.Recreate the MySQL data directory (yes, it is not sufficient to just delete its content):.If you have already data in a database, export it first to import it back later: The following steps apply to a new installation. So far, I can get it to work with a workaround (I originally posted on askubuntu): by re-initializing MySQL with the new value for lower_case_table_names after its installation.
