Install MySQL in Ubuntu Linux

Source: Internet
Author: User

Three Ways to install:

1. Install sudo apt-get install Mysql-server from the Web. Once the environment variables have been configured automatically, you can use the MySQL command directly.

Note: It is recommended to change the CN in/etc/apt/source.list to us, the U.S. server is much faster than China.

2. Install the offline package, taking mysql-5.0.45-linux-i686-icc-glibc23.tar.gz as an example.

3. Binary Package Installation: The environment variables are configured automatically when the installation is complete, and you can use the MySQL command directly

Online installation and binary package installation is relatively simple, focusing on the installation of offline packages.

1. Groupadd MySQL

2. Mkdir/home/mysql

3. useradd-g mysql-d/home/mysql MySQL

4. Copy mysql-5.0.45-linux-i686-icc-glibc23.tar.gz to/usr/local directory

5. Unzip: Tar zxvf mysql-5.0.45-linux-i686-icc-glibc23.tar.gz

6. Ln-s mysql-5.0.45-linux-i686-icc-glibc23 MySQL

7. Cd/usr/local/mysql

8. chown-r MySQL.

9. chgrp-r MySQL.

scripts/mysql_install_db--user=mysql (Be sure to execute in the MySQL directory, note the output of the text, there are changes to the root password and the command to start MySQL)

11. Set the password for root:./bin/mysqladmin-u root password ' passw0rd '

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.