Brief description of MariaDB and simple deployment of binary packages

   MySQL was originally developed by Michael Widenius, but soon after Mr. Michael sold MySQL to SUN for $1 billion, SUN was acquired by Oracle. Mr. Michael, fearing that MySQL would be closed-source in the future, built a new project named after his daughter Maria. —— MariaDB, MariaDB's default storage engine is Maria, not MyISAM. Maria can support transactions, but transaction support is not turned on by default because transaction support has an impact on performance. The following statement can be used to convert to a Transaction-Supporting Maria Engine. ALTER TABLE `tablename` ENGINE=MARIA TRANSACTIONAL=1; as a branch of MySQL, it is completely compatible with everything in MySQL and even improved on the basis of MySQL. If migrating from MySQL to MariaDB is very simple, the compatibility points of the two are as follows:

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

2. All client API s, protocols and structures are identical.

3. All file names, binaries, paths, ports, etc. are identical

4. All MySQL connectors, such as PHP, Perl, Python, Java,. NET, MyODBC, Ruby and MySQL C connector, remain unchanged in MariDB, which means that no major changes to existing code are required.

5. mysql-client package can also run normally in MariDB server

6. Shared client library is binary compatible with MySQL

It's easy to migrate data from MySQL to MariaDB, so under the simple deployment and installation of MariaDB, go to MariaDB's official website first. https://downloads.mariadb.org Find out the latest stable version, of course, this time in order to quickly deploy directly using binary packages for deployment.

[root@bogon src]# groupadd -r mysql
[root@bogon src]# useradd -g mysql -r -s /sbin/nologin mysql#Create User Groups
[root@bogon src]# mkdir -p /usr/local/mariadb#Create basedir
[root@bogon src]# tar -zxvf mariadb-10.2.4-linux-x86_64.tar.gz -C /usr/local/mariadb/
[root@bogon src]# cd /usr/local/mariadb/
[root@bogon mariadb]# mv mariadb-10.2.4-linux-x86_64/* ./;rm -rf mariadb-10.2.4-linux-x86_64/
[root@bogon mariadb]# mkdir -p /data/mariadbdata#Create datadir
[root@bogon mariadb]# chown -R mysql:mysql /usr/local/mariadb/
[root@bogon mariadb]# chown -R mysql:mysql /data/mariadbdata/#Modify subgroup
[root@bogon mariadb]# ./scripts/mysql_install_db --skip-auth-anonymous-user --skip-name-resolve --basedir=/usr/local/mariadb --datadir=/data/mariadbdata --user=mysql
#Initialize the database
[root@bogon mariadb]# vim /etc/man.config#Add man help
...Slightly...
MANPATH /usr/local/mariadb/man
...Slightly...
[root@bogon mariadb]# vim /etc/ld.so.conf.d/mariadb.conf
/usr/local/mariadb/lib
[root@bogon mariadb]# ldconfig#Loading library files into the system
[root@bogon mariadb]# ln -sv include/* /usr/include/#Add C header file to system include
[root@bogon mariadb]# vim /etc/profile.d/mariadb.sh
export PATH=$PATH:/usr/local/mariadb/bin
[root@bogon mariadb]# source /etc/profile.d/mariadb.sh#Add MariaDB's binary path to the environment variable

So the initial deployment and installation of MariaDB is over. In short, it is the same as MySQL. It has been said before that MySQL security measures and password settings, including adding system startup script my.cnf files, can be seen. There is no more elaboration here. http://jim123.blog.51cto.com/4763600/1870863,http://jim123.blog.51cto.com/4763600/1864671 ,http://jim123.blog.51cto.com/4763600/1843243

Keywords: MariaDB MySQL Linux vim

Added by ESCForums.com on Wed, 17 Jul 2019 02:10:21 +0300