The Passionate Craftsman

Ruby, PHP, MySql, Software engineering and more.

Friday, 12 August 2011

Install MySql generic binary on Linux

I want to have the latest GA version of MySql, the 5.5.x instead of the old 5.1 release. 5.5.x has many performance improvements, from x2 to x8, according to an article of Guiseppe Maxia, a MySql expert. Go to the download page and get the tar gizipped binary version of Mysql. I downloaded this one:

# apt-get install libaio1
# wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.15-linux2.6-x86_64.tar.gz/from/http://mysql.mirrors.ovh.net/ftp.mysql.com/
# mv index.html mysql.tar.gz
# tar xzfv mysql.tar.gz
# mv mysql-5.5.15-linux2.6-x86_64/ mysql-5.5.15
# mv mysql-5.5.15/ /usr/local/
# cd /usr/local/
# ln -s mysql-5.5.15/ mysql
# cd mysql
# chown -R mysql .
# chgrp -R mysql .
# scripts/mysql_install_db --user=mysql
# cp support-files/mysql.server /etc/init.d/mysql.server
# cp support-files/my-medium.cnf /etc/my.cnf
# chmod +x /etc/init.d/mysql.server
# update-rc.d mysql.server defaults
# /etc/init.d/mysql.server start
Starting MySQL.. *
# /etc/init.d/mysql.server restart
# bin/mysql -uroot

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> update user set password=PASSWORD("your_passwd") where user='root';
Query OK, 4 rows affected (0.00 sec)
Rows matched: 4 Changed: 4 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

Done! Simple isn't it?

Reference: http://dev.mysql.com/doc/refman/5.5/en/binary-installation.html

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home