Brief introduction to Simple deployment of mariadb and binary packages

Source: Internet
Author: User
Tags table definition

MySQL was originally developed by Michael Widenius, and Sun was acquired by Oracle shortly after Mr. Michael sold MySQL to Sun for $1 billion. In Oracle acquisition Mr. Michael is worried that MySQL will have a closed-source risk in the future, a new project named after his daughter Maria's name--mariadb,mariadb the default storage engine is Maria, not MyISAM. Maria can support transactions, but transaction support is not turned on by default because transactional support has a performance impact. You can convert to the Maria engine that supports transactions by using the following statement. ALTER TABLE ' tablename ' Engine=maria transactional=1; As a branch of MySQL it is fully compatible with MySQL everything even improved on the basis of MySQL, If migrating from MySQL to mariadb is very simple, the compatibility points for both are as follows:

1. Data and table definition files (. frm) are binary compatible

2. All client APIs, protocols, and structures are fully consistent

3, all the file name, binary, path, port, etc. are consistent

4. All MySQL connectors, such as PHP, Perl, Python, Java,. NET, MyODBC, Ruby, and MySQL C connector, remain the same in mariadb, which means there is no need to make big changes to existing code

5, Mysql-client package in the MARIADB server can also run normally

6. The Shared client library is binary compatible with MySQL

So migrating data from MySQL to mariadb is relatively simple, for this mariadb simple deployment installation, first to MARIADB official website https:// Downloads.mariadb.org find the latest stable version, of course, this time for rapid deployment of the direct use of binary package deployment

[[email protected] src]# groupadd -r mysql[[email protected] src]#  useradd -g mysql -r -s /sbin/nologin mysql# Create user groups [[email protected]  src]# mkdir -p /usr/local/mariadb# Creating basedir[[email protected] src]# tar - ZXVF MARIADB-10.2.4-LINUX-X86_64.TAR.GZ -C /USR/LOCAL/MARIADB/[[EMAIL PROTECTED] SRC] # cd /usr/local/mariadb/[[email protected] mariadb]# mv mariadb-10.2.4-linux-x86 _64/* ./;rm -rf mariadb-10.2.4-linux-x86_64/[[email protected] mariadb]# mkdir  -p /data/mariadbdata# Create Datadir[[email protected] mariadb]# chown -r mysql: mysql /usr/local/mariadb/[[email protected] mariadb]# chown -r mysql:mysql  /data/mariadbdata/#修改属组 [[email protected] mariadb]# ./scripts/mysql_install_db -- Skip-auth-anonymous-user --skip-name-resolve --basedir=/usr/local/mariadb --datadir=/data/mariadbdata --user=mysql# Initialize database [[email protected] mariadb]# vim /etc/man.config# Add Man help ... Slightly... Manpath /usr/local/mariadb/man ... Slightly... [[email protected] mariadb]# vim /etc/ld.so.conf.d/mariadb.conf/usr/local/mariadb/lib[[ email protected] mariadb]# ldconfig# loading the library file into the system [[Email protected] mariadb]# ln  -sv include/* /usr/include/#添加C的头文件到系统include中 [[Email protected] mariadb]# vim  /etc/profile.d/mariadb.shexport path= $PATH:/usr/local/mariadb/bin[[email protected]  mariadb]# source /etc/profile.d/mariadb.sh# Add the mariadb binary path to the environment variable

So mariadb initial deployment installation is over, in short, and MySQL is the same, previously said MySQL security and password settings, including adding system startup script my.cnf file These can, need to see, here do not do too much to repeat the HTTP/s jim123.blog.51cto.com/4763600/1870863, http://jim123.blog.51cto.com/4763600/1864671,/http jim123.blog.51cto.com/4763600/1843243

This article from "Technical essay" blog, declined reprint!

Brief introduction to Simple deployment of mariadb and binary packages

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.