Jul 03, 2012, by admin
phpMyAdmin allows you to control your MySQL server from a web browser. You can create databases, tables, mysql users, as well as setting privilages for mysql users for particular tables or databases. Here’s how to get started.
1.Have your server set up. Before installing phpMyAdmin, you should have already installed a webserver of your choice. Apache or IIS are solid options.
2.Install php with MySQUL support.
If you haven’t done this already, you can download phpMyAdmin here.
Unpack the downloaded file to webserver Document root. For example, if your webserver is Apache, you’d unpack file the file like so: phpMyAdmin-x.y.z.zip under C:apachehtdocs
Rename the directory. Again, if you were using Apache, you might do this: C:apachehtdocsphpMyAdmin-x.y.z to C:apachehtdocsphpMyAdmin
3.Rename the config. Apache example: C:apachehtdocsphpMyAdminconfig.sample.inc.php to ‘config.inc.php’
For a single-user (root or trusted) environment, update config.inc.php as:
$cfg[‘Server’][$i][‘auth_type’] =’config’;
$cfg[‘Server’][$i][‘user’] = ‘root’;
$cfg[‘Server’][$i][‘password’] = ‘root-password’;
For a multiuser (untrusted) environment, update config.inc.php as:
$cfg[‘Server’][$i][‘auth_type’] =’http’;
$cfg[‘Server’][$i][‘user’] = ‘;
$cfg[‘Server’][$i][‘password’] = ‘;
$cfg[‘Server’][$i][‘controluser] = ‘pma’;
$cfg[‘Server’][$i][‘controlpass’] = ‘pmapass’;
If you have edited config.inc.php for Muti-User(untrusted) environment then go to mysql command prompt and perform the following steps to create mysql user – ‘pma’ identfied by pass ‘pmapass’.
C:…mysqlbin>mysql -u -root -p
mysql>GRANT USAGE ON mysql.* TO ‘pma’@’localhost’ IDENTIFIED BY ‘pmapass’;
mysql>GRANT SELECT ON mysql.db TO ‘pma’@’localhost’;
mysql>GRANT SELECT (Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, ile_priv, Grant_priv, References-priv, Index_priv, Alter_priv, Shut_db_priv, Super_priv, create_tmp_table_priv, Lock_tables_priv, Eecute_priv, Repl_slave_priv, Repl_client_priv) ON mysql.user TO ‘pma’@’localhost’;
mysql>GRANT SELECT (Host,Db, User,Table_name, Table_priv, Column_priv) ON mysql.tables_priv TO ‘pma’@locahost’;
mysql>quit;
If access is performed from localhost, use -> http://localhost/phpMyAdmin/
If access is not performed from localhost, use -> http://[URL of the website]/phpMyAdmin/