The version of MySQL in the Ubuntu repositories is not usually kept up to date. I normally install using binaries from MySQL.
1.Add mysql user. Make is a system account, and do not make a home directory.
sudo useradd -M -r mysql
2.Download binaries. You can replace the url with any source you want.
wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.40-linux-i686-glibc23.tar.gz/from/http://mirror.trouble-free.net/mysql_mirror/
- Extract and move binaries to the final destination.
tar xzf mysql-5.1.40-linux-i686-glibc23.tar.gz
sudo mv mysql-5.1.40-linux-i686-glibc23 /usr/local
- Sym Link the install directory to a standard directory
cd /usr/local
sudo ln -s /usr/local/mysql-5.1.40-linux-i686-glibc23/ mysql
5.temporarily set owner user and group to mysql
cd mysql
sudo chown -R mysql .
sudo chgrp -R mysql .
- Initialize the database schemas
sudo scripts/mysql_install_db --user=mysql
- Set permanent owners.
sudo chown -R root .
sudo chown -R mysql data
8.Copy the mysql server init script to /etc/init.d and install
sudo cp support-files/mysql.server /etc/init.d/mysql
sudo update-rc.d mysql default
9.Link mysql binaries to /usr/bin
sudo ln -s /usr/local/mysql/bin/* /usr/bin
- Start MySQL. For 9.10+
sudo service mysql start
For 9.04-
sudo /etc/init.d/mysql start
- Log into mysql and set up users. Remove the test schema. Create factorypmi schema.
mysql -u root
drop schema test;
create schema factorypmi;
delete from mysql.user where user='';
update mysql.user set user='someuser',password=PASSWORD('somepassword') where user='root';
flush privileges;
- Create remote user.
grant all privileges on *.* to 'someuser2'@'%' identified by 'somepassword';
flush privileges;
exit
I think thats everything. Let me know if i forgot anything.