How to install phpmyadmin under Linux

  

When installing fedora, select the basic components of the selection, including Appache, mysql, and php, but when we manage the database, there is still a graphical interface is more convenient, so we install ourselves Phpmyadmin is fine, the installation is very simple.

phpMyAdmin is a MySQL management tool that manages MySQL directly from the web.

Suppose your web (web page storage) root directory is /var/www/. Suppose your host web access is like this http://192.168.1.11/

You can install it. To /var/www/phpmyadmin can of course be any subdirectory of /var/www/

Note that this directory name is best known only to the administrator. So we assume /var/www/onlyyouknow

A. First download the latest phpMyAdmin program from the official phpMyAdmin site

http://superb-east.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.11.3-all-languages. Tar.gz

Download phpMyAdmin-2.11.3-all-languages.tar.bz2 to /var/www/

#cd /var/www/

# Wget http://superb-east.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.11.3-all-languages.tar.gz

Of course you can go to your own windows machine, etc. Edit it and upload it to the web server

B. Unzip this file

# tar zxvf phpMyAdmin-2.11.3-all-languages.tar.gz

At this point the path /var/www/phpMyAdmin -2.11.3-all-languages

C. Modify the directory name to /var/www/onlyyoukown

# mv /var/www/phpMyAdmin-2.11.3-all-languages ​​/var /www/onlyyoukown

D. Modify the configuration file

1. Locate the /libraries/config.default.php file (config.default.php is copied to the phpmyadmin directory and renamed to config .inc.php), the file has the following items (2-8) must be configured by themselves, windows with WordPad (do not use Notepad, this is UTF8 encoding) for editing, edit directly with vim under Linux.

2. Find $cfg['PmaAbsoluteUri'] Change to the URL of phpMyAdmin that you will upload to the space

For example: $cfg['PmaAbsoluteUri'] = 'http://192.168.1.11/onlyyouknow/';

3. Find $cfg['Servers'][$i]['host'] = 'localhost'; (usually with default, there are exceptions, you don't have to change it)

4. Find $cfg['Servers'][$i]['auth_type'] = 'config';

Debug with config on your own machine; if you use cookies on the network, here we Since the URL has been added before, it is modified into a cookie. It is recommended to use cookies.

5. Find $cfg['Servers'][$i]['user'] = 'root'; //MySQL user (mysql username, root in your own machine;)

6. Find $cfg['Servers'][$i]['password'] = ''; //MySQL password (mysql user password, your own server is generally the password of mysql user root )

7. Find $cfg['Servers'][$i]['only_db'] = ''; //If set to a db-name, only (you only have one data to set it; If you are on the machine or want to set up the server, then it is recommended to leave blank.

8. Find $cfg['DefaultLang'] = 'zh'; (here is the language of choice, zh means Simplified Chinese, here Don't know if to fill gbk or not)

9. Save after setting

If the "Profiles now need a top secret password (blowfish_secret)", then please use $cfg['blowfish_secret '] = ' '; set the cookie for your website in the equal sign, for example: $cfg['blowfish_secret'] = 'any character'; this is because of your "$cfg['Servers'][$i][ ,null,null,3],'auth_type'] = 'cause' reason.

E.Test

Open the browser, http://192.168.1.11/onlyyoukown/

A little personal opinion

We think it can be from the web Controlling mysql by mysql root user is not a very safe way. So my suggestion is that if it is your own server, when you run out, you can put the phpadmin directory into a directory that the web can't access. When you want to use it, use the whole directory with mv. The command moves back to its original position.

Copyright © Windows knowledge All Rights Reserved