MySQL and phpMyAdmin Setup

MySQL and phpMyAdmin Setup

sudo yum install mysql
sudo yum install mysql-server
sudo yum install mysql-devel
sudo chgrp -R mysql /var/lib/mysql
sudo chmod -R 770 /var/lib/mysql
sudo service mysqld start
sudo yum install phpmyadmin

# tail -f error.log
2014/03/06 20:11:05 [error] 2833#0: *1 directory index of “/usr/share/phpMyAdmin/” is forbidden, client:, server: localhost, request: “GET / HTTP/1.1”, host: “”

Make sure you have given correct chmod permissions are given to the webuser ( nginx or apache )

2014/03/06 21:29:38 [error] 4559#0: *1 FastCGI sent in stderr: “Primary script unknown” while reading response header from upstream, client:, server: localhost, request: “GET /setup/index.php HTTP/1.1”, upstream: “fastcgi://”, host: “”

Make sure you have uncommented the php scripts section in nginx.conf file.By default its commented out.

 # pass the PHP scripts to FastCGI server listening on

        location ~ \.php$ {
            root           /usr/share/phpMyAdmin;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /usr/share/phpMyAdmin$fastcgi_script_name;
            include        fastcgi_params;

If you get session related errors, make sure your session has got right ownership and correct chmod permissions.

you can provide the access the nginx or apache user.

$ sudo chown nginx /var/lib/php/session

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *