Home > Database > Mysql Tutorial > How to install mysql using yum command

How to install mysql using yum command

王林
Release: 2020-09-04 16:38:29
Original
14484 people have browsed it

Yum command to install mysql: directly execute the [yum -y install mysql-server mysql mysql-devel] command; after the installation is completed, you can execute the [service mysqld start] command to start mysql.

How to install mysql using yum command

Purpose:

Use the yum command to install the mysql database.

Environment: centos6.4 system

(Recommended tutorial: mysql video tutorial)

Specific method:

1. View Check whether the mysql that comes with the system has been installed. Execute the command:

yum list installed | grep mysql
Copy after login

2. If it has been installed, uninstall it. Use the command:

yum -y remove mysql-libs.x86_64
Copy after login

3. Check the version information of mysql on the yum library, command :

yum list | grep mysql 或 yum -y list mysql*
Copy after login

4. Use yum to install the mysql database, use the command:

yum -y install mysql-server mysql mysql-devel
Copy after login

5. View the mysql version information, the command:

rpm -qi mysql-server
Copy after login

(Related tutorial recommendations: mysql tutorial)

6. Start mysql and execute the command:

service mysqld start
Copy after login

If you need to start it, execute the command:

chkconfig mysqld on
Copy after login

7. Database security configuration wizard, execute Command:

mysql_secure_installation
Copy after login

Just follow the prompts step by step.

8. Log in to mysql. The login password is set during security configuration. Execute the command:

mysql -uroot -p
Copy after login

The above is the detailed content of How to install mysql using yum command. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template