Home >Database >Mysql Tutorial >How to install MySQL under CentOS6
MySQL is a relational database management system that is widely used in various web application development. This article will introduce how to install MySQL on CentOS 6.
Preparations before installing MySQL
Before installing MySQL, you need to ensure that your system has installed the EPEL software warehouse. If you have not installed it, you can use the following command to install it.
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
In addition, you also need to install some other necessary software packages:
yum install wget zip unzip
Installation MySQL steps
wget http://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm yum localinstall mysql57-community-release-el6-9.noarch.rpm
yum install mysql-server service mysqld start
vim /etc/my.cnf
Add a line under the [mysqld] tag:
bind-address=0.0.0.0
mysql_secure_installation
This command will prompt you to enter the MySQL root password, and then prompt you whether to set a new password. Then it will remind you about some security settings of the server and give you some choices.
mysql -h <IP地址> -P <端口号> -u <用户名> -p
where
Summary
Through this article, we know the steps to install MySQL on CentOS 6. MySQL is an essential tool if you want to deploy web applications on CentOS. If you want, you can try installing MySQL and start developing a web application.
The above is the detailed content of How to install MySQL under CentOS6. For more information, please follow other related articles on the PHP Chinese website!