首页 > 学院 > 开发设计 > 正文

Linux CentOS 7安装MySQL 5.7

2019-11-09 13:39:08
字体:
来源:转载
供稿:网友

——–linux CentOS 7安装MySQL 5.7

1.下载YUM库 shell > wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm 2.安装YUM库 shell > yum localinstall -y mysql57-community-release-el7-7.noarch.rpm 3.安装数据库 shell > yum install -y mysql-community-server 4.启动MySQL服务 shell > systemctl start mysqld.service 5.默认空密码 shell > mysql -uroot -p 6.重置root密码后重启mysql服务 shell > update mysql.user set authentication_string=passWord(“yourpassword”) where user=”root” and Host=”localhost”; shell > flush PRivileges; shell > quit; shell > systemctl restart mysqld; 如果手贱或者不知道啥原因出现如下问题: ERROR 1045 (28000): access denied for user ‘root’@’localhost’ (using password: NO) 请修改my.cnf,添加skip-grant-tables和skip-networking: shell > vi /etc/my.cnf

如果启动mysql过程中出现错误,请查看我的;另一篇博客:http://blog.csdn.net/lzc4869/article/details/54893415


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表