centos 安装mysql

1.保证没有mysql相关东西(注意删除的都是前面查出来的路径)

rpm -qa | grep mysql
rpm -e --nodeps 

centos 安装mysql

 

 

whereis mysql
find / -name mysql
rm -rf 

centos 安装mysql

 

 2.下载相关

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum update
yum install mysql-server

3.权限设置

chown mysql:mysql -R /var/lib/mysql

4.初始化 MySQL:

mysqld --initialize

 

5.启动 MySQL:

systemctl start mysqld

 

6.查看 MySQL 运行状态:

systemctl status mysqld

 


7.验证安装
mysqladmin --version

 

8.创建root用户密码

mysqladmin -u root password "new_password";

9.连接

mysql -u root -p

10.

 

参考链接:

https://www.runoob.com/mysql/mysql-install.html
https://www.cnblogs.com/ccsert/p/12296213.html
https://www.jianshu.com/p/276d59cbc529



centos 安装mysql

上一篇:ORACLE字符串截取


下一篇:oracle index NOCOMPRESS