{"id":1892,"date":"2012-05-11T21:53:02","date_gmt":"2012-05-11T13:53:02","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=1892"},"modified":"2023-04-28T09:49:19","modified_gmt":"2023-04-28T09:49:19","slug":"how-to-install-phpmyadmin-on-centos-6-2-server","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-phpmyadmin-on-centos-6-2-server\/","title":{"rendered":"How to Install phpMyAdmin on CentOS 6.2 Server"},"content":{"rendered":"<p>phpMyAdmin is a free software written in PHP intended to handle the administration of MySQL over the World Wide Web. It can manage a whole MySQL server (needs &#8211; super user ) and database. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement. In this article, I will explain step how to install phpMyAdmin on CentOS 6.2.<\/p>\n<p><a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-install-httpd-on-centos-6-2\/\" rel=\"nofollow\">How to Install Httpd on CentOS 6.2<\/a><br \/>\n<a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-install-mysql-database-server-on-centos-6-2\/\" rel=\"nofollow\">How to Install MySQL Database Server on CentOS 6.2<\/a><br \/>\n<a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-secure-mysql-database-server\/\" rel=\"nofollow\">How to Secure MySQL Database Server<\/a><\/p>\n<p><strong>1. Install Php :<\/strong><\/p>\n<pre class=\"code\">[root@centos62 ~]# yum install php php-mbstring php-mysql php-pdo php-cli php-common -y<\/pre>\n<p><strong>2. To fix mcrypt not loaded warning on phpMyAdmin later on, kindly install php-mcrypt using the following steps and commands :<\/strong><\/p>\n<pre class=\"code\">[root@centos62 ~]# wget http:\/\/download.fedora.redhat.com\/pub\/epel\/6\/i386\/epel-release-6-5.noarch.rpm\n[root@centos62 ~]# wget http:\/\/ftp.riken.jp\/Linux\/fedora\/epel\/RPM-GPG-KEY-EPEL-6<\/pre>\n<pre class=\"code\">[root@centos62 ~]# rpm --import RPM-GPG-KEY-EPEL-6\n[root@centos62 ~]# rpm -i epel-release-6-5.noarch.rpm<\/pre>\n<pre class=\"code\">[root@centos62 ~]# yum install php-mcrypt -y<\/pre>\n<p><strong>3. Download phpMyAdmin :<\/strong><\/p>\n<pre class=\"code\">[root@centos62 ~]# wget http:\/\/sourceforge.net\/projects\/phpmyadmin\/files\/phpMyAdmin\/3.4.9\/phpMyAdmin-3.4.9-all-languages.tar.gz\n--2012-02-08 19:39:45--  http:\/\/sourceforge.net\/projects\/phpmyadmin\/files\/phpMyAdmin\/3.4.9\/phpMyAdmin-3.4.9-all-languages.tar.gz\/download\nResolving sourceforge.net... 216.34.181.60\nConnecting to sourceforge.net|216.34.181.60|:80... connected.\nHTTP request sent, awaiting response... 302 Found\nLocation: http:\/\/downloads.sourceforge.net\/project\/phpmyadmin\/phpMyAdmin\/3.4.9\/phpMyAdmin-3.4.9-all-languages.tar.gz?r=&amp;ts=1328701188&amp;use_mirror=cdnetworks-kr-1 [following]\n--2012-02-08 19:39:46--  http:\/\/downloads.sourceforge.net\/project\/phpmyadmin\/phpMyAdmin\/3.4.9\/phpMyAdmin-3.4.9-all-languages.tar.gz?r=&amp;ts=1328701188&amp;use_mirror=cdnetworks-kr-1\nResolving downloads.sourceforge.net... 216.34.181.59\nConnecting to downloads.sourceforge.net|216.34.181.59|:80... connected.\nHTTP request sent, awaiting response... 302 Found\nLocation: http:\/\/cdnetworks-kr-1.dl.sourceforge.net\/project\/phpmyadmin\/phpMyAdmin\/3.4.9\/phpMyAdmin-3.4.9-all-languages.tar.gz [following]\n--2012-02-08 19:39:47--  http:\/\/cdnetworks-kr-1.dl.sourceforge.net\/project\/phpmyadmin\/phpMyAdmin\/3.4.9\/phpMyAdmin-3.4.9-all-languages.tar.gz\nResolving cdnetworks-kr-1.dl.sourceforge.net... 211.39.135.162\nConnecting to cdnetworks-kr-1.dl.sourceforge.net|211.39.135.162|:80... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 5763130 (5.5M) [application\/x-gzip]\nSaving to: \u00e2phpMyAdmin-3.4.9-all-languages.tar.gz\u00e2\n\n100%[==========================================================&gt;] 5,763,130   39.4K\/s   in 91s\n\n2012-02-08 19:41:18 (62.2 KB\/s) - \u00e2phpMyAdmin-3.4.9-all-languages.tar.gz\u00e2<\/pre>\n<p><strong>4. Copy phpMyAdmin-3.4.9-all-languages.tar.gz to DocumentRoot and extract the tar file. Make phpMyAdmin-XX executable. Create config folder and make it writable :<\/strong><\/p>\n<pre class=\"code\">[root@centos62 ~]# mv phpMyAdmin-3.4.9-all-languages.tar.gz \/var\/www\/html\/\n[root@centos62 ~]# cd \/var\/www\/html\/\n[root@centos62 html]# tar -xzvf phpMyAdmin-3.4.9-all-languages.tar.gz\n[root@centos62 html]# chmod 655 phpMyAdmin-3.4.9-all-languages\/\n[root@centos62 html]# mv phpMyAdmin-3.4.9-all-languages phpmyadmin\n[root@centos62 html]# cd phpmyadmin<\/pre>\n<p><strong>5. Copy config.sample.inc.php into config.inc.php. config.inc.php will be the main configuration file :<\/strong><\/p>\n<pre class=\"code\">[root@centos62 phpmyadmin]# cp config.sample.inc.php config.inc.php<\/pre>\n<p><strong>6. Create phpmyadmin database :<\/strong><\/p>\n<pre class=\"code\">\nmysql> CREATE DATABASE phpmyadmin;\nQuery OK, 1 row affected (0.00 sec)\n<\/pre>\n<p><strong>7. Create the pma user and give access to databse and tables :<\/strong><\/p>\n<pre class=\"code\">\nmysql> CREATE USER 'pma'@'localhost' IDENTIFIED BY 'pmapassword';\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> GRANT ALL PRIVILEGES ON phpmyadmin.* to pma@localhost;\nQuery OK, 0 rows affected (0.00 sec)\n<\/pre>\n<p><strong>8. Import the create_tables.sql into phpmyadmin database :<\/strong><\/p>\n<pre class=\"code\">\n[root@centos62 ~]# mysql -u pma -p -h localhost phpmyadmin < \/var\/www\/html\/phpmyadmin\/scripts\/create_tables.sql\nEnter password:\n<\/pre>\n<p>Now, the \"phpmyadmin\" database has been created, and also the user \"pma\" exists with that password, that user has all privileges on DB \"phpmyadmin\" and has all privileges on all tables.<\/p>\n<p><strong>9. Edit configuration file as below :<\/strong><\/p>\n<pre class=\"code\">\n[root@centos62 ~]# vi \/var\/www\/html\/phpmyadmin\/config.inc.php\n<\/pre>\n<p>9.1 Modify config.inc.php and add blowfish_secret as below :<\/p>\n<pre class=\"code\">$cfg['blowfish_secret'] = 'blowfish_secret@123'; \/* YOU MUST FILL IN THIS FOR COOKIE AUTH! *\/<\/pre>\n<p>9.2 Please change auth_type to &#8220;cookie&#8221; :<\/p>\n<pre class=\"code\">\n\/* Authentication type *\/\n$cfg['Servers'][$i]['auth_type'] = 'cookie';\n<\/pre>\n<p>9.3 Enable advanced features in configuration file as below. Uncomment the below lines :<\/p>\n<pre class=\"code\">\n\/*\n * phpMyAdmin configuration storage settings.\n *\/\n\n\/* User used to manipulate with storage *\/\n$cfg['Servers'][$i]['controluser'] = 'pma';\n$cfg['Servers'][$i]['controlpass'] = 'pmapassword';\n\n\/* Storage database and tables *\/\n$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';\n$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';\n$cfg['Servers'][$i]['relation'] = 'pma_relation';\n$cfg['Servers'][$i]['table_info'] = 'pma_table_info';\n$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';\n$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';\n$cfg['Servers'][$i]['column_info'] = 'pma_column_info';\n$cfg['Servers'][$i]['history'] = 'pma_history';\n$cfg['Servers'][$i]['tracking'] = 'pma_tracking';\n$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';\n$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';\n\/* Contrib \/ Swekey authentication *\/\n\/\/ $cfg['Servers'][$i]['auth_swekey_config'] = '\/etc\/swekey-pma.conf';\n\n\/*\n * End of servers configuration\n<\/pre>\n<p><strong>10. You can start using phpMyAdmin :<br \/>\n<\/strong><\/p>\n<p>http:\/\/ipaddress\/phpmyadmin<\/p>\n","protected":false},"excerpt":{"rendered":"<p>phpMyAdmin is a free software written in PHP intended to handle the administration of MySQL over the World Wide Web. It can manage a whole MySQL server (needs &#8211; super&#8230;<\/p>\n","protected":false},"author":6,"featured_media":5697,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1008],"tags":[1253,1536,1585,1658],"class_list":["post-1892","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-centos-6-2","tag-linux","tag-mysql","tag-phpmyadmin"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/1892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=1892"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/1892\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/5697"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=1892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=1892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=1892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}