If you get an error like “Unknown variable default character set utf8” MySQL or MariaDB 5.5 in /var/log/mariadb/mariadb.log when I restart MySQL database, you can resolve this problem with change variable name.
Error
You can look for error /var/log/mariadb/mariadb.log
/usr/libexec/mysqld: unknown variable ‘default-character-set=utf8’
Aborting
Solution
Find my.cnf file.
[root@testdb ~]# locate my.cnf
/etc/my.cnf
Change parameter name with vi editor. New variable name is character-set-server=utf8
[root@testdb ~]# vi /etc/my.cnf
#default-character-set=utf8
character-set-server=utf8You can start MySQL or Mariadb database.
[root@testdb ~]# systemctl start mariadb.service
In my.cnf there’s not a line with default-character-set=utf8, but still have the error
[ERROR] mysqld: unknown variable ‘default-character-set=utf8’
i was upgraded fron Debian Squeeze to Wheezy.
Since i do that, i get this error.
How can i solve it?