Mysql based on the use of MARIADB installation methods detailed _mysql

Source: Internet
Author: User
Tags anonymous

I used MySQL for the first time in Ubuntu, now with the Linux red Hat branch of the CentOS 7, the installation found that usually used is mariadb to replace MySQL, through the data query found that MARIADB is one of MySQL's branches, A version of the MySQL branch developed by the team led by the founder of MySQL, because MySQL has been increasingly closed and slowly updated by Oracle acquisitions, and many Linux distributions have gradually discarded this popular open-source database, To keep MySQL out of the big Linux distributions due to dissatisfaction with the increasingly closed and slow updating of MySQL after Oracle's takeover, many Linux distributions have gradually abandoned the popular Open-source database and turned to MARIADB, Although PostgreSQL has been used as a direct competitor to MySQL, but the real give its fatal blow seems more like mariadb, and later to the fatal blow to MySQL will also be mariadb.

To go back, we specifically talk about mariadb, in fact, mariadb operation and MySQL operation is basically the same, just based on MySQL performance improvement, the current MARIADB update speed is far beyond the speed of the Oracle team, After all, the founder of MySQL led the team, how not to let people rest assured.

Installation of MARIADB

Linux through

Yum Install mariadb mariadb-server #询问是否要安装, enter Y to install automatically

Basic commands for Mariadbde services

[root@127 ~]# systemctl start mariadb.service #启动MariaDB
[root@127 ~]# systemctl Stop Mariadb.service #停止MariaDB
[root@127 ~]# systemctl restart Mariadb.service #重启MariaDB
[root@127 ~]# Systemctl enable Mariadb.service #设置开机自动启动 [root@127 ~]# systemctl disenable #设置开机自启关闭 mariadb.service

Initialize root password

[root@127 ~]# mysql_secure_installation #为初始化账户root添加密码 note:running All PARTS The This SCRIPT is recommended to all
MARIADB
SERVERS in PRODUCTION use! Please READ each step carefully!
In order to log into mariadb to secure it, we'll need the current password for the
root user. If you have ' ve just installed mariadb, and you
haven ' t set the root password yet, the password'll be blank
Should just press ENTER here.
Enter current password for root (enter for none): Here, fill in the root password, if it is the first time to initialize the password is empty direct hit return (before carriage)
Enter current password for root (enter for none): Here to fill in the root password, if it is the first time to initialize the password is empty direct knock return (after the return of the ↓) OK, successfully used password, MOV
ing on ...
Setting The root password ensures that nobody can log into the mariadb root user without the proper.
You are already have a root password set, so can safely answer ' n '. Change the root password?
[y/n] Y new password: here to fill in the next password re-enter password: here to fill in the duplicate password password updated successfully!
Reloading privilege tables. ...

success! By default, a MARIADB installation has of anonymous user, allowing anyone to log into mariadb without have to have a use R account created for them. This is intended only for testing, and to make the installation go a bit smoother.
You are should remove them before moving into a production environment. Remove anonymous users? [y/n] Y ...
success! Normally, Root should only is allowed to connect from ' localhost '.
This ensures is someone cannot guess at the root password from the network. Disallow root login remotely?[y/n] Y ...
success! By default, MARIADB comes with a database named ' Test ' anyone can access.
This is also intended only for testing, and should are removed before into a moving production. Remove test database and access to it?
[y/n] y-dropping Test Database ... ERROR 1008 (HY000) at line 1:can ' t drop database ' test '; Database doesn ' t exist ... failed! Not critical, keep moving ...-removing privileges on test database ...
success!
Reloading the privilege tables would ensure this all changes made so far would take effect. Reload privilege tables now? [y/n] Y ...
success!
Cleaning up ... All done!
If you have ' ve completed all of the the above steps, your MARIADB installation should now is secure. The for using mariadb!# here indicates that the password was modified successfully

Database Login

[root@127 ~]# Mysql-uroot-proot # mysql-u Here is the username (default is root) & I am the Space &-P Here is the password (default is blank)
 This means that the mariadbwelcome to the MARIADB Monitor has been entered. Commands End With; or \g.
Your mariadb Connection ID
is server version:5.5.50-mariadb mariadb server
Copyright (c), 2016, Oracle, M ARIADB Corporation Ab and others.
Type ' help, ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
# Many commands can be viewed through/h
mariadb [(none)]> here is the entry for the input SQL statement

Above is the installation of MARIADB

The above is a small set of MySQL to introduce the basis of the use of MARIADB installation methods to explain, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

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.