Home >Operation and Maintenance >CentOS >What should I do if something goes wrong when installing mysql on centos?

What should I do if something goes wrong when installing mysql on centos?

王林
王林Original
2020-04-02 13:14:362257browse

What should I do if something goes wrong when installing mysql on centos?

Environment:

MySQL5.6 Community Version

Operating System: CentOS6.3

Problem:

Execute the installation command

yum install mysql mysql-server -y

and then an error similar to the following is reported during the installation:

file /usr/share/mysql/charsets/geostd8.xml conflicts between attempted installs of mysql-community-common-5.6.15-1.el6.x86_64 and mysql-libs-5.1.71-1.el6.x86_64

Cause:

This is caused by package conflicts.

Solution:

First remove the conflicting libs package and then install it.

Remove the package of mysql-libs-5.1

yum -y remove mysql-libs-*

Step 4: Re-execute the installation script

yum install mysql mysql-server -y

After successful installation: Initialize the mysql database

service mysqld start

Set username and password:

mysqladmin -u root password '密码'

Related tutorial recommendations: centos tutorial

The above is the detailed content of What should I do if something goes wrong when installing mysql on centos?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn