Support » Localhost Installs » mySQL and local installation

  • I already have Apache 2.47 and PHP 5.5.9 installed and working properly on my Windows 7 64-bit Home Edition computer.

    I would like to install WordPress locally for testing purposes, but I realize I need to setup mySQL first. I’m running into difficulty with this, and can’t wrap my head around it.

    I downloaded the Windows installer: mysql-installer-web-community- I used this to install mySQL server, and mySQL Workbench.

    In php.ini I uncommented extension=php_mysql.dll and restarted Apache.

    That is as far as I’ve been able to get. I know I need to enter the database information in wp-config, but I cannot figure out how to actually create a mySQL database that Apache/PHP can access.

    As of now, if I navigate to localhost/wordpress/index.php I just get the following message: “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”

    Does anyone have some instructions as to how to set up a mySQL DB that Apache/PHP/WP can access?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Good for you, for developing locally rather than on a live production server.

    You also need PhpMyAdmin, which I trust you also downloaded? You can use that tool to create a new database. It serves as the graphical user interface to interact with your mysql database.

    I trust you installed mysql in the same directory as apache? And be sure mysql is running, which, of course, requires admin credentials.

    It’s easier to do all of this local set-up by just auto-installing the software package, XAMPP (which is a WAMP server).

    But an even easier way to set up dev sites on local machine is to use Serverpress’ Desktop Server, which is a great little script that enables you to not only click and install dev sites on the fly, after it handles the install and configuration of a local apache server, but also modifies paths with one click while doing a click/upload to your live server. I do a lot of building and this script enables me to create loads of dev sites without the fuss you are engaging in. (No affiliation with ServerPress/just happy customer.) Just Google it..

    On the other hand, I also have a linode slice where I’ve been mastering setting up of ningx engine, ubuntu and a multi-platform drupal. If you want to really get into server setup, it’s a great place to have as a sandbox. But if you want to get to building a site fast, then I encourage you to take a look at Desktop Server.

    Solution 1:

    Check your php.ini and make sure that you have extension=php_mysql.dll un-commented.

    Solution 2:

    You can use the following library if you do not have mysql_connect enabled but have PDO enabled:

    Create a new file: wp-content/db.php and place this code in it (update your path to mysql with path to your extracted folder):

    $pathToMySQL = 'C:\\xampp\\htdocs\\mysql\\';
    require_once($pathToMySQL . 'MySQL_Definitions.php');
    require_once($pathToMySQL . 'MySQL.php');
    require_once($pathToMySQL . 'MySQL_Functions.php');
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘mySQL and local installation’ is closed to new replies.