Let us understand how to install MySQL from source distribution −
You will need the following tools to build And installing MySQL −
requires GNU to be installed to unpack the distribution. Another 'tar' should be installed to unpack the distribution.
ANSI C compiler.
A good 'make' program. GNU make is recommended Do the following.
shell> configure shell> make shell> make install shell> scripts/mysql_install_db shell> /usr/local/mysql/bin/safe_mysqld &
If the DBI and Msql-MySQL-modules Perl modules have been installed, you can use the bin/mysql_setpermission script to add new users.
Let us know the following steps in detail -
To install the source code distribution, select a directory, unzip the distribution and move it to that directory.
shell> rpm −−rebuild MySQL−VERSION.src.rpm
This will create a file called "mysql -VERSION" directory.
shell> gunzip < mysql−VERSION.tar.gz | tar xvf −
The distribution must use the following command Configuring and Compiling −
shell> cd mysql-VERSION
When running "configure", you can specify certain options. Install everything using the following command and make sure it is running as root -
shell> ./configure −−prefix=/usr/local/mysql shell> make
If you are installing MySQL for the first time, you will need to create the MySQL authorization table -
shell> make install
The above is the detailed content of Install the MySQL source code distribution. For more information, please follow other related articles on the PHP Chinese website!