Ehel installing the MySQL binary package

Source: Internet
Author: User

Packet Naming format interpretation mysql-5.7.15-linux-glibc2.5-x86_64.tar.gz Black Bold indicates that the package name blue indicates that the Linux system binary package red represents the frame   1, upload mysql-5.7.15-linux-glibc2.5-x86_64. tar.gz to the server, you can use the wget official download, or use FTP to upload the pre-downloaded to the server. and install the dependency package  yum install LIBAIO  2, create MySQL user and MySQL user group, do not allow shell login.  groupadd mysqluseradd mysql-g mysqlusermod mysql-s/bin/nologin 3, decompression mysql-5.7.15-linux-glibc2.5-x86_64. tar.gz to the specified directory/usr/local/mysql/, do not have this folder please first build this MySQL folder with mkdir   tar-zxvf mysql-5.7.15-linux-glibc2.5-x86_ 64.tar.gz-c/usr/local/mysql/ 4, grant all MySQL folder permissions to the MySQL user   [[email protected] mysql]# chown-r Mysql:mysql. /MYSQL   5, create related directory  [[email protected] etc]# cd/data/[[email protected] data]# mkdir Mysql[[email protected] data]# chown mysql:mysql mysql/ 6, modify the/etc/my.cnf configuration file, the first system comes with MY.CNF, this recommendation mv/etc/ My.cnf/etc/my.cnf.back backup, copy [[email protected] mysql]# CP support-files/my-default.cnf/etc/my.cnf to/ ETC under configuration content   [client] #password = [Your_password] #socket =/usr/local/mysql/mysql.sockdefault-character-set= Utf8 [mysqld]user = Mysqlport = 3306socket =/usr/local/mysql/mysql.sockback_log = 120max_connections = 3000ma X_connect_errors = 30max_allowed_packet = 32mbinlog_cache_size = 4mmax_heap_table_size = 128Msort_buffer_size = 16Mjoin_ Buffer_size = 16mquery_cache_size = 128mquery_cache_limit = 4mft_min_word_len = 8transaction_isolation = Repeatable-readkey_buffer_size = 128mread_buffer_size = 8mskip_name_resolve = 1basedir =/usr/local/mysqldatadir =/data /mysqltmpdir =/tmplog_error = Error.logdefault-storage-engine = Innodbcharacter-set-server = Utf8collation-server = Utf8_general_ciserver-id = 1 [mysql]no-auto-rehash  7, initializes the database, and changes the root user password./bin/mysqld--initialize-- Datadir=/data/mysql--user=mysql           #初始化数据库的时候, the last line of output will have a root user's random password, remember this random password, The first time you log in with the root user is the random password. Modify the root user's password before you perform other command operations. If no prompt message appears at the command line, the root random password is in the Error.log error log. The    command is as follows: SET PASSWORD for 'root ' @ ' localhost ' = PASSWORD ('newpassword '); 4. Turn on MySQL service, I am starting with MySQL user. /usr/local/mysql/support-files/mysql.server Start Appendix: 1, Connection database encountered error [[email protected] bin]#./mysql-u root-penter Passwo Rd:error 2002 (HY000): Can ' t connect to local MySQL server through socket '/tmp/mysql.sock ' (2) resolved, establish a soft connection to MYSQL.S in the/tmp directory ock file path [[email protected] tmp]# ln-s/usr/local/mysql/mysql.sock mysql.sock

Ehel installing the MySQL binary package

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.