Install config MySQL on Ubuntu linux

Source: Internet
Author: User

First, Installation:

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.

After testing, the connection is always unsuccessful. Finally directly to the official website download mysql APT Repository (mysql-apt-config_0.2.1-1ubuntu14.04_all.deb), then installs, can succeed, URL: http://dev.mysql.com/ downloads/repo/apt/

Then execute the following command:

1#1according to different versions of Linux, different packages2#For example, forVersion1.5of the package forDebian7.0, the command is:3 sudoDpkg-i Mysql-apt-config_0.1.5-1debian7_all.deb4#For version1.5of the package forUbuntu12.04LTS, the command is:5 sudoDpkg-i Mysql-apt-config_0.1.5-1ubuntu12.04_all.deb6#For version1.5of the package forUbuntu14.04LTS, the command is:7 sudoDpkg-i Mysql-apt-config_0.1.5-1ubuntu14.04_all.deb8 9#2, updateTen sudoapt-Get update One  A#3, installation - sudoApt-getInstallMysql-server

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 '

Install config MySQL on Ubuntu 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.