Friday, November 27, 2009

Installation of PhpMyAdmin




First thing we need to do is to download the latest phpmyadmin package you can download the package with wget command 
#cd /download
# wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.2.3/phpMyAdmin-3.2.3-all-languages.zip/download

Now we need to move the downloaded package to apache document root directory to make it accessible through web interface.
# mv phpMyAdmin-3.2.2-all-languages.tar.gz /var/www/html/
 Extract the tar.gz file:-
# cd  /var/www/html/
# tar –xvzf phpMyAdmin-3.2.2-all-languages.tar.gz
Rename exracted folder to phpmyadmin. 
# mv phpMyAdmin-3.2.2-all-languages phpmyadmin
Change owner to apache user
# chown –R apache:apache phpmyadmin
# cd phpmyadmin
Now we need to create a config directory temporarily and give write access .
# mkdir config
# chmod 755 config
# cp config.sample.inc.php config/config.inc.php

Open web browser and point to the following URL.
http://192.168.10.2/phpmyadmin/setup
It will open the initial setup page clickon New Server in the Server Section.
Enter Hostname:- localhost # default(localhost)
Server port: 3306 #default(3306)
Server Socket: - /var/lib/mysql/mysql.sock #default (/var/lib/mysql/mysql.sock)
Connection type: tcp
PHP extension to use: Mysqli
Authentication type: cookie
User for config auth: root
Password for config auth: ******* #mysql root password)
Click on the Save button in the Configuration section and close the browser window



Move config.inc.php to phpmyadmin parent directory
# mv config/config.inc.php /var/www/html/phpmyadmin/
Delete the config directory as we don't need this directory anymore
# rm –rf /var/www/html/phpmyadmin/config



Finally phpmyadmin has been  installed, point your browser to the following URL. 
 http://192.168.1.2/phpmyadmin






You should be able to login with your mysql user.





No comments:

Post a Comment

How to Change Mysql Data Directory

Here I am going to move my default mysql data directory (/var/lib/mysql on RHEL5) to a new directory /mysqldata. First, we mu...