Installing MySQL----ubuntu in a Linux environment

Source: Internet
Author: User

may help the beginner to be larger, with ripe big God gate estimate step is to remember.

The specific installation steps are listed below:
Steps
1, the CD to a path to execute the following command:
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz

2. Unzip the compressed package just downloaded in the current directory
TAR-ZXVF mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz

3, copy the MySQL file to/usr/local/mysql (of course you can specify the other directory)
Cp-r Mysql-5.6.33-linux-glibc2.5-x86_64/usr/local/mysql

4, CD to/usr/local/mysql/data/directory, create a new MySQL directory
mkdir MySQL

5. New users and user groups
Groupadd MySQL
useradd-g MySQL MySQL

6. Set the owner of the directory
Chown-r Mysql:mysql./

7, cd/usr/local/mysql/scripts/
Perform
sudo./mysql_insatll_db--user==mysql--datadir==/usr/local/mysql/data/mysql--basedir=/usr/local/mysql& (must be written so , or you will get an error)

8. sudo cp support-files/mysql.server/etc/init.d/mysqld
9. sudo cp support-files/my-default.cnf/etc/my.cnf
10, sudo chmod 755/etc/init.d/mysqld
11. Edit the Mysqld file
Vi/etc/init.d/mysqld

#修改项
basedir=/usr/local/mysql/
Datadir=/usr/local/mysql/data/mysql

Exit Save

12. Start the service
Service mysqld Start

13. Test Connection
./mysql/bin/mysql-uroot

14. To perform MySQL entry directly under all paths, you need to configure environment variables
Vi/etc/profile

Export paht= $PATH:/usr/local/mysql/bin

Save exit

15, the implementation of Source/etc/profile

Intermediate installation If there is an error, the lack of relevant dependencies, through the APT command to install the '

Installing MySQL----ubuntu in a Linux environment

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.