Tutorial on Yum installation mariadb database in CentOS system

Source: Internet
Author: User
Tags centos


1, under the/etc/yum.repos.d/to establish Mariadb.repo, the contents are as follows:
[Azureuser@mono etc]$ CD/ETC/YUM.REPOS.D
[Azureuser@mono yum.repos.d]$ VI Mariadb.repo

# MARIADB 10.0 CentOS repository list–created 2013-08-23 13:08 UTC
# http://mariadb.org/mariadb/repositories/
[MARIADB]
Name = MARIADB
BaseURL = Http://yum.mariadb.org/10.0/centos6-amd64
Gpgkey=https://yum.mariadb.org/rpm-gpg-key-mariadb
Gpgcheck=1

If it is a different operating system, you can find the information here.

2, the use of Yum installation mariadb
[Azureuser@mono yum.repos.d]$ sudo yum-y install mariadb-client mariadb-server mariadb-devel

3, start the database
[Azureuser@mono yum.repos.d]$ sudo service mysql start

4, modify the password of the root

[Azureuser@mono yum.repos.d]$ mysqladmin-u root password ' passwd '

5, configure remote access, MARIADB for security purposes, bind IP (127.0.0.1) by default.

[Azureuser@mono yum.repos.d]$ mysql-u root-p
Enter Password:
Welcome to the MARIADB Monitor. Commands End With; Or\g.
Your mariadb Connection ID is 4
Server VERSION:10.0.4-MARIADB MARIADB Server

Copyright (c), 2013, Oracle, Monty program Ab and others.

Type ' help, ' or ' \h ' for help. Type ' \c ' to clear the current input statement.

MARIADB [(None)]>grant all privileges in *.* to ' root ' @ '% ' identified by ' passwd ' with GRANT OPTION;

MARIADB [(None)]> flush privileges;

"%" in the first sentence means that any host can log on to the server remotely. If you want to restrict access to only one machine, replace it with the appropriate IP, such as:

GRANT all privileges on *.* to root@ ' 172.168.193.25″identified by ' root ';

The second sentence means reloading the permission data from the grant table in the MySQL database. Because MySQL puts all the permissions in the cache, it needs to be reloaded after the changes are done.

6. If the system's firewall is open (or behind a hardware firewall or NAT) You must release the TCP port that MySQL uses, usually 3306.

7, Case sensitive

Login with root account, add Lower_case_table_names=1 after [mysqld] in/etc/my.cnf, restart MySQL service, then set success: Do not distinguish the case of table name;
Lower_case_table_names parameter Detailed:
Lower_case_table_names = 0
0: Case-sensitive, 1: case-insensitive

Install MARIADB on OS X

http://www.foolegg.com/how-to-setup-a-nginx-mariadb-php-mnmp-server-on-mac-osx/

https://kb.askmonty.org/en/building-mariadb-on-mac-os-x-using-homebrew/

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.