Linxu 下安装 MySQL 数据库
作者:互联网
Linux 下安装 MySQL 数据库
# 下载软件包 在创建并在 /usr/mysql 下下载
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
# yum 安装
yum -y install mysql57-community-release-el7-10.noarch.rpm
# yum 安装 mysql
yum -y install mysql-community-server
# 启动mysql
systemctl start mysqld.service
# 查看运行状态
systemctl status mysqld.service
# 查看数据库密码 feYWq(kYu8dr
grep "password" /var/log/mysqld.log
# 登录数据库
mysql -uroot -p # 回车后会提示输入密码
# 初次登录修改密码
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Troila12#$';
# 查看mysql的安装目录
which mysql
标签:数据库,MySQL,community,yum,mysql,Linxu,安装,mysqld 来源: https://www.cnblogs.com/FutureHolmes/p/15097375.html