Last active
December 30, 2015 02:59
-
-
Save nghuuphuoc/7766532 to your computer and use it in GitHub Desktop.
Install MySQL 5 on Centos 6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html | |
$ wget http://dev.mysql.com/get/mysql-community-release-el6-4.noarch.rpm | |
$ sudo yum localinstall mysql-community-release-el6-4.noarch.rpm | |
// Check MySQL Yum repos has been added | |
$ sudo yum repolist enabled | grep "mysql-community" | |
Failed to set locale, defaulting to C | |
mysql-community MySQL Community Server 19 | |
$ sudo yum install mysql-server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Start before changing the root password | |
$ sudo service mysqld start | |
// Set root password | |
$ mysql_secure_installation | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ chkconfig mysqld on | |
$ chkconfig --levels 235 mysqld on | |
// Start MySQL | |
$ sudo service mysqld start | |
// Stop MySQL | |
$ sudo service mysqld stop | |
// Check status | |
$ sudo service mysqld status |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Config file | |
/etc/my.cnf | |
// Log file | |
/var/log/mysqld.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment