Skip to content

Instantly share code, notes, and snippets.

@kikegarcia
Created September 12, 2014 08:05
Show Gist options
  • Save kikegarcia/8b0dc8f0451b2b5fba7e to your computer and use it in GitHub Desktop.
Save kikegarcia/8b0dc8f0451b2b5fba7e to your computer and use it in GitHub Desktop.
Mysql on Red Hat 6.* / CentOS 6.*
yum localinstall /tmp/mysql-community-release-el6-5.noarch.rpm
yum update
yum install mysql-server
chkconfig mysqld on
/etc/init.d/mysqld start
/usr/bin/mysqladmin -u root password 'root123'
nano /etc/my.cnf
/etc/init.d/mysqld stop
mkdir /mysql/data
yes | cp -rf /var/lib/mysql/* /mysql/data/
chown -R mysql:mysql /mysql/data/
/etc/init.d/mysqld start
mysql -p root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment