mysql安装
(亲自测试,这个比较好)
http://www.linuxidc.com/Linux/2016-09/134940.htm
注意:mysql -u root //直接回车进入mysql控制台
直接进入后台修改root密码之后,我们要注意拷贝修改/etc/my.cnf.rpmnew
配置文件为/etc/my.cnf
:
[client]
default-character-set=utf8
port=3306
socket=/var/lib/mysql/mysql.sock
[mysql]
no-auto-rehash
default-character-set=utf8
[mysqld]
character-set-server=utf8
init_connect='SET NAMES utf8'
port=3306
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid