MySQL Source package installation (for multiple MySQL)

Source: Internet
Author: User
Tags parent directory

1. Install the required packages for the compiled code:Yum List|grep ncurses-develyum-y Install make gcc-c++ cmake bison-devel ncurses-devel 2. Download MySQL 5.6.35wget https://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.35.tar.gzTar zxvf mysql-5.6.35.tar.gzCD mysql-5.6.35 3. Directory Creation (this directory is created if the-P parent directory does not exist)mkdir-p/usr/local/mysql/data 4. Compilingcmake \-dcmake_install_prefix=/usr/local/mysql \-dmysql_datadir=/usr/local/mysql/data \-dsysconfdir=/etc \-dwith_myisam_storage_engine=1 \-dwith_innobase_storage_engine=1 \-dwith_memory_storage_engine=1 \-dwith_readline=1 \-dmysql_unix_addr=/usr/local/mysql/mysql.sock \-dmysql_tcp_port=3307 \-denabled_local_infile=1 \-dwith_partition_storage_engine=1 \-dextra_charsets=all \-ddefault_charset=utf8 \-ddefault_collation=utf8_general_ci5. InstallationMake && make install Make Clean 6. Set Permissionssee if there are MySQL users and user groupscat/etc/passwdCat/etc/groupif not, add MySQL users and GroupsGroupadd MySQLuseradd-g MySQL mysqlModify/usr/local/mysql Permissionschown-r Mysql:mysql/usr/local/mysql 7. Initialize the configurationCd/usr/local/mysqlExecute the initialization configuration script to create the system's own database and tablescripts/mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--user=mysqlcp/usr/local/mysql/support-files my.cnf 8. Start the databaseyou need to specify MY.CNF when booting (the system will find/ETC/MY.CNF by default)/usr/local/mysql/bin/mysqld_safe--defaults-file=/usr/local/mysql/my.cnf--user=mysql & 9. Modify the database password/usr/local/mysql3307/bin/mysql-urootSET PASSWORD = PASSWORD (' Bbgolden ');GRANT All privileges on * * to ' root ' @ '% ' identified by ' Bbgolden ' with GRANT OPTION;flush Privileges;                

MySQL Source package installation (for multiple 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.