Install MySQL under linux as3

Source: Internet
Author: User

The following articles mainly introduce how to install MySQL in the linux operating system. We installed MySQL in the system: linux as3 and MySQL in the environment of mysql-standard-4.0.24-pc-linux-gnu-i686.tar.gz, the following describes how to install MySQL.

System: linux as3

MySQL version: MySQL-standard-4.0.24-pc-linux-gnu-i686.tar.gz

Installation Method: Tarball Installation

MySQL installation path:/usr/local/MySQL

MySQL Installation Process

1. log on to the system as root

2. Copy the downloaded MySQL package to the appropriate location (/usr/lcoal

3. decompress the package

Cd/usr/local # enter the working directory

Tar zxf MySQL-standard-4.0.24-pc-linux-gnu-i686.tar.gz

4. Create a directory connection

Ln-s MySQL-standard-4.0.24-pc-linux-gnu-i686 MySQL

5. Create MySQL users and groups

Groupadd MySQL
Useradd-g MySQL

6. Change the access permission of the MySQL directory.

Chown-R MySQL. # ensure that the current directory is/usr/lcoal/MySQL.
Chgrp-R MySQL.

7. Run the configuration script as a MySQL user

Su-m MySQL # Switch to MySQL user

Cd/usr/local/MySQL # note that after switching the user, the working directory is no longer/usr/local/MySQL. So you have to repeat it.

./Configure # execute the configuration script

8. At this point, the installation has been completed. In some documents, you still need to execute scripts/MySQL_install_db. In fact, this statement is not required because the configure script has already executed this statement. If you execute more statements, an error may occur.

9. Check whether MySQL is successfully installed.

/Usr/local/MySQL/bin/MySQL

If a MySQL prompt is displayed, it indicates that the prompt is successful!

10. automatically enable the MySQL service when the system starts.

Su root # switch back to root user

Cd/usr/local/MySQL

Cp support-files/MySQL. server/etc/init. d/MySQL # copy the msql script file to the startup directory of the system.

Cd/etc/init. d/

Chkconfig -- add MySQL # add MySQL to the startup service list

Chkconfig MySQL on # enable MySQL service automatically when the system starts

The above content is an introduction to installing MySQL in linux.

Related Article

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.