Centos6.5 installation mariadb-10.0.20-linux-x86_64.tar.gz

Source: Internet
Author: User

  1. Download mariadb:https://downloads.mariadb.org/I choose mariadb-10.0.20-linux-x86_64.tar.gz this version
  2. Copy the installation files/opt directory and unzip to the current directory tar-zxf mariadb-10.0.20-linux-x86_64.tar.gz
  3. Change the extracted file name to MARIADB
  4. Groupadd MySQL
  5. useradd-g MySQL MySQL
  6. Cd/opt/mariadb
  7. Chown-r Mysql:mysql/opt/mariadb/data
  8. Copy the my-medium.cnf under the Mariadb/support-files to the MARIADB directory and change to MY.CNF
  9. ./scripts/mysql_install_db--DEFAULTS-FILE=./MY.CNF//Initialize Database
  10. CP Support-files/mysql.server/etc/rc.d/init.d/mysqld
  11. chmod +x/etc/rc.d/init.d/mysqld
  12. CP SUPPORT-FILES/MY-LARGE.CNF/ETC/MY.CNF
  13. Modify/etc/rc.d/init.d/mysqld
    1. Basedir=/opt/mariadb
    2. Datadir=/opt/mariadb/data
  14. Service mysqld Start
  15. Modify environment variable add mariadb Bin directory edit/etc/profile, add export path= $PATH:/opt/mariadb/bin/
  16. Modify the root user password./bin/mysqladmin-u root password ' 123456 '
  17. Log in to MySQL./bin/mysql-u root-p
  18. To set database permissions:
    1. MySQL [(none)]> use MySQL;
    2. MySQL [mysql]> Update user set host= '% ' where user= ' root ' and host= ' 127.0.0.1 ';
    3. MySQL [mysql]> Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT option;
    4. MySQL [mysql]> flush Privileges;

Centos6.5 installation mariadb-10.0.20-linux-x86_64.tar.gz

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.