Linux server running environment Building (iii)--MYSQL database installation

Source: Internet
Author: User

Official website: http://www.mysql.com/

Official website: http://dev.mysql.com/downloads/mysql/

Description: The "Select Platform" select platform option on the official website download page is invalid because it calls the jquery plugin for Google sites (http://ajax.googleapis.com/ajax/libs/jqueryui/ 1.10.3/jquery-ui.min.js), and Google is blocked in mainland China, so click Invalid, if you need to use please fanqiang.

Download link for green version of Linux platform available here (64-bit): http://downloads.mysql.com/archives/get/file/mysql-5.6.22-linux-glibc2.5-x86_64.tar.gz

Installation steps:

1. Download the Linux platform Green version of MySQL and upload it to Linux

2. Unpacking package: Tar zxvf mysql-5.6.22-linux-glibc2.5-x86_64.tar.gz

3. Move the extracted folder to the destination folder and rename it: MV Mysql-5.6.22-linux-glibc2.5-x86_64/usr/local/mysql

4. Go to MySQL main directory: cd/usr/local/mysql

5. Modify the owner and all groups: Chown-r MySQL. and Chgrp-r MySQL.

6. Run the installation script:./scripts/mysql_install_db--user=mysql

7. Modify the owner and all groups again: Chown-r Root. and chown-r MySQL data

8. Run Mysqld_safe:./bin/mysqld_safe--user=mysql &

9. Copy Service file: CP support-files/mysql.server/etc/init.d/mysqld

10. Starting Mysql:service mysqld start

Show "starting MySQL success!" means MySQL start successfully

    • Set a password and turn on remote access

1. Client Access Mysql:./bin/mysql

2. Set Authorization: Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION;

3. Authorization entry into force: FLUSH privileges;

    • Setting the MySQL environment variable

Modify/etc/profile, add at the end:

Export Mysql_home=/usr/local/mysql
Export path= $MYSQL _home/bin: $PATH

Linux server running environment Building (iii)--MYSQL database installation

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.