Build and install mariadb under CentOS

Source: Internet
Author: User
Tags file copy

  1. Download cmakehttps://cmake.org/download/

  2. Unzip the filetar -zxvf cmake-3.6.0-rc3.tar.gz

  3. Installing GCCyum install gcc-c++

  4. Switch to the CMake directorycd cmake-3.6.0-rc3

  5. Execute Configure File./configure

  6. Installationmake && make install

  7. Download mariadbhttps://downloads.mariadb.org/mariadb/

  8. Unzip the filetar -zxvf mariadb-10.1.14.tar.gz

  9. Switch to the MARIADB directorycd mariadb-10.1.14

  10. Create MySQL user groups and users


    Groupadd mysqluseradd-g MySQL MySQL


  11. Creating the installation directory and data directory


    Mkdir/usr/local/mariadbmkdir/usr/local/mariadb/datachown-r mysql:mysql/usr/local/mariadb


  12. Installing Ncurses-develyum install ncurses-devel

  13. Compilecmake -DCMAKE_INSTALL_PREFIX=/usr/local/mariadb -DMYSQL_DATADIR=/usr/local/mariadb/data -DMYSQL_USER=mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

  14. Installationmake && make install

  15. Delete old configuration file copy new file


    Rm-f/etc/my.cnfcp/usr/local/mariadb/support-files/my-large.cnf/etc/my.cnf


  16. Initializing the database


    /usr/local/mariadb/scripts/mysql_install_db--user=mysql--basedir=/usr/local/mariadb--datadir=/usr/local/ Mariadb/data


  17. Adding environment variables

    • Run the command to open the system filevi /etc/profile

    • At the end add


      Mysql_home=/usr/local/mariadbpath= $MYSQL _home/bin: $PATHexport PATH


MARIADB boot from Cp/usr/local/mariadb/support-files/mysql.server/etc/init.d/mysqldchkconfig--add mysqld

This article from "Programming" blog, declined reprint!

Build and install mariadb under CentOS

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.