MYsql linux apache java php
Sql sever windows IIS C#.net ASP asp.net
1.准备
安装文件:mysql57-community-release-el7-9.noarch.rpm
下载地址:wget http://repo.mysql.com/mysql57-community-release-el7-9.noarch.rpm
安装源:rpm -ivh mysql57-community-release-el7-9.noarch.rpm
yum makecache
[root@rhel:~]#rpm -qa|grep mariadb
mariadb-libs-5.5.52-1.el7.x86_64 ( 复制)
mariadb-5.5.52-1.el7.x86_64
mariadb-server-5.5.52-1.el7.x86_64
卸载旧数据库
[root@rhel:~]#rpm -e –nodeps mariadb-libs-5.5.52-1.el7.x86_64(粘贴)
[root@rhel:~]#rpm -e –nodeps mariadb-5.5.52-1.el7.x86_64
[root@rhel:~]#rpm -e –nodeps mariadb-server-5.5.52-1.el7.x86_64
[root@rhel:~]#rpm -qa|grep mariadb
2.安装mysql5.7
[root@rhel:~]#yum install mysql-server
Mysql-server-comminity-70w
mysql-community-server x86_64 5.7.21-1.el7
mysql-community-client x86_64 5.7.21-1.el7 mysql-community-common x86_64 5.7.21-1.el7
mysql-community-libs x86_64 5.7.21-1.el7
3.启动配置mysql5.7
[root@rhel:~]#rpm -qa|grep mysql
[root@rhel:~]#systemctl start mysqld
[root@rhel:~]#systemctl status mysqld
VI /etc/my.cnf 尾加入 skip-grant-tables (无密码登录)
[root@rhel:~]#systemctl restart mysqld
[root@rhel:~]#mysql –u root –p
Enter password : 回车(空密码)
Mysql> use mysql (SQL指令:打开数据库MYSQL)
安装MYSQL数据库
最新推荐文章于 2023-01-08 13:03:56 发布