# Setting up MySQL locally

**URL:** <https://forum.kirupa.com/t/setting-up-mysql-locally/280249>\
**Category:** programming\
**Created:** [January 24, 2009, 11:10pm UTC](https://forum.kirupa.com/t/setting-up-mysql-locally/280249 "2009-01-24T23:10:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![riveroaks](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@riveroaks](https://forum.kirupa.com/u/riveroaks)\
**Post date:** [January 24, 2009, 11:10pm UTC](https://forum.kirupa.com/t/setting-up-mysql-locally/280249/1 "2009-01-24T23:10:04Z")

</div>

I have an apache server currently running php on my local machine. I had MySQL set up too but I forgot my login info - therefore I uninstalled it and re-installed it.

Now the MySQL database itself seems to be working, but php can’t talk to MySQL. When I try to run phpMyAdmin I get

“Cannot load mysql extension. Please check your PHP configuration.”

My file structure is as follows:  
Root Apache Folder: c:/WebServer/  
Root PHP Folder: c:/WebServer/PHP/  
Root MySQL Folder: c:/WebServer/MySQL/

I have php.ini in my Windows directory, and it contains the following line:  
; Directory in which the loadable extensions (modules) reside.  
extension\_dir = “c:\WebServer\PHP\ext”

Does anyone see why PHP can’t find the MySQL extension? I’m running PHP 5.2.6 and MySQL 5.1.

Thanks.
