1. Check if MySQL is installed
Rpm-qa | grep MySQL
2. First delete, download Mysql
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz
3. Unzip
TAR-ZXVF mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz
4. Copy the extracted MySQL directory
Cp-r Mysql-5.6.33-linux-glibc2.5-x86_64/usr/local/mysql
5. Go to the install MySQL software directory:
Cd/usr/local/mysql
6. Modify the current directory owner for the MySQL User:
Hown-r Mysql:mysql./
7. To install the database:
./scripts/mysql_install_db--user=mysql
(If you report the following error during installation, you are missing a dependency)
FATAL Error:please Install the following Perl modules before executing./scripts/mysql_install_db:data::D umper
Workaround: (Install autoconf Library) yum-y install autoconf or yum install-y perl-module-install.noarch
8. Modify the current directory owner to be the root user:
Chown-r Root:root./
9. Modify the current data directory owner for the MySQL User:
Chown-r Mysql:mysql Data
10. Set Boot up
CP Support-files/mysql.server/etc/init.d/mysql
11. Start the MySQL service:
Service MySQL Start
12. Modify the root user password for MySQL
./bin/mysqladmin-u root password ' your password '
Centos-mysql Installation