Install the latest version of phpMyAdmin management tools on CentOS 5

Source: Internet
Author: User
Tags install php mcrypt mysql client phpmyadmin

1, I downloaded is phpmyadmin-3.2.3-all-languages version, this version requires PHP 5.2 or higher version, so you must find ways to upgrade the system with the PHP 5.1 version, the specific operation is to use the system Yum "Test Library" Update PHP to version 5.2, you can refer to http://blog.csdn.net/boyla/archive/2009/11/14/4811511.aspx.

2, in the Apache Http server's home directory/var/www/under the new directory phpMyAdmin, and then in the/etc/httpd/conf.d/directory to create a new profile phpmyadmin.conf, configure the virtual directory, the contents are as follows:


alias/phpmyadmin/"/var/www/phpmyadmin/"

<directory "/var/www/phpmyadmin/" >
Options None
AllowOverride None
Order Allow,deny
Allow from all
</Directory>

3, the phpMyAdmin of the compression package in the local untied (note that the local phpmyadmin/scripts/create_tables.sql script file in the back to use), and uploaded to the/var/www/phpmyadmin/ directory, you can access the URL through the http://192.168.0.33/phpmyadmin/, but the first time the interface has not logged on to display a warning message, "Can not load mcrypt extension, please check your PHP configuration", unhappy. Preliminary judgment is that the missing module is not installed by executing in the system console:

Yum Search MCrypt

Indeed found a module called "Php-mcrypt", and then executed:

Yum Install Php-mcrypt

Prompts for a successful installation. Open the http://192.168.0.33/phpmyadmin/again, but the warning message is still there. Depressed. By executing in the system console:

Php-v

System prompts PHP warning:php Startup:mcrypt:Unable to initialize module

Think carefully about the version mismatch that should be performed by:

Yum Install Php-mcrypt--disablerepo=/*--enablerepo=testing

Sure enough, found that the test library has a matching 5.9.2 version of the same name module, confirm installation, and then visit http://192.168.0.33/phpmyadmin/warning information Incredibly still have, puzzled, through the Php-v check, found that the previous error hint has gone, strange. Another thought. PHP is called by the Apache HTTP server in the form of a module, it may be necessary to restart the Apache HTTP server, perform service httpd restart, and then visit http://192.168.0.33/ phpmyadmin/warning message was gone. Cool. :)

4, in the login interface to enter the MySQL administrator username root, and then enter the password, incredibly successful login, this thought to be further set up, because look at the document needs to configure a config.inc.php, you can manually establish, or through the visit http://192.168.0.33 /phpmyadmin/setup/configuration, it seems that the default configuration is very good, however, login in to discover the system interface hint "did not find the PHP extension mbstring, and you now seem to be using multibyte character sets." phpMyAdmin that do not have mbstring extensions do not split the string correctly, which can produce unexpected results "and, more importantly, a security warning:" The configuration file now requires a phrase password. " It is clear that more work needs to be done.

For the first warning, execute on the console:

Yum Install php-mbstring--disablerepo=/*--enablerepo=testing

Sure enough, there is a PHP version number consistent with the Php-mbstring module, confirmed after installation, and then the Apache Http Server, and then re-enter the system, sure enough the first warning. :)

5, for the second warning, check the phpMyAdmin installation documents, found that the default configuration for the cookie authentication method, the HTTP protocol access needs to encrypt cookies, so to provide a phrase password, Considering my actual situation. Generate a config.inc.php configuration file in the local editor, upload it to the/var/www/phpmyadmin/directory, as follows:

<?php

$i = 0;

* Server:mysql * *
$i + +;
$cfg [' Servers '] [$i] [' verbose '] = ' MySql ';
$cfg [' Servers '] [$i] [' host '] = ' localhost ';
$cfg [' Servers '] [$i] [' port '] = ';
$cfg [' Servers '] [$i] [' socket '] = ';
$cfg [' Servers '] [$i] [' connect_type '] = ' TCP ';
$cfg [' Servers '] [$i] [' extension '] = ' mysqli ';
$cfg [' Servers '] [$i] [' auth_type '] = ' cookie ';
$cfg [' Servers '] [$i] [' user '] = ';
$cfg [' Servers '] [$i] [' password '] = ';
/* End of servers configuration * *

$cfg [' defaultlang '] = ' zh-utf-8 ';
$cfg [' serverdefault '] = 1;
$cfg [' blowfish_secret '] = ' 8a995d909b9382.754a557b ';
$cfg [' uploaddir '] = ';
$cfg [' savedir '] = ';
$cfg [' defaultcharset '] = ' GBK ';

/* User for Advanced features * *
$cfg [' Servers '] [$i] [' pmadb '] = ' phpmyadmin ';
$cfg [' Servers '] [$i] [' controluser '] = ' PMA ';
$cfg [' Servers '] [$i] [' controlpass '] = ' myPass239 ';

/* Advanced phpMyAdmin Features * *
$cfg [' Servers '] [$i] [' bookmarktable '] = ' pma_bookmark ';
$cfg [' Servers '] [$i] [' relation '] = ' pma_relation ';
$cfg [' Servers '] [$i] [' table_info '] = ' pma_table_info ';
$cfg [' Servers '] [$i] [' table_coords '] = ' pma_table_coords ';
$cfg [' Servers '] [$i] [' pdf_pages '] = ' pma_pdf_pages ';
$cfg [' Servers '] [$i] [' column_info '] = ' pma_column_info ';
$cfg [' Servers '] [$i] [' history '] = ' pma_history ';
$cfg [' Servers '] [$i] [' designer_coords '] = ' pma_designer_coords ';
?>

It is noteworthy that the above configuration file localhost, can not be replaced by 127.0.0.1, otherwise there will be error prompts: #2003-can ' t connect to the MySQL server on ' 127.0.0.1 ' (13), do not know why, Although I have executed it through the MySQL client operator: Grant all privileges in *.* to ' root ' @ ' 127.0.0.1 ' identified by ' mypassword# ' with GRANT OPTION, with a view to allowing R An oot user logs on through the 127.0.0.1 host. The result was disappointing. Check the information on the Internet, and later in the server configuration file/etc/my.cnf [mysqld] configuration section added Skip-name-resolve service is still not good. The localhost can only be carried out in the end. :(

6, after logging in, phpMyAdmin or prompted two warnings, one is: The additional features of the linked table has not been activated. To find out why, click here, and the other is: failed to use the control user connection defined in the configuration file. The root cause of these two warnings is that the phpMyAdmin advanced features are set up in the configuration file above, as set in the note/* User for Advanced features//* Advanced phpMyAdmin features *. Specific solutions are as follows:

After entering the phpMyAdmin management interface, the Import function is used to import the phpmyadmin/scripts/create_tables.sql script file which is released locally phpMyAdmin compressed package. After execution, a phpMyAdmin database is generated, and several tables are generated, and then a new user PMA is created, the password is myPass239, and the same configuration file settings as above, you can set the appropriate username and password according to your own situation. , the establishment of the user allows PMA through the localhost host access to the phpMyAdmin database, the user to establish a good, and to the phpMyAdmin database has select,update,insert,delete permissions. It's all OK now. The use of these advanced features of phpMyAdmin remains to be studied, and a further illustration is attached. :)

Related Article

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.