MySQL: Ubuntu 10

Source: Internet
Author: User
Tags gz file

1. Download mysql-5.5.1-linux2.6-i686.tar.gz

 

:Http://dev.mysql.com/downloads/mysql/

 

This is a binary version that has been compiled. It is equivalent to the green version. Http://dev.mysql.com/downloads/mysql/

 

2. Install the SDK according to the installation instructions on the official website.

 

For details, see:Http://dev.mysql.com/doc/mysql-linuxunix-excerpt/5.5/en/binary-installation.html

 

Use superuser Su


A. Add User Group MySQL

 

 Groupadd MySQL 

 

B. Add the user MySQL and put it in the MySQL group.

 

Useradd-r-g MySQL 

 

C. Enter the/user/local directory.

 

CD/user/local 


D. decompress the downloaded MySQL file to the appropriate directory and place it under the/user/local directory.

 

Tar-zxvf mysql-5.5.11-linux2.6-i686.tar.gz 

 

After decompression, you can delete the mysql-5.5.11-linux2.6-i686.tar.gz file or move it to another directory. This is mainly to save disk space!

 

E. Create a soft link

 

Ln-s mysql-5.5.11-linux2.6-i686 MySQL 

 

The mysql-5.5.11-linux2.6-i686 is the folder just extracted.

In this way, a MySQL folder with arrows will be added under the/user/local directory. As follows:

 

 

Benefits: you can upgrade MySQL later. After downloading it directly, you can use the new MySQL version with a soft link.

 

F. Enter the MySQL directory, that is, the arrow above.


CD MySQL 


G. Change user and group permissions


Chown-r mysql. <br/> chgrp-r MySQL. 

Note: click "." Next to it to indicate the current path. It cannot be left blank!

At this time, LS-L shows that the group and user become MySQL

 

H. initialize the database

 

Scripts/mysql_install_db -- user = MySQL 

 

This step of installation is prone to many errors!

Note:

<1> make sure that the my. CNF and MySQL folders are not in the/etc/directory. If yes, delete it. If you are afraid of system errors, back them up and delete them!

<2> make sure libaio1.so is installed. If not, run sudo apt-Get install libaio1.

OK. If there are other strange errors, go to Google to find the cause.


I. Modify permissions

 

Chown-r root. <br/> chown-r Mysql Data 

 

J. Optional. Do it. There are many. CNF files under the support-files file. You can select different file clips Based on the machine configuration.

 

# Next command is optional <br/> shell> CP support-files/The my-medium.cnf/etc/My. CNF 

 

K. Optional. recommended.


# Next command is optional <br/> CP support-files/MySQL. Server/etc/init. d/MySQL. Server 

 

L. Enter the bin directory and start MySQL

 

Bin/mysqld_safe -- user = MySQL & 

Verify that MySQL is started.

Netstat-anp | more 

Check whether port 3306 is enabled.

 

M. use MySQL and enter the password. You can also press Enter. The default password is null.

 

CD bin <br/>./MySQL-u root-P 

 

OK. The installation of MySQL in Ubuntu is complete. The usage of MySQL is still to be learned.

 

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.