如何卸载maridb并在centos 7,linux中安装remysql?

时间:2017-12-20 07:06:02

标签: mysql mariadb

我已经在我的centos 7中安装了maria db,但现在卸载了maridb:

<configuration>
    <fork>true</fork>
</configuration>

当我安装mysql-devel或mysql或mysql-server时,它总是安装maridb。  我怎样才能回到mysql? 我还从存储库列表中删除了mariadb存储库:/etc/yum.repos.d
上:

yum remove MariaDB-server MariaDB-client 

cmd上的错误登录:

yum install mysql mysql-server mysql-devel

1 个答案:

答案 0 :(得分:0)

$ sudo yum install http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

$ sudo yum repolist enabled | grep "mysql.*-community.*"

$ sudo systemctl start mysqld

$ sudo systemctl status mysqld

登录mysql

 $ mysql -u root

启动时Mysql自动启动

  $ sudo systemctl enable mysqld.service

链接到完整答案https://dbahire.com/how-to-install-mysql-5-6-on-centos-7/

使用mysql时设置密码

mysql_secure_installation