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