Mysql 5.5 is installed, and the character set is faulty. The previous mysql servers can be configured in the my. cnf configuration file. However, an error is reported even though this is not the case:
At that time, no error logs were configured in the system, so you can configure the location of the error logs first to see where the error occurred:
[Html] user = mysql pid-file =/var/run/mysqld. pid socket =/var/run/mysqld. sock port = 3306 www.2cto.com basedir =/usr datadir =/var/lib/mysql tmpdir =/tmp log-error =/var/log/mysql/error. log lc-messages-dir =/usr/share/mysql skip-external-locking default-character-set = utf8: [html] [ERROR]/usr/sbin/mysqld: unknown variable 'default-character-set = utf8'. I don't even know about it. I found that some people also encountered this problem, saying that mysql in mysql 5.5 no longer uses the default-character-set method. Please see: http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_default-character-set
Change default-character-set = utf8 to character-set-server = utf8. [Html] root @ chenDBA:/etc/mysql # vim my. cnf root @ chenDBA:/etc/mysql # service mysql start/running, process 5904 root @ chenDBA:/etc/mysql # mysql-uroot-p Enter password: www.2cto.com mysql> show variables like 'character % '; + ------------------------ + bytes + | Variable_name | Value | + -------------------------- + bytes + | character_set_client | Utf8 | character_set_connection | utf8 | character_set_database | utf8 | bytes | binary | bytes | utf8 | bytes | utf8 | character_set_system | utf8 | bytes |/usr/share/ mysql/charsets/| + -------------------------- + ---------------------------- + 8 rows in set (0.00 sec) OK. Author: chen861201