Skip to main content

Posts

Showing posts with the label mysql

Mysql Unknown Variable character-set-server

If you've recently upgraded to MySQL 5.1.45, you might experience a problem running mysql client. The error message says: /usr/bin/mysql: unknown variable 'character-set-server=utf8' The reason is that mysql client no longer supports character-set-server parameter. Actually I don't know why, the official ChangeLog doesn't include any explanations. The solution is to disable character-set-server option inside /etc/mysql/my.cnf [mysql] character-sets-dir=/usr/share/mysql/charsets #character-set-server=utf8

Mysqld-bin logs problem

After continuous running of Mysql server, I've noticed that /var/lib/mysql directory uses too much disk space. The reason of that problem was a set of mysqld-bin.xxxxxx files. Each of that file was 1GB in size. First I thought that I can stop the Mysql server and remove that files, but I didn't want to act this way because there was sensitive data in databases that I didn't want to loose. So I found the better way to achieve this. Connect to Mysql server and perform the following mysql> flush logs; mysql> reset master; That's it! After that the all logbin files should be removed. Also you can disable mysqld-bin logging completely by commenting out log-bin line in my.cnf and restarting Mysql server daemon.