linux mysql5.6yum安装

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/long_539437/article/details/79106991
1.打开vi编辑器:
vi  /etc/yum.repos.d/mysql-community.repo

2.在打开的vi 编辑器中输入:

# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql3
3.保存后输入:
yum repolist enabled | grep mysql

4.安装MySQL服务:

 yum install mysql-community-server
5.重启mysql服务:

service mysqld start
6. Linux 下设置 Mysql 表名不区分大小写

用root账号登录后vi /etc/my.cnf 在[mysqld]下面加lower_case_table_names=1
7,设置允许远程登录

扫描二维码关注公众号,回复: 3515062 查看本文章
a.mysql> use mysql;
b.select host,user,password from user;
+-----------+------+-------------------------------------------+
| host      | user | password                                  |
+-----------+------+-------------------------------------------+
| localhost | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| mysql     | root | *6D95CDA252C85345E8BC1C4168E962D3949C30F9 |
| 127.0.0.1 | root | *6D95CDA252C85345E8BC1C4168E962D3949C30F9 |
| ::1       | root | *6D95CDA252C85345E8BC1C4168E962D3949C30F9 |
+-----------+------+-------------------------------------------+
c.mysql> update user set password=password('123456') where user='root';
d.update user set host='%' where user='root' and host='localhost';
e. flush privileges;







猜你喜欢

转载自blog.csdn.net/long_539437/article/details/79106991