Changing that configuration in MySQL 8 is not possible when the database has been already initialized
It is prohibited to start the server with a lower_case_table_names setting that is different from the setting used when the server was initialized. The restriction is necessary because collations used by various data dictionary table fields are determined by the setting defined when the server is initialized, and restarting the server with a different setting would introduce inconsistencies with respect to how identifiers are ordered and compared.
However, you can initialize the database again if you don't have any data (IMPORTANT: all the data will be removed)
sudo /opt/bitnami/ctlscript.sh stop mysql
- Remove the data folder and create a new folder
sudo rm -rf data
sudo mkdir data
- Initialize MySQL with the --lower-case-table-names=0 option
sudo bin/mysqld --port=3306 --socket=/opt/bitnami/mysql/tmp/mysql.sock --datadir=/opt/bitnami/mysql/data --pid-file=/opt/bitnami/mysql/data/mysqld.pid --lower-case-table-names=0 --initialize-insecure
sudo chown -R mysql:root ./data/
sudo chmod 750 data
- Modify the --lower-case-table-names=0 option in the /opt/bitnami/mysql/scripts/ctl.sh
- Start MySQL again
sudo /opt/bitnami/ctlscript.sh start mysql
- Remove the anonymous user and set a password for root
mysql -u root -e "DELETE FROM mysql.user WHERE User='';"
mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'bitnami';"
Happy to help!
Was my answer helpful? Click on