Install MySQL in linux

Source: Internet
Author: User

Install MySQL in linux

Since Oracle has acquired MySQL, the commercial version has also been transferred to the edelivery.oracle.com website. You can download the study by yourself, but you must first register an account for the Oracle website.

 

If you download the GA version, that is, the Community version, you can download it directly at http://dev.mysql.com/downloads/mysql/website.

 

To download the old version of MySQL, you can also find it at http://dev.mysql.com/downloads/mysql/website. Only 5.1.73and 5.5.40 can be downloaded. Users who need it can download it by themselves.

 

 

Note: Only packages installed using rpm are available.

RPM Bundle downloads MySQL-related packages for emergency purposes.

 

 

Download and upload the package to the mysql server. decompress the package and run the rpm command to install the package.

 

Note that the initial mysql password is at/root/. mysql_secret, which is easy to ignore and is used for the First Login by the root user.

 

 

Note that:

After rpm is installed, a mysql group and users are added to the operating system.

 

 

 

 

 

 

 

Initial file directory:

 

 

 

Directory

Contents of Directory

/Usr/bin

Client programs and scripts

/Usr/sbin

TheMysqldServerMySQL

/Var/lib/mysql

Log files, databases

/Usr/share/info

Manual in Info format

/Usr/share/man

Unix manual pages

/Usr/include/mysql

Include (header) files

/Usr/lib/mysql

Libraries

/Usr/share/mysql

Miscellaneous support files, including error messages, character set files, sample configuration files, SQL for database installation

/Usr/share/SQL-Example

Benchmarks

 

 

 

After rpm is installed, you can directly use the service mysql start command to start the mysql database.

 

After the startup, the ps command is used to view its startup options.

 

 

/Usr/sbin/mysqld -- basedir =/usr -- datadir =/var/lib/mysql -- plugin-dir =/usr/lib/mysql/plugin -- user = mysql -- log- error =/var/lib/mysql/mysql01.err -- pid-file =/var/lib/mysql/mysql01.pid

 

-- Basedir =/usr root directory

-- Datadir =/var/lib/mysql data file storage directory

-- Plugin-dir =/usr/lib/mysql/plugin directory

-- User = mysql startup user

-- Log-error =/var/lib/mysql/mysql01.err error log File path

-- Pid-file =/var/lib/mysql/mysql01.pid process id file storage location

 

 

 

The default option is the above. modify it in the/etc/init. d/mysql STARTUP script or my. cnf file.

 

 

The default my. cnf search directory is

$ BASEDIR/my. cnf ----/etc/my. cnf

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.