How To Install MySQL 5.6 On Ubuntu 12.10 (Including memcached Plugin)
How To Install MySQL 5.6 On Ubuntu 12.10 (Including memcached Plugin)Version 1.0 According to What's New in MySQL 5.6, MySQL 5.6 will bring some performance improvements over MySQL 5.5. If you want to test out MySQL 5.6, you have to install one of the development releases from the MySQL downloads page because there is no stable release yet. This tutorial explains how to install the MySQL 5.6.8rc1 (Linux Generic) development release on an Ubuntu 12.10 server. This document comes without warranty of any kind! I want to say that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!
1 Preliminary NoteIn this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate. It is important that you haven't installed any other MySQL version on your system before (not even the one from the Ubutu repositories) because if you did, this tutorial will not work anymore! Because we must run all the steps from this tutorial with root privileges, we can either prepend all commands in this tutorial with the string sudo, or we become root right now by typing sudo su
2 Disabling AppArmorYour manually installed MySQL 5.6.8 might refuse to start if AppArmor is running, therefore we disable AppArmor: /etc/init.d/apparmor stop
3 Installing MySQL 5.6.8rc1 (Linux Generic)First we create a user and group called mysql: groupadd mysql Next install the libaio1 package: apt-get install libaio1 We will install MySQL in the /usr/local/mysql directory (with /usr/local/mysql/data being the data directory, i.e., the directory which will contain the databases). Therefore we download MySQL to the /usr/local directory now: cd /usr/local Unpack MySQL, rename the directory to mysql, and make it owned by the user and group mysql: tar xvfz mysql-5.6.8-rc-linux2.6-x86_64.tar.gz Run scripts/mysql_install_db --user=mysql to create the necessary databases (like the mysql database): Change some ownerships: chown -R root . MySQL uses the my.cnf file inside /usr/local/mysql, so we don't have to create one on our own. If you want to change MySQL settings, you can do it in that file. The downloaded MySQL package comes with the init script mysql.server which we copy to /etc/init.d as follows: cp support-files/mysql.server /etc/init.d/mysql.server It is already executable, so we don't have to change permissions. We can now start MySQL 5.6 as follows: /etc/init.d/mysql.server start To make MySQL start automatically at boot time, run the following command: update-rc.d mysql.server defaults The MySQL commands (like mysql, mysql_secure_installation, etc.) are located in the /usr/local/mysql/bin directory which is not in the PATH which means we would have to call these commands with the full or relative path which is cumbersome. To avoid this, we create the following symlink so that we can call all MySQL commands without a path: ln -s /usr/local/mysql/bin/* /usr/local/bin/ Finally, we should set a MySQL root password: mysql_secure_installation root@server1:/usr/local/mysql# mysql_secure_installation
|




Recent comments
23 hours 44 min ago
1 day 6 hours ago
1 day 10 hours ago
1 day 11 hours ago
1 day 20 hours ago
2 days 5 hours ago
2 days 6 hours ago
2 days 10 hours ago
2 days 14 hours ago
2 days 14 hours ago