These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for mysql client connection corrupted after reboot. on the new forum.
Websites was working normally but after reboot, 2 website mysql connection had problem. Those 2 need to connect to database as "DEFAULT CHARACTER SET latin5 COLLATE latin5_turkish_ci" but its using different so websites non-latin chars looks like ???
[root@host ~]# mysql -u root -p mysite -e 'status;'
Enter password:
--------------
mysql Ver 14.14 Distrib 5.5.10, for Linux (x86_64) using readline 5.1
Connection id: 427
Current database: mysite
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.10-log Distributed by The IUS Community Project
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin5
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 23 min 45 sec
How can i fix that problem?
btw adding those lines in websites solve problem temporary:
mysql_query("SET NAMES 'latin5'");
mysql_query("SET CHARACTER SET latin5");
mysql_query("SET COLLATION_CONNECTION = 'latin5_turkish_ci'");
But i want to fix it from virtualmin, its just interesting. I am changing charset from phpmyadmin, virtualmin etc.. Server just not listening me ^^
Howdy,
You should be able to set those two values in the MySQL my.cnf config file.
To do that, edit your my.cnf file, locate the [mysqld] section, and there you can set collation_server and character_set_server to your desired values. After that, restart MySQL.
Does that do the trick?
-Eric