- 论坛徽章:
- 0
|
本帖最后由 zhupeter2003 于 2015-02-06 10:53 编辑
linux环境 修改mysql字符集后,数据库重启失败
#vi /etc/my.cnf
修改如下:(红色为添加部分)
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
default-character-set=utf8
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
default-character-set=utf8
init_connect='SET NAMES utf8'
[mysql]
no-auto-rehash
default-character-set=utf8
保存后,重启数据失败。
提示: No mysqld pid file found. Looked for /usr/local/mysql/var/host16.pid.
数据库日志:
150206 10:41:03 InnoDB: Started
150206 10:41:03 Found an entry in the 'db' table with empty database name; Skipped
/usr/local/mysql/libexec/mysqld: ready for connections.
Version: '4.0.20-log' socket: '/usr/local/mysql/var/mysql.sock' port: 3306
150206 10:41:25 /usr/local/mysql/libexec/mysqld: Normal shutdown
150206 10:41:26 InnoDB: Starting shutdown...
150206 10:41:28 InnoDB: Shutdown completed
150206 10:41:28 /usr/local/mysql/libexec/mysqld: Shutdown Complete
150206 10:41:28 mysqld ended
150206 10:41:28 mysqld started
150206 10:41:28 InnoDB: Started
150206 10:41:28 Found an entry in the 'db' table with empty database name; Skipped
/usr/local/mysql/libexec/mysqld: ready for connections.
Version: '4.0.20-log' socket: '/usr/local/mysql/var/mysql.sock' port: 3306
求赐教
|
|