Linux(CentOS)安装MySql

安装mysql yum repository

wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm

安装mysql

yum -y install mysql-community-server.x86_64 

启动mysql

service mysqld start

查找mysql临时密码

grep "password" /var/log/mysqld.log

登录

mysql -uroot -p

copy上面的临时密码进行登录

修改密码

ALTER USER 'root'@'localhost' IDENTIFIED BY 'mySql123!';

创建数据库

退出

 

posted @ 2020-06-07 19:59  ibrake  阅读(240)  评论(0编辑  收藏  举报