Linux(CentOS)安装MySql

database

安装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!";

创建数据库

退出

 

以上是 Linux(CentOS)安装MySql 的全部内容, 来源链接: utcz.com/z/534020.html

回到顶部