mysql some operations

1. /etc/rc.d/init.d/mysqld restart

2. /etc/my.cnf

   [mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
default-character-set=utf8
user=mysql
   # Default to using old password format for compatibility with mysql 3.x
   # clients (those using the mysqlclient10 compatibility package).
old_passwords=1

   [mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

   [client]
default-character-set=utf8


3. /var/lib/mysql/{database}/db.opt

   default-character-set=utf8
   default-collation=utf8_general_ci

你可能感兴趣的:(mysql)