安装mysql
参考博客Linux学习之CentOS
windows下访问
这个地方记得授权就好
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '1994713' WITH GRANT OPTION;
解决中文乱码问题
修改配置文件my.cnf
[root[@localhost](https://my.oschina.net/u/570656) /]# vim /etc/my.cnf
修改配置文件为
~
"/etc/my.cnf[client]" [New] 6L, 94C written
[root@localhost /]# vim /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
default-character-set=utf8