To install MySQL, connect to your Virtual Private Server via Telnet or SSH as root and run the following command:

% vinstall mysql

This installation program installs all the necessary files for you to run MySQL.

To start the MySQL daemon from the command prompt, you can do so using the following command:

/usr/local/bin/safe_mysqld --pid-file=/usr/local/var/

The line listed above can be found in a startup script created when MySQL installed. The script is located in the /usr/local/etc/rc.d directory and is called When the server reboots the script will run and start MySQL. The script can also be used to start and stop MySQL at any time by running these commands:

/usr/local/etc/rc.d/ stop  
/usr/local/etc/rc.d/ start  

While the the MySQL daemon is running, the mysql.sock file will be stored in your /tmp directory.

NOTE: After you install MySQL it is not necessary to run the mysql_install_db as described in Section 6.7 of the MySQL manual.

Also, the newest versions of MySQL use different password hashing algorithms than their predecessors. This can cause problems for older scripts, modules, programming languages, and MySQL clients attempting to authenticate using old algorithms. There are two solutions:

  • you can start MySQL (through /usr/local/etc/rc.d/ or command line) with the following flag:

  • you can update the MySQL users' passwords to use the old algorithm with the following MySQL command:

    SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');  

More information about this problem can be found at the MySQL website:

The mysql Client

To use the mysql client, connect to your server via Telnet or SSH and type:

% /usr/local/bin/mysql -u root

This command will start the MySQL client as the root user. You can add more users by following the directions in the MySQL Reference Manual:

The MySQL client is designed to be able to report errors in numerous languages. While this does not affect the way you use MySQL, having the error messages in your native language could make understanding the errors easier. For more information, see the following:

To make starting MySQL easier, you can create a file with all your start-up options instead of having to type in all the different flags at the command prompt. To do this, create a file in your ~/etc/ directory called my.cnf. The contents of the file would look like this if you wanted MySQL to report error messages in Japanese:

language = japanese
default-character-set = ujis


Manpages are available and can be accessed by typing the following during a telnet or SSH session with your Virtual Private Server:

% man -M $HOME/usr/local/mysql/man mysql

There is also a considerable volume of documentation on the MySQL web site:

Please note: the information on this page applies to ITS web hosting plans. It may or may not apply to other environments. If you are looking for a feature described here, or better support from your hosting provider, please consider hosting your site with ITS!

1555 N Naperville/Wheaton Road, Suite 107
Naperville, IL 60563
phone 630.420.2550
fax 630.420.2771