Install the MySQL source code distribution

王林
Release: 2023-09-02 20:53:06
forward
508 people have browsed it

安装 MySQL 源代码发行版

Let us understand how to install MySQL from source distribution −

Build MySQL from source

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 &
    Copy after login
  • This will create a binary RPM that users can install and use.

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.

    The distribution files must be obtained from one of the sites listed in "Get MySQL". MySQL source code distributions are provided as compressed tar archives.
  • Extract the distribution to the current directory using the following command -
  • shell> rpm −−rebuild MySQL−VERSION.src.rpm
    Copy after login
  • This will create a file called "mysql -VERSION" directory.

    The user must change to the top level directory to unpack the distribution using the following command -
  • shell> gunzip < mysql−VERSION.tar.gz | tar xvf −
    Copy after login
  • The distribution must use the following command Configuring and Compiling −

shell> cd mysql-VERSION
Copy after login
  • 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
Copy after login
  • If you are installing MySQL for the first time, you will need to create the MySQL authorization table -

shell> make install
Copy after login
    Once completed, initialize and test the distribution to make sure everything is working properly.

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!