Wednesday, 28 July 2010

Install MySQL from Tar ball

Download your favourite version of MySQL Server from your local mirror. We can use the latest GA (5.1.49) or development release (5.5.5m3). Move your tarball to the /usr/local directory. I'm assuming that you're logged into your box using the root account. If you're not then you might need to utilize sudo.

Add the mysql user and group
   groupadd mysql
   useradd -g mysql mysql

Untar and Create a symbolic link
   cd /usr/local/
   tar -zxvf mysql-{version}.tar.gz
   ln -s mysql-{version} mysql

File and Directory creation/permissions 
   mkdir -p /var/lib/mysql *
   chown -R mysql:mysql /usr/local/mysql
   chown -R mysql:mysql /var/lib/mysql

Install the system databases and place my.cnf
  cp /usr/local/mysql/support-files/my-medium.cnf  /etc/my.cnf**
  cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql***
   scripts/mysql_install_db --user=mysql --datadir=/var/lib/mysql --basedir=/usr/local/mysql ****
Start mysqld
   /usr/local/mysql/bin/mysqld_safe &

Check your error log file to keep abreast of any issues that might arise.
Some house keeping is needed to ensure that MySQL will start a boot and also adding mysql into the path. These are basic Linux tasks. Please let me know if you'd like to see my recommendations for these tasks.

* This command is going to create your datadir location. This might not fit your preferences so this is something that you will choose to include or omit. You should review your my.cnf and make any changes to accommodate your desired location.
** This will copy a default my.cnf to the preferred my.cnf location. If you have written your own or have something you wish to use, copy that and not the example file. Your my.cnf is a pretty big deal as it's going configure your server to run like a two-legged dog or Usain Bolt!
*** Enables the 'service mysql [start|stop|status]' command to be executed
**** These parameters can be augmented, omitted or kept. You're going to want to use the values in your my.cnf or change your my.cnf to reflect what you use here.

Friday, 2 July 2010

South West UK MySQL User Group interest...anyone?

I recently found out that there's a MySQL User Group in London that regularly meet to discuss all things MySQL. I found out when I attended the MySQL Breakfast Seminar last month on the 24th June 2010 at the Sun Customer Briefing Centre on King William Street, London. I have since visited the MySQL User Group Facebook page and it seems that there's a nice buzz on there from community members and MySQL employees...sorry, Oracle Employees.

Due to a missing South West UK string to the User Group bow, is there any interest in starting one up? We could begin with at least a Facebook page with some South West flavoured buzz. Future visions of meets and maybe even MySQL celebrity visits could occur one day!

Good idea? Bad idea?