CentOS 7.0 uses Yum to install MariaDB and MariaDB simple configuration

Source: Internet
Author: User

Tags: binary app ppa INI process service default 0.00 Anonymous

Long-standing space environment configuration forget almost, today Hollow finishing, reset the disk to rebuild the environment, first installed in CentOS 7.0 MARIADB database, here to record the installation process for later review.

1, installation mariadb

Installation commands

Yum-y Install mariadb Mariadb-server

Installation Complete mariadb, first start mariadb

Systemctl Start mariadb

Set boot up

Systemctl Enable MARIADB

The following is a simple configuration of mariadb


The first is to set the password, you will be prompted to enter the password

Enter current password to root (enter for none): <– First run direct carriage return

Set Password

Set root Password? [y/n] <– whether to set the root user password, enter Y and return or direct enter
New Password: <– Set the root user's password
Re-enter new password: <– Enter the password you set again

Other configurations

Remove anonymous users? [y/n] <– Whether to delete anonymous users, enter

Disallow Root login remotely? [y/n] <– Whether root login is forbidden, enter,

Remove test database and access to it? [y/n] <– Whether to delete the test database, enter

Reload privilege tables now? [y/n] <– whether to reload the permissions table, enter

Initialize MARIADB complete, next Test login



2. Configuring the MARIADB Character Set



Add under the [Mysqld] tab

init_connect= ' Set collation_connection = Utf8_unicode_ci ' init_connect= ' Set NAMES UTF8 ' Character-set-server=utf8 Collation-server=utf8_unicode_ci Skip-character-set-client-handshake



Add in [client]




Add in [MySQL]


Complete configuration, restart MARIADB

Systemctl Restart MARIADB

Then enter MARIADB to view the character set

Mysql> Show variables like "%character%", show variables like "%collation%";

Displayed as

| variable_name | Value |
| character_set_client | UTF8 |
| character_set_connection | UTF8 |
| Character_set_database | UTF8 |
| Character_set_filesystem | binary |
| Character_set_results | UTF8 |
| Character_set_server | UTF8 |
| Character_set_system | UTF8 |
| Character_sets_dir | /usr/share/mysql/charsets/|
8 rows in Set (0.00 sec)

| variable_name | Value |
| collation_connection | Utf8_unicode_ci |
| Collation_database | Utf8_unicode_ci |
| Collation_server | Utf8_unicode_ci |
3 Rows in Set (0.00 sec)

The character set configuration is complete.

3. Add users, set permissions

Create user command

mysql>create user [email protected] identified by ' password ';

Direct creation of user and authorized commands

Mysql>grant all on * * to [e-mail protected] indentified by ' password ';

Grant access to the extranet

Mysql>grant all privileges on * * to [e-mail protected] '% ' identified by ' password ';

Grant permissions and can authorize

Mysql>grant all privileges on * * to [e-mail protected] ' hostname ' identified by ' password ' with GRANT option;

Simple user and permission configuration is basically the case.

Where only partial permissions are granted to change all privileges or all to Select,insert,update,delete,create,drop,index,alter,grant,references,reload, Shutdown,process,file part of it.

Linux System Tutorial: How to check the MARIADB server version http://www.linuxidc.com/Linux/2015-08/122382.htm

Realization of Read and write separation of MariaDB proxy http://www.linuxidc.com/Linux/2014-05/101306.htm

Linux compiler installation Configuration mariadb database method http://www.linuxidc.com/Linux/2014-11/109049.htm

The CentOS system uses Yum to install the MARIADB database http://www.linuxidc.com/Linux/2014-11/109048.htm

Install mariadb and MySQL coexist http://www.linuxidc.com/Linux/2014-11/109047.htm

How to migrate MySQL 5.5 database to MariaDB on Ubuntu http://www.linuxidc.com/Linux/2014-11/109471.htm

[Translate]ubuntu 14.04 (trusty) Server installation MariaDB http://www.linuxidc.com/Linux/2014-12/110048htm

CentOS 7.0 uses Yum to install MariaDB and MariaDB simple configuration

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.

Tags Index: