Linux installation MySQL

Source: Internet
Author: User

1. Install the mysql5.6 dependency Pack [[email protected] src]# yum-y install make gcc-c++ cmake bison-devel ncurses-devel libaio[[email& Nbsp;protected] src]# yum install Libaio libaio-devel-y[[email protected] src]# yum install net-tools-y2. Download the compilation package wget Https://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.37-linux-glibc2.12-x86_64.tar.gztar-xvf Mysql-5.6.37-linux-glibc2.12-x86_64.tar.gz3. Copying to the specified directory MV mysql-5.6.37-linux-glibc2.12-x86_64/usr/local/ Mysql4. Create MySQL users and Groups Groupadd mysqluseradd-r-g MySQL mysql-d/usr/local/mysqlpasswd mysql5. Modify Directory Permissions Chown-r mysql:mysql/us R/local/mysql6. Installing the database Su mysql/usr/local/mysql/scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql-- Datadir=/usr/local/mysql/dataexit7. Copying the MySQL configuration file cd/usr/local/mysql/support-filescp my-default.cnf/etc/ My.cnf8. Add system service CP mysql.server/etc/init.d/mysqlchkconfig MySQL on9. Add an environment variable vim/etc/profile add export mysql_home= "/ Usr/local/mysql "Export path=" $PATH: $MYSQL _home/bin "After saving exit, execute the effective code. /etc/profile10. Start Mysqlservice mysql start11. Settings root password mysqladmin-u root password ' 123456 ' 12. Set the default port vi/etc/my.cnf[mysqld]basedir=/usr/local/mysqldatadir=/usr/local/ Mysql/dataport=3306server_id=1socket=/tmp/mysql.sockmax_allowed_packet=4m13. Allow all external links access (optional) mysql-u root- Pmysql command Line Input GRANT all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION; FLUSH privileges;14. Turn off firewall chkconfig iptables offservice iptables stop  

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.