| Précédent | Table des matière | Suivant |
![]() | ![]() |
You need the following tools to install a MySQL binary distribution:
gunzip to uncompress the distribution.
tar to unpack the distribution. GNU tar is
known to work.
An alternative installation méthode under Linux is to use RPM (RedHat Package Manager) distributions. Confère section 4.6.1 Linux RPM.
If you run into problems, PLEASE ALWAYS USE mysqlbug when
posting questions to mysql@lists.mysql.com. Even if the problem
isn't a bug, mysqlbug gathers system information that will help others
solve your problem. By not using mysqlbug, you lessen the likelihood
of getting a solution to your problem! You will find mysqlbug in the
`bin' directory after you unpack the distribution. Confère section 2.3 Comment rapporter des bugs et des problèmes.
The basic commands you must execute to install and use a MySQL binary distribution are:
shell> gunzip < mysql-VERSION-OS.tar.gz | tar xvf - shell> ln -s mysql-VERSION-OS mysql shell> cd mysql shell> scripts/mysql_install_db shell> bin/safe_mysqld &
You can add new users using the bin/mysql_setpermission script if
you install the DBI and Msql-Mysql-modules Perl modules.
Here follows a more detailed description:
To install a binary distribution, follow the steps below, then proceed to section 4.15 Paramètrage post-installation et tests, for post-installation setup and testing:
root.)
tar
archives and have names like `mysql-VERSION-OS.tar.gz', where
VERSION is a number (e.g., 3.21.15), and OS indicates
the type of operating system for which the distribution is intended (e.g.,
pc-linux-gnu-i586).
shell> gunzip < mysql-VERSION-OS.tar.gz | tar xvf - shell> ln -s mysql-VERSION-OS mysqlThe first command creates a directory named `mysql-VERSION-OS'. The second command makes a symbolic link to that directory. This lets you refer more easily to the installation directory as `/usr/local/mysql'.
shell> cd mysqlYou will find several files and subdirectories in the
mysql directory.
The most important for installation purposes are the `bin' and
`scripts' subdirectories.
PATH environment variable so that your shell finds the MySQL
programs properly.
mysql_install_db script used to initialize
the server access permissions.
mysqlaccess and have the MySQL
distribution in some nonstandard place, you must change the location where
mysqlaccess expects to find the mysql client. Edit the
`bin/mysqlaccess' script at approximately line 18. Search for a line
that looks like this:
$MYSQL = '/usr/local/bin/mysql'; # path to mysql executableChange the path to reflect the location where
mysql actually is
stored on your system. If you do not do this, you will get a broken
pipe error when you run mysqlaccess.
shell> scripts/mysql_install_db
DBI/DBD interface,
see section 4.10 Remarques sur l'installation Perl.
support-files/mysql.server to the location where
your system has its startup files. More information can be found in the
support-files/mysql.server script itself, and in section 4.15.3 Démarrer et arrête MySQL automatiquement.
After everything has been unpacked and installed, you should initialize and test your distribution.
You can start the MySQL server with the following command:
shell> bin/safe_mysqld &
Note that MySQL versions older than 3.22.10 started the
MySQL server when you run mysql_install_db. This is no
longer true!
Confère section 4.15 Paramètrage post-installation et tests.