Home  >  Article  >  php教程  >  Configure phpMyAdmin on Linux server

Configure phpMyAdmin on Linux server

WBOY
WBOYOriginal
2016-09-08 08:29:04993browse

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. The configuration is very simple. Next, configure phpmyadmin on the Linux server to manage 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 the Download link in the navigation bar to enter the download interface. , download the latest version 4.5.5.1 here, select the version shown in the picture to download:

 

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

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

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

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

  Then execute cd /home/wwwroot/ and then rename the phpmyadmin directory, trying not to let others guess the entrance, such as:

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. The official Chinese document for quick installation is available: 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

Make a copy of this file:

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

 Then executive editor:

vim config.inc.php

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

 

  Then $cfg['Servers'][$i]['auth_type'] 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 to set it to an IP address. No matter it is local or remote, as long as mysql authorization is used, there will be no problem. The default localhost may appear #2002 - Permission denied — The server is not responding. Please pay attention to such errors. It is recommended to use IP address

 

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

 The overall process 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 we need to access it at this time : http://www.xxxx.com/phpmyAdmina4689f. Note that the Linux server is strictly case-sensitive. When you see the login interface, phpmyadmin is configured

 

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