MYSQL Tutorial
From WebHostingBuzz Wiki
MySQL is one of the most popular database management software out there. To date there have been more than 100 million recorded downloads which makes it one of the more widely used platforms on the Internet. It is versatile, reliable and freely available under GNU General Public License. MySQL is currently owned and developed by Sun Micro Systems who have also released a paid version of this software called MySQL Enterprise. WebHostingBuzz fully supports MySQL on its servers. Many of the popular scripts are managed by MySQL in conjunction with PHP. You should check out PHP Tutorial section to gain more information about it.
How to install MySQL on a Linux/Unix Web Server?
- GNU gunzip to uncompress the package.
- Use the following commands to start the install. Note that this will use a binary distribution.
shell> groupadd mysql shell> useradd -g mysql mysql shell> cd /usr/local shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf - shell> ln -s full-path-to-mysql-VERSION-OS mysql shell> cd mysql shell> chown -R mysql . shell> chgrp -R mysql . shell> scripts/mysql_install_db --user=mysql shell> chown -R root . shell> chown -R mysql data shell> bin/mysqld_safe --user=mysql &
Here is the procedure in a slightly detailed version:
- You have to add a login user and group for mysqld to run:
shell> groupadd mysql shell> useradd -g mysql mysql
- Next step is to choose a directory you want to unpack this package into for example
shell> cd /usr/local
- Get the MySQL Distribution file.
- To unpack type the following
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf - shell> ln -s full-path-to-mysql-VERSION-OS mysql
- Now change the location into the installation directory:
shell> cd mysql
- If you have unpacked the package as mysql, no action is required however if you did it as root then you need to change the ownership by typing
shell> chown -R mysql . shell> chgrp -R mysql
- If this is your first installation of MySQL you would need to create a directory and also start grant tables. Do the following
shell> scripts/mysql_install_db --user=mysql
If you run it as root, include the --user option else if logged in as that user, you can remove the --user option.
Create or update the grant tables and restart the server manually.
- If you want MySQL to start up automatically when you boot your web server, you can copy support-files/mysql.server to the location where your system has its startup files. You should also read Starting and Stopping MySQL Automatically for more information.
- Set up new accounts using the bin/mysql_setpermission script if you install the DBI and DBD::mysql Perl modules
- To test your MySQL run
shell> bin/mysqld_safe --user=mysql &
Again if you run it as root, include the --user option else if logged in as that user, you can remove the --user option.
Where can I get the complete and comprehensive manual for MySQL?
We recommend you go through Installing MySQL from tar.gz Packages on Other Unix-Like Systems web page to study it further.
References:
http://en.wikipedia.org/wiki/GNU_General_Public_License http://www.mysql.com/products/enterprise/features.html
Web Hosting provider WebHostingBuzz has written this tutorial for its users. You as a visitor are free to link to this website. All trademarks are the property of their respective owners. (c) Copyright WebHostingBuzz.com. All rights reserved.

