Centos installs mariadb with Yum

Source: Internet
Author: User

1, in/etc/yum.repos.d/under the establishment of MARIADB.REPO, the contents are as follows:
[Email protected] etc]$ CD/ETC/YUM.REPOS.D [[email protected] yum.repos.d]$ VI Mariadb.repo

Copy the following content:

# 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 relevant information here.

2. Install mariadb with Yum
[email protected] yum.repos.d]$ sudo yum-y install mariadb-client mariadb-server mariadb-devel
3. Start the database
[[email protected] yum.repos.d]$ sudo service MySQL start
4, change the root password
[Email protected] yum.repos.d]$ mysqladmin-u root password ' passwd '
5. Configure remote access, MARIADB for security purposes, bind IP (127.0.0.1) by default.
[Email protected] 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 servercopyright (c) $, Oracle, Monty progr Am Ab and others. Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement. MariaDB [(None)]>grant all privileges on * * to ' root ' @ '% ' identified by ' passwd ' with GRANT OPTION; MariaDB [(None)]> flush privileges;

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

GRANT all privileges on * * to [e-mail protected] "172.168.193.25" identified by "root";

The second sentence reloads the permission data from the grant table in the MySQL database. Because MySQL puts permissions in the cache, it needs to be reloaded after the changes have been made.

6. If the system's firewall is on (or behind a hardware firewall or NAT) You must release the TCP port used by MySQL, usually 3306.7, Case sensitive

After logging in with the root account, add Lower_case_table_names=1 and restart the MySQL service after [mysqld] in/etc/my.cnf, then the success is set: The case of the table name is not distinguished;

Where 0: Case sensitive, 1: Case insensitive

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.