Install mysql and linuxmysql in Linux

Source: Internet
Author: User

Install mysql and linuxmysql in Linux

1. decompress 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

[Root @ web ~] # Groupadd-r mysql
[Root @ web ~] # Useradd-g mysql-r-s/sbin/nologin-M-d/usr/local/mysql
[Root @ web ~] # 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/# Check that a file in the data directory indicates that the initialization is successful.
4. Set the startup Service
Cp support-files/mysql. server/etc/init. d/mysqld
Chkconfig -- add mysqld
Chkconfig mysqld on
Chkconfig mysqld -- list

5. set to allow remote logon to mysql

Grant all privileges on *. * TO 'root' @ '%' identified by '000000' 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 case sensitive 1 case insensitive


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: 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.