Solution to installation and configuration problems of MariaDB and phpMyAdmin in CentOS7

Source: Internet
Author: User
First, in CentOS7, mysql installed with yum is changed to mariaDB. at first, I was afraid that phpmyadmin does not support maria, and then I checked it online.

First, in CentOS7, mysql installed with yum is changed to mariaDB. at first, I was afraid that phpmyadmin does not support maria, and then I checked it online.

First, in CentOS7, mysql installed with yum is changed to mariaDB. at first, I was afraid that phpmyadmin does not support maria, and then I checked it online.

To put it few words, first install php, apache server (httpd), and phpmyadmin, because this is relatively simple.

At this point in time, the php version installed by yum is 5.4. This can be viewed through rpm-qa | grep php after installation.

At this point in time, phpmyadmin of the latest version requires php5.5 +. Therefore, you need to download a slightly older version. This is available on the official website.

After httpd is installed, the configuration file is/etc/httpd/conf/httpd. conf, but the root directory is not/var/www/on the Internet, but/var/www/html/. Therefore, place the downloaded and decompressed phpmyadmin folder here, then you can change the name to make it easy to access. Change the folder name to phpmyadmin. Then run service httpd start. Do you think you can access phpmyadmin?

Of course, the system will prompt you 403 forbidden. at this time, go to the configuration file you just mentioned and modify it.


AllowOverride none
Require all denied

Change


AllowOverride none
Order allow, deny
Allow from all

Save and exit, and restart service httpd restart. Open localhost/phpmyadmin in the browser. if selinux interferes with you, you can execute sentenforce 0.

Of course, you may also be prompted to lack mbstring. This only requires yum install php-mbstring.

Then let's talk about mariaDB. First, use yum install mysql to automatically install mariaDB instead of mysql.

After installation, try service mariadb start. In fact, the command in centOS7 should be systemctl start mariadb. service. So do you find that it cannot be enabled?

Okay, check whether your mariaDB is fully installed. run the rpm-qa | grep mariadb command. At that time, I had only two poor packages. In fact, I had to install eight packages:

Mariadb-libs-5.5.44-1.el7_1.x86_64
Mariadb-embedded-5.5.44-1.el7_1.x86_64
Mariadb-5.5.44-1.el7_1.x86_64
Mariadb-bench-5.5.44-1.el7_1.x86_64
Mariadb-embedded-devel-5.5.44-1.el7_1.x86_64
Mariadb-devel-5.5.44-1.el7_1.x86_64
Mariadb-test-5.5.44-1.el7_1.x86_64
Mariadb-server-5.5.44-1.el7_1.x86_64

The version number varies with the installed version. If you find that it is not installed, choose yum install... (In fact, I personally think that test can not be installed, but the complete database seems to have test)

After installing it, run systemctl start mariadb. service again. you will find out why it still doesn't work!

The database storage location and name are not specified. run the command: mysql_install_db -- datadir = "/var/lib/mysql" -- user = "mysql"

It seems that you can finally specify it. But for the first time, don't forget to set a password for your root account: mysqladmin-u root password '123'

This is really a success. You can log on to phpmyadmin with the root and password you just set. Complete.

To view the running status of mariadb, use systemctl status mariadb. service.

The result is as follows:

Linux Tutorial: How to check the MariaDB server version

Implementation of MariaDB Proxy read/write splitting

How to compile and install the MariaDB database in Linux

Install MariaDB database using yum in CentOS

Install MariaDB and MySQL

How to migrate MySQL 5.5 Database to MariaDB 10 on Ubuntu

Install MariaDB on the Ubuntu 14.04 (Trusty) Server

MariaDB details: Click here
MariaDB's: Click here

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.