0
votes

I habe install rails and everything else needs onto a new CentOS 7 server. I have create mysql database via command line and then I've edited it to use character set utf8 and collation utf8_general_ci.

Rails worked.

Then I configured /etc/my.cnf to include some default settings for charset and collation:

[mysqld]
character-set-server = utf8
collation-server = utf8_general_ci
init_connect=‘SET collation_connection = utf8_general_ci’

[client]
default-character-set = utf8

Rails stopped working saying it can't connect to the mysql.

Obviously, I could reconfigure something in Rails to solve this, but I don't know what.

Thanks for the help.

1
Please provide exact error message/backtrace you see in terminal.EugZol

1 Answers

0
votes

In my.cnf, use only apostrophe ' or double quote ", not and .