Install MySQL database under Linux

Source: Internet
Author: User

Download to official website
  • Mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz

    Add MySQL group and MySQL user to set MySQL installation directory file owner and owning group
  • Groupadd MySQL

  • Useradd-r-G MySQL MySQL

    Extract the binaries to the specified installation directory, which we specify as/usr/local
  • cd/usr/local/

  • Tar zxvf mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz

    The name is too long to establish a soft connection
  • Ln-s mysql-5.6.12-linux-glibc2.5-x86_64 MySQL

    Go to the MySQL folder, the directory where MySQL resides, and change the groups and users that belong to it.
  • CD MySQL

  • Chown-r MySQL.

  • Chgrp-r MySQL

    Execute mysql_install_db Script
  • scripts/mysql_install_db--user=mysql

    All files in the mysql/directory except the data/directory are changed back to the root user, and the MySQL user only needs to be the owner of all files in the mysql/data/directory.
  • Chown-r Root.

  • Chown-r MySQL Data

    Copying a configuration file
  • CP SUPPORT-FILES/MY-MEDIUM.CNF/ETC/MY.CNF

    Adding the Mysqld service to the power-on self-boot entry
  • CP Support-files/mysql.server/etc/init.d/mysqld

    Add the Mysqld service to the self-starting service item by using the Chkconfig command.
  • Chkconfig--add mysqld

    To see if a success was added
  • Chkconfig--list mysqld

    Start manually.
  • Service mysqld Start

Problems with remote connection unreachable
Go to the Bin directory:
./mysql-u Root-p
Enter password
Then execute: Use MySQL

Authorization: Grant all privileges on * * to ' root ' @ ' 36.34.90.248 ' identified by ' MyPassword ' with GRANT OPTION;


Install MySQL database under Linux

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.