2014/09/01

centos mysql安裝好要做的几個動作

修改MySQL root 的密碼
 # mysqladmin -u root password '12345678'
 登入MySQL
 # mysql -u root -p
 刪除匿名帳戶
 mysql> DELETE FROM mysql.user WHERE user="";

重載權限
 mysql> FLUSH PRIVILEGES;
 mysql> quit

設定my.cnf
 # vi /etc/my.cnf
 在[mysqld] 新增
 default-storage-engine=innodb
 character-set-server=utf8
 port=3306
 新增[client]
 default-character-set=utf8

沒有留言: