MySQL source code installation method on Linux (Configure)

Source: Internet
Author: User

1. Establish operating system users and groups

[[email protected] ~]# Groupadd MySQL

[[email protected] ~]# useradd-g MySQL MySQL

2, unzip the installation files, into the decompression directory:

[Email protected] mnt]# TAR-ZXVF mysql-5.0.15.tar.gz

[Email protected] mnt]# CD mysql-5.0.15

3. Compile and install MySQL source files:

[Email protected] mysql-5.0.15]#/configure--prefix=/usr/local/mysql5015

[[email protected] mysql-5.0.15]# make && make install

4. Edit the MySQL configuration file

[Email protected] mysql]# pwd

/usr/local/mysql5015/share/mysql

[email protected] mysql]# CP my-medium.cnf/etc/my.cnf

5, initialize the MySQL database (in the data directory to create the system database and system tables,--user that these databases and tables owner is this user):

[Email protected] mysql5015]# bin/mysql_install_db--user=mysql

6. Set Directory Permissions:

[Email protected] mysql5015]# chown-r mysql:mysql. /mysql5015/

7. Start MySQL

[Email protected] mysql]# Bin/mysqld_safe--user=mysql &

[[email protected] ~]# ps-ef|grep MySQL

Root 8654 26893 0 13:09 pts/4 00:00:00/bin/sh bin/mysqld_safe--user=mysql

MySQL 10787 8654 1 13:10 pts/4 00:00:00/usr/local/mysql5015/libexec/mysqld--basedir=/usr/local/mysql5015--datad Ir=/usr/local/mysql5015/var--user=mysql--pid-file=/usr/local/mysql5015/var/faspdev.pid--skip-locking--port= 3306--socket=/tmp/mysql.sock

MySQL source code installation method on Linux (Configure)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.