Centos7 compilation and installation of MySQL5.5

Source: Internet
Author: User

Centos7 compilation and installation of MySQL5.5

Disable Firewall

SystemctlstopfirewallSetenforce0

Check whether MySQL is installed

rpm-qa|grepmysql[Root @ localhost ~] # Rpm-qa | grepmariadbcentos7 default databasemariadb-libs-5.5.44-1.el7_1.x86_64[Root @ localhost ~] # Rpm-e -- nodepsmariadb-libs-5.5.44-1.el7_1 force uninstall

Install the package required for compiling code

[root@localhost~]#yum-yinstallmakegcc-c++cmakebison-develncurses-devellibaiolibaio-develperl-Data-Dumpernet-tools

Decompress and install

[root@localhost~]#tarzxfmysql-5.5.17.tar.gz[root@localhost~]#cdmysql-5.5.17/[root@localhostmysql-5.5.17]#cmake\>-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=/var/lib/mysql/mysql.sock\>-DMYSQL_TCP_PORT=3306\>-DENABLED_LOCAL_INFILE=1\>-DWITH_PARTITION_STORAGE_ENGINE=1\>-DEXTRA_CHARSETS=all\>-DDEFAULT_CHARSET=utf8\>-DDEFAULT_COLLATION=utf8_general_ci[root@localhostmysql-5.5.17]#make&&makeinstall

Create a MySQL user group and user

[root@localhostmysql-5.5.17]#groupaddmysql[root@localhostmysql-5.5.17]#useradd-gmysqlmysqlModify mysql Directory Permissions[root@localhostmysql-5.5.17]#chown-Rmysql:mysql/usr/local/mysqlStart mysqlCopy an object[root@localhostmysql-5.5.17]#cpsupport-files/mysql.server/etc/init.d/mysql[Root@localhostmysql-5.5.17] # chkconfigmysqlon # boot[Root@localhostmysql-5.5.17] # servicemysqlstart # Start mysqlStartingMySQL...SUCCESS!Netstat-lnp | grep3306 # Check Port

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.