MARIADB installation, uninstallation, and related settings (Linux server MySQL deployment)

Source: Internet
Author: User
Tags configuration settings

First, install MARIADB database on CENTOS7

A. Installation

Yum-y Install mariadb Mariadb-server

B. Start

Systemctl Start mariadb

C. System on self-booting

Systemctl Enable MARIADB

D. Next mariadb simple configuration (can set the root user's password/remote connection and other information)

Mysql_secure_installation

The above configuration method, design to more configuration items, if you do not need too many configuration settings, can also be mysqladmin simple root password settings to log on locally:

mysqladmin-uroot-p password ' 1q2w3e '

The initial root password is empty and the root password is set to 1q2w3e. You can then log on locally mysql-uroot-p1q2w3e.

modifying character sets

Vim/etc/my.conf

[Mysqld]

Datadir=/var/lib/mysql
Socket=/var/lib/mysql/mysql.sock

Character-set-server=utf8
Collation-server=utf8_bin

Second, unload mariadb database on Centos7

A. Query the installed MARIADB components:

[Email protected] logs]# Rpm-qa | grep maria*
Mariadb-server-5.5.49-1.el7.centos.x86_64
Mariadb-common-5.5.49-1.el7.centos.x86_64
Mariadb-client-5.5.49-1.el7.centos.x86_64

B. Unmount the database:

[Email protected] logs]# yum-y Remove mari*

C. Delete the database file:

[Email protected] logs]# rm-rf/var/lib/mysql/*

Third, set up MARIADB database remote connection

First, configure the user to allow access, in an authorized manner to the user rights

1 GRANT all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION;

Description: Root is the user logging into the database, 123456 is the password to log in the database, * means that any source of any host, anyway, is the right to a large appearance.

Finally, you should not forget to make the refresh effective after you configure the permissions:

1 flush privileges;

Once again the visit is ready;

CentOS7 database installation and configuration other essentials: https://www.cnblogs.com/starof/p/4680083.html

MARIADB installation, uninstallation, and related settings (Linux server MySQL deployment)

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.