Friday, February 6, 2009

PHP + MySQL + phpMyAdmin tips

1. If you see mcrypt extension is not installed (Cannot load mcrypt extension.) in phpMyAdmin login page . you need to enable it from PHP's php.ini. (which may be located in C:\PHP\ depends on how you isntalled your PHP package)

Make sure you remove all the remove the semi-colon (;) right in front of them to enable these extension.

;extension=php_gd2.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mysql.dll

you will also need to restart IIS or OS in order to load libmcrypt.dll (mcrypt's dll)
Of course, you will need to make sure you have libmcrypt.dll in your computer.

See more info here-
http://hermawanpurwanto.wordpress.com/2007/08/12/cannot-load-mcrypt-extension-please-check-your-php-configuration-solved/


2. If you see Phpmyadmin White / Blank screen after you type in the account and password:
Solution: There must be a typo in the config.inc.php file. The easier way is to delete it and copy the default config.sample.inc.php again.

Of course, you will need to reset all the config including password.

Reference:
http://www.phpbuilder.com/board/showthread.php?t=10306683


3. In phpMyAdmin, if you see "Create new database: No Privileges", this means your current account does not have enough privilege to create new DB.











Solution:
You can create a new account for phpMyAdmin. For example: pma@localhost

Login to MySQL Console, enter the following commands:

CREATE USER 'pma'@'localhost' IDENTIFIED BY 'your_password';
Flush privileges;
Grant all on *.* to 'pma'@'localhost' identified by 'your_password';
Flush privileges;

Then re-login to phpMyAdmin.


Other good references:
http://www.iis-aid.com/articles/how_to_guides/install_and_configure_phpmyadmin_iis?page=0%2C0
http://www.devarticles.com/c/a/MySQL/Creating-Users-and-Setting-Permissions-in-MySQL/1/
http://www.actionscript.org/forums/showthread.php3?t=39515

No comments:

Post a Comment