MySQL Installation under Linux


 * Download the MySQL Community Edition version 5.0 or higher. Look for a rpm file for your linux version.


 * Install the following rpm files:
 * Server
 * Client
 * Shared libraries
 * Headers and libraries

Example of installation:

rpm -i MySQL-server-standard-5.0.22-0.sles9.i586.rpm

You should see the message:

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h ja-webserver password 'new-password' See the manual for more instructions.

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com Can't find program '/usr/bin/mysqlcheck' Please restart with --basedir=mysql-install-directory Starting MySQL                                                      done


 * Change the root password:

$ mysql mysql>SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd'); mysql>SET PASSWORD FOR ''@'ja-webserver' = PASSWORD('newpwd'); mysql>SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd'); mysql>SET PASSWORD FOR 'root'@'ja-webserver' = PASSWORD('newpwd');


 * On Unix, MySQL programs read startup options from the following files:

Filename 	               Purpose /etc/my.cnf 		Global options $MYSQL_HOME/my.cnf 	Server-specific options defaults-extra-file 	The file specified with --defaults-extra-file=path, if any ~/.my.cnf 		User-specific options


 * Copy an appropriated MySQL Configuration File into the . Example:

cp /usr/share/mysql/my-medium.cnf /etc/my.cnf


 * More details can be found in the section Using Option Files.


 * Create a directory for the MySQL databases:

$ mkdir /opt/data/mysqldata/

$ chown -R mysql /opt/data/mysqldata/
 * Change the directory owner to the user mysql:

[mysqld] user=mysql datadir        = /opt/data/mysqldata/ ft_min_word_len=2
 * Change the Data Directory in your . Edit the file and add the following line in the [mysqld] section:
 * 1) Set the default user
 * 1) MySQL data tables directory
 * 1) Allow small words in full-text indexes


 * Shutdown the MySQL server:

$ mysqladmin shutdown or $ mysqladmin shutdown -u root -p


 * Start the MySQL server:

$ mysqld