First download the phpMyAdmin installation package from the official website.
I seem to be unable to enter the official website, here: http://sourceforge.net/projects/phpmyadmin/
1. Decompress phpMyAdmin to the root directory.
[root@localhost ~]# tarz zxvf phpMyAdmin-3.5.4-all-languages.tar.gz /var/www/html/phpmyadmin
2. Configuration
[root@localhost ~]# cd /var/www/html/phpmyadmin/[root@localhost phpmyadmin]# cp libraries/config.default.php .[root@localhost phpmyadmin]# mv config.default.php config.inc.php[root@localhost phpmyadmin]# vim config.inc.php
Modify the following content:
$cfg['PmaAbsoluteUri'] = 'http://192.168.159.4/phpmyadmin/';$cfg['Servers'][$i]['host'] = '127.0.0.1';$cfg['Servers'][$i]['auth_type'] = 'cookie';
The following two steps solve the problem of phpMyAdmin login failure
3. Modify PHP. ini
[root@localhost ~]# vim /etc/php.inisession.save_path = "/var/lib/php/session"
4. modify the permissions and owner of the session directory:
[root@localhost ~]# chown -R nobody:nobody /var/lib/php/session[root@localhost ~]# chmod 777 /var/lib/php/session
5. Restart the apache service.
Enter http: // 127.0.0.1/PHPmyAdmin/in the browser/
In this case, phpMyAdmin appears on my computer.
403 error: phpMyAdmin 403 you don't have permission to access/PHPmyAdmin/on this server. The solution is as follows:
The information on the internet is said to be a problem with SELinux, So I disabled it but it still didn't work. There is also a saying that the permissions assigned by SELinux to httpd are related to permissions.
Perform the following operations:
1. Modify permissions
2. modify the permissions of phpMyAdmin to obtain the permissions that SELinux assigns to httpd. However, the preceding operations are useless.
3. Add the following content to the HTTP. conf file (my file is in/etc/httpd/CONF:
<Directory “/usr/share/phpmyadmin/”>AllowOverride None Order allow,deny Allow from all </Directory>
Then:
sudo service httpd restart
Then the problem is solved.