转载:CentOS7安装MySQL(完整版)

原文地址:https://blog.csdn.net/qq_36582604/article/details/80526287

原文作者:Antelope24

下载命令如👉:[root@localhost ~]# wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

安装命令如👉:[root@localhost ~]# yum -y install mysql57-community-release-el7-10.noarch.rpm

安装mysql服务器👉:[root@localhost ~]# yum -y install mysql-community-server

启动MySQL[root@localhost ~]# systemctl start mysqld.service

查看MySQL运行状态:[root@localhost ~]# systemctl status mysqld.service

查看Mysql初始密码:[root@localhost ~]# grep "password" /var/log/mysqld.log

进入Mys数据库:[root@localhost ~]# mysql -uroot -p

修改数据库密码:mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';

 

posted @ 2019-10-24 14:32  那就墨丘利  阅读(137)  评论(0编辑  收藏  举报