Linux installation MySQL

Source: Internet
Author: User

1. Unzip the MySQL package to/usr/local/mysql

TAR-XVF mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz

2. Create a MySQL user

[[Email protected] ~] #groupadd-R MySQL
[Email protected] ~]# useradd-g mysql-r-s/sbin/nologin-m-d/usr/local/mysql MySQL
[Email protected] ~]# chown-r mysql:mysql/usr/local/mysql
3. Initialize MySQL
scripts/mysql_install_db--user=mysql--datadir=/usr/local/mysql/mysqldata
ls/usr/local/mysql/mysqldata/#查看 Data Directory with file description successful initialization
4. Set up the start-up service
CP Support-files/mysql.server/etc/init.d/mysqld
Chkconfig--add mysqld
Chkconfig mysqld on
Chkconfig mysqld--list

5, set allow remote login MySQL

GRANT all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION;
FLUSH privileges;

6. View the number of database tables

SELECT COUNT (table_name) from INFORMATION_SCHEMA. TABLES WHERE table_schema= ' Sgerpexam '

7. mysql settings are case-sensitive

Vi/usr/local/mysql/my.cnf

Lower_case_table_names = 1 #0区分大小写 1 case insensitive

Linux installation MySQL

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.