Update April 23, 2012
I added new instructions for adding the MySQL libs to the loader path. Failure to add the libs to the loader path will cause errors when you try to run/build programs that depend on MySQL, such as installing the MySQL driver for Pyramid (Python).
Update April 18, 2012
Thanks to Lampros for pointing out that WordPress was converting double dashes into single dashes “-“. I have updated the post so that double dashes are displayed correctly.
The following are installation notes for MySQL 5.5 on Ubuntu 10.04 LTS running on the Rackspace cloud.
Download the MySQL package from http://www.mysql.com in the ~/Downloads directory.
Download the following package from http://www.mysql.com/downloads/mysql/#downloads by selecting Debian Linux from the Select Platform drop-down list:
After the download is complete, open a terminal and execute the following commands:
libpthread-stubs0 libpthread-stubs0-dev coreutils are really not required, but I installed them as I was working through another issue.
apt-get install build-essential cmake libncurses5-dev libaio-dev bison libpthread-stubs0 libpthread-stubs0-dev coreutils
Setup the MySQL User and Group
useradd -r -g mysql mysql
dpkg -i mysql-5.5.22-debian6.0-x86_64.deb
MySQL is now installed into the following directory:
chown root:root mysql
chown root:root server-5.5
chown -R mysql:mysql ./*
chown mysql:mysql ./*
chown -h mysql libmysqlclient.so libmysqlclient.so.18 libmysqlclient_r.a libmysqlclient_r.so libmysqlclient_r.so.18 libmysqlclient_r.so.18.0.0
Decide which of the configuration files meets your needs, then copy it to /etc.
cp my-medium.cnf /etc/my.cnf
cp mysql.server /etc/init.d/mysql
Add MySQL to PATH
Add the following to the end of the path:
Start the MySQL Server
Set the MySQL Server to Start on Boot
update-rc.d mysql defaults
Create a root Password and Secure the Server
The following is the most basic and minimal security, but the steps below are required for a production server.
Check the security settings:
mysql -u root -p
mysql> use mysql;
mysql> SELECT User, Host, Password FROM mysql.user;
None of the password fields should be blank.
Add the MySQL Libs to the Loader Path
We now need to update our loader path to include the MySQL libs. This is important for any future work we do that depends on the MySQL libraries, such as installing a MySQL driver for Pyramid.
Paste in the following:
# MySQL 5.5 Libraries
Post installation checks
mysqladmin version -u root -p
mysqladmin variables -u root -p