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?

OMG Ponies
  • 325,700
  • 82
  • 523
  • 502
Nirmal- thInk beYond
  • 11,847
  • 8
  • 35
  • 46

3 Answers3

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

nishu
  • 1,493
  • 11
  • 26
Richardhe2007
  • 379
  • 2
  • 3
7

In 5.5 we need to specify

lower_case_table_names=1
Nirmal- thInk beYond
  • 11,847
  • 8
  • 35
  • 46
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