Home > Database > phpMyAdmin > body text

Detailed explanation of how to build a multi-database server with phpMyAdmin

藏色散人
Release: 2021-08-20 14:53:05
forward
3900 people have browsed it

This article will use the phpmyadmin tutorial column to introduce you to phpMyAdmin's method of building and managing multiple database servers. I hope it will be helpful to friends in need!

phpMyAdmin builds and manages multiple database servers

Environment description:

系统版本    CentOS 6.9 x86_64        
软件版本    nginx-1.12.2        php-5.5.38        phpMyAdmin 4.8.0.1
Copy after login

1. Introduction to phpMyAdmin

phpMyAdmin is a PHP-based, Web-based -Base mode is a MySQL database management tool built on the website host, allowing administrators to use the Web interface to manage the MySQL database. This web interface can be a better way to input complex SQL syntax in a simple way, especially when it comes to importing and exporting large amounts of data. One of the greater advantages is that phpMyAdmin is executed on the web server like other PHP programs, but you can use the HTML pages generated by these programs anywhere, that is, to remotely manage the MySQL database, and easily create, modify, and delete Databases and data tables. You can also use phpMyAdmin to create commonly used PHP syntax to facilitate the correctness of SQL syntax required when writing web pages.

Official website: https://www.phpmyadmin.net

2. Environmental requirements for installing phpMyAdmin

3. Steps

3.1. Compile and install nginx and php. You can refer to the previous blog post. I will not go into details here. However, based on the environmental requirements of phpMyAdmin, the compilation parameters used when compiling php are:

./configure --prefix=/application/php5.5.38 --with-jpeg-dir=/usr/lib64 --with-freetype-dir=/usr/lib64/  --with-curl  --enable-fpm --enable-mbstring  --with-gd    --with-fpm-user=nginx --with-fpm-group=nginx --with-mysqli=mysqlnd --with-mysql-sock=/tmp/mysql.sock --with-openssl --enable-zip
Copy after login

3.2. Configure phpMyAdmin

Put the downloaded phpmyadmin source code package into the nginx site root directory, that is, the html directory, unzip and modify the nginx configuration file, and rename the default phpMyAdmin configuration file cp config.sample.inc.php config.inc. php

3.3. Build the database and perform database creation authorization (refer to the previous blog post)

3.4. Browser access login

4 , Configure phpMyAdmin to manage multiple database servers

Take 10.0.0.51 and 10.0.0.52 as examples

4.1 Install mysql on 10.0.0.52

Set password and log in to mysql

[root@db02 mysql]# mysql -uroot -p123456
Copy after login

Authorize the database to 10.0.0.51

mysql> grant all on *.* to root@'10.0.0.51' identified by '123456';
Copy after login

4.2 Configure db01 with phpMyAdmin installed

vim /application/nginx/html/phpMyAdmin-4.8.0.1-all-languages/config.inc.php  
复制粘贴并修改  
$i++;  
/* Authentication type */  
$cfg['Servers'][$i]['auth_type'] = 'cookie';  
/* Server parameters */  
$cfg['Servers'][$i]['host'] = '10.0.0.52';  
$cfg['Servers'][$i]['compress'] = false;  
$cfg['Servers'][$i]['AllowNoPassword'] = false;
Copy after login

Refresh the page to log in to the 10.0.0.52 database.

The above is the detailed content of Detailed explanation of how to build a multi-database server with phpMyAdmin. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!