1、# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
2、# rpm -ivh mysql-community-release-el7-5.noarch.rpm
3、# yum install mysql-community-server
4、成功安装之后重启mysql服务
# service mysqld restart
5、设置密码的方法,初次安装mysql是root账户是没有密码的
# mysql -uroot
mysql> use mysql
mysql> update user set password = password("root") where user="root";
6、设置外网连接
mysql> update user set host='%' where host='127.0.0.1';
mysql> exit
7、设置成功之后重启mysql服务
# service mysqld restart
搞定!
其他:
不区分大小写
打开并修改 /etc/my.cnf;在[mysqld]节点下,加入一行: lower_case_table_names=1
重启mysql服务