Home  >  Article  >  Database  >  How to configure phpmyadmin on the server

How to configure phpmyadmin on the server

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-12-10 13:10:512693browse

How to configure phpmyadmin on the server

If you use php and mysql to develop a website, phpmyadmin is a very friendly mysql management tool, and it is free and open source. Many domestic virtual hosts come with such management tools, and the configuration is very simple. Next, configure phpmyadmin on the Linux server to manage the MySQL database.

First visit the homepage of the phpmyadmin official website, the URL is: http://www.phpmyadmin.net/. After entering, there is a download button. Do not download it yet, because the download is a zip package for windows. Click Download on the navigation bar. Link, enter the download interface, download the latest version 4.5.5.1 here, select the version shown in the picture to download:

How to configure phpmyadmin on the server

Download and upload to the server, then Execute the following command to decompress:

tar -xvzf phpMyAdmin-4.5.5.1-all-languages.tar.gz

After the decompression is completed, we put it in a directory that can be accessed by the web for subsequent management, such as /home/wwwroot

mv phpMyAdmin-4.5.5.1-all-languages /home/wwwroot/

Then execute cd /home /wwwroot/ Then rename the phpmyadmin directory, trying not to let others guess the entrance, for example:

mv phpMyAdmin-4.5.5.1-all-languages phpmyAdmina4689f

Then execute cd phpmyAdmina4689f to enter the installation directory. The latest version of phpmyadmin supports quick configuration without executing the installation script. Officially Quick installation Chinese documentation: http://docs.phpmyadmin.net/zh_CN/latest/setup.html#quick-install

At this time, you can see that there is a configuration file in the directory: config.sample.inc. php

Copy this file:

cp config.sample.inc.php config.inc.php

Then execute the edit:

vim config.inc.php

Find the $cfg['blowfish_secret'] configuration item, followed by The default is empty. Here we can set a complex string at will for encryption:

How to configure phpmyadmin on the server

Then $cfg['Servers'][$i]['auth_type ']This item defaults to cookie, which means you need to log in every time. We don't need to modify it. This is safer. Then $cfg['Servers'][$i]['host'] = '127.0.0.1'; it is recommended here If it is set to an IP address, there will be no problem with mysql authorization whether it is local or remote. The default localhost may cause errors such as #2002 - Permission denied — The server is not responding. You must pay attention to it. It is recommended to use an IP address.

How to configure phpmyadmin on the server

If you are debugging locally, then set it to config here, and then fill in the user name and password here. It will automatically enter every time, which is more convenient for debugging.

The overall thing is to set the above login authentication type and IP address. After the settings are completed, save and exit, and then access our phpmyadmin directory address through the web. For example, put it under www.xxxx.com, then At this time we need to visit: http://www.xxxx.com/phpmyAdmina4689f. Note that the Linux server is strictly case-sensitive. When you see the login interface, phpmyadmin is configured.

How to configure phpmyadmin on the server

PHP Chinese website has a large number of free phpmyadmin introductory tutorials, everyone is welcome to learn!

The above is the detailed content of How to configure phpmyadmin on the server. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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