Deployment CentOS Installation mariadb

Source: Internet
Author: User

Environment

Virtual machine: VMWare10.0.1 build-1379776

Operating system: CentOS7 64-bit

Steps

1, add MariaDB of the Yum Warehouse source, /etc/yum.repos.d/ under the establishment of the Mariadb.repo file, the contents of the file can be https://downloads.mariadb.org/mariadb/repositories/ Select your own system version and MARIADB version, this article selected mariadb5.5:

5.5 utc#-Geneva: +  http://mariadb.org/ mariadb/repositories/== http://yum.mariadb.org/5.5/centos7-amd64 Gpgkey=https://yum.mariadb.org/rpm-gpg-key-mariadbgpgcheck=1

2, the use of Yum installation, long wait.

sudo Yum Install Mariadb-client Mariadb-server Mariadb-devel

3. Start the database

sudo service MySQL start

4. Log in to the local database using MySQL (no password by default)

Mysql-u Root

5. Change the root password

 Use MySQL; Update User set Password=password ('root'whereuser=  'root'privileges;
Reset Password

If you forget the root password of MySQL, the steps can help you.

1. Stop the running MYSQLD process

killall -term mysqld

2. Safe mode starts MySQL service (plus & indicates background boot)

Mysqld_safe--skip-grant-tables &

3, after the start can not lose password login MySQL

Mysql-u root-p

4, change the root password, refer to the previous section of step 5

Deployment CentOS Installation mariadb

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.