Install MySQL 5.5.11 in Linux

Source: Internet
Author: User

1. First install a Library:

Sudo apt-cache search libaio
Sudo apt-get install libaio-dev

2. Add users and user groups after installation:

Sudo groupadd mysql
Sudo useradd-r-g mysql

3. decompress the mysql package:

Cd local
Sudo tar zvfx service1/mysql-5.5.11-linux2.6-i686.tar.gz

4. Create a soft link:

Sudo ln-s/usr/local/mysql-5.5.11-linux2.6-i686 mysql, at last, you can only log on to/usr/local/mysql/bin/mysql in the directory)

5. Create a mysql user in the database:

Cd mysql
Sudo chown-R mysql.
Sudo chgrp-R mysql.
Sudo scripts/mysql_install_db -- user = mysql
Sudo/usr/local/mysql/scripts/mysql_install_db -- user = mysql

6. Change the user

Chown-R root.
Sudo chown-R root.
Sudo chown-R mysql data

7. Copy an object

Sudo cp-f/usr/local/mysql/support-files/mysql. server/etc/init. d/mysql

Sudo chmod + x/etc/init. d/mysql

8. Add boot start:

Sudo chkconfig -- add mysql

9. Start mysql:

/Etc/init. d/mysql start

10. log on to mysql:

/Usr/local/mysql/bin/mysql-u root-p

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.