In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to solve the problem of mysql5.5 character set". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
A 5.5 version is installed, and there is a problem with the character set. The previous mysql servers can be configured in the my.cnf configuration file, but today they cannot report errors all the time:
At that time, the error log was not configured in the system, so we can only configure the location of the error log first to see what went wrong:
[html]
User = mysql
Pid-file = / var/run/mysqld/mysqld.pid
Socket = / var/run/mysqld/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
As a result, I looked at the error log and found that it was an error in the character set:
[html]
[ERROR] / usr/sbin/mysqld: unknown variable 'default-character-set=utf8'
Unexpectedly do not know, the Internet looked for the next found that some people encountered, said that 5. 5 in the mysql no longer use default-character-set this way of writing.
For details, please see: http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_default-character-set
Just 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
Mysql start/running, process 5904
Root@chenDBA:/etc/mysql# mysql-uroot-p
Enter password: www.2cto.com
Mysql > show variables like 'character%'
+-+
| | Variable_name | Value |
+-+
| | character_set_client | utf8 |
| | character_set_connection | utf8 |
| | character_set_database | utf8 |
| | character_set_filesystem | binary |
| | character_set_results | utf8 |
| | character_set_server | utf8 |
| | character_set_system | utf8 |
| | character_sets_dir | / usr/share/mysql/charsets/ |
+-+
8 rows in set (0.00 sec) OK is done.
This is the end of the content of "how to solve the problem of mysql5.5 character set". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un