Use Mysql lower_case_table_names to 1
Asked Answered
M

3

13

I have installed mysql v5.5.17 in linux using yum, now i want default lowercase table names so i have added

set-variable = lower_case_table_names=1

in /etc/my.cnf

but if i do that then i could not start mysqld service. Mysql logs says unknown variable lower_case_table_names. I have also tried with set global lower_case_table_names=1; in command line but is says its read only variable.

any suggestion?

Meyerhof answered 16/11, 2011 at 6:6 Comment(1)
via @Dori - linux-tips.org/article/41/lowercase-table-names-in-mysqlHomogamy
M
7

In 5.5 we need to specify

lower_case_table_names=1
Meyerhof answered 15/12, 2011 at 3:55 Comment(0)
V
21

my OP system is ubuntu, Mysql version is 5.5.*

update file /etc/mysql/my.cnf, (must add under the section [mysqld])

[mysqld]

lower_case_table_names=1

then restart mysql

Vertebral answered 28/7, 2014 at 22:55 Comment(1)
Under 16.04, this can be put at the end of /etc/mysql/mysql.conf.d/mysqld.cnf.Outsell
M
7

In 5.5 we need to specify

lower_case_table_names=1
Meyerhof answered 15/12, 2011 at 3:55 Comment(0)
R
0

Step1: Stop the mysql service using sudo systemctl stop mysqld; Step2: Backup mysql folder from /var/lib Step3: Delete /var/lib/mysql folder Step4: Change lower_case_table_names=1 in /etc/my.cnf Step5: Start the mysqld.service again using sudo systemctl start mysqld

If the root password is not working from mysql -u root -p, follow the below steps:

Edit the /etc/my.cnf file Under [mysqld] add skip-grant-tables Restart your MySQL server You should be able to login to mysql now using the below command mysql -u root -p Run flush privileges; inside the MySQL shell Set new password with ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘your_new_password’; Edit /etc/my.cnf and remove the skip-grant-tables line Restart MySQL again Now you can login with your new MySQL password using mysql -u root -p

Richmal answered 1/4, 2021 at 11:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.