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

Errors:
# tail -f error.log
2014/03/06 20:11:05 [error] 2833#0: *1 directory index of “/usr/share/phpMyAdmin/” is forbidden, client: 216.251.112.134, server: localhost, request: “GET / HTTP/1.1”, host: “ec2-54-244-152-140.us-west-2.compute.amazonaws.com”

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: 216.251.112.134, server: localhost, request: “GET /setup/index.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “ec2-54-244-152-140.us-west-2.compute.amazonaws.com”

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 127.0.0.1:9000

        location ~ \.php$ {
            root           /usr/share/phpMyAdmin;
            fastcgi_pass   127.0.0.1:9000;
            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 *