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=utf8
You can start MySQL or Mariadb database.
[root@testdb ~]# systemctl start mariadb.service
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=utf8
You can start MySQL or Mariadb database.
[root@testdb ~]# systemctl start mariadb.service
0 comments:
Post a Comment