Showing posts with label Wordpress. Show all posts
Showing posts with label Wordpress. Show all posts

Friday, May 11, 2012

Installing Wordpress on Windows Using Remote Database Server

I got Wordpress installed on a Windows Server following the instruction in the post: Installing Wordpress on Windows.

My Wordpress site is on a Virtual Machine while the database server is on a physical machine connected via a private LAN.   Since the mySQL database server is one another machine, I have to choose Remote Database option for the installation.

The installation when fine but when I access the site, I  got an error message saying it couldn't login to the database.  I checked the database and I can see the database has been created and the user has permission but the thing is, the user permission wasn't properly setup.  The scope has been limited to "localhost" and as the result the connection from the VM got denied.

Easy fix, I thought.  I proceed to change the scope to the grant access from remote machine.  But that didn't help either.  My next action was to check the database itself and I can see that it has already been created.  Looking into the tables, I see none.  So apparently, during the installation, the root password was asked but the installer did not use it to create tables and instead, the wordpress user account is used to create them instead and since remote connection wasn't allowed, it couldn't login to create the table so the database is empty.

Bottom line is changing the scope to allow for remote connection on the wordpressuser account don't work.  I tried creating the user before the installation, but that didn't work either since a new one with the same scope showed up and ruin the party.

So I decided to use the root account/password to install it instead of creating a new user and things went well.  My site was up and running in less than 30 seconds.  But now my site is running with the root password which didn't sound good.

Poking around in the wordpress folder, I found a file called wp-config.php.  This file contains the database settings among other things.  I locate the database user, get rid of the root user and replace it with the one I created for the site.

Now I got Wordpress running on a less privileged account.  If you are having issue installing Wordpress on Windows using a remote database server, I hope this blog helps you.

Installing Wordpress on Windows

So I decided to use Wordpress as the blogging platform and since I am more comfortable getting around in Windows environment, I decided to install Wordpress on Windows.  There are a few ways to get it installed on Windows but the quickest and easiest way (or so they say) is to use the Microsoft Web Platform Installer.

Just follow these steps:
  1.  Launch Microsoft Web Platform Installer
  2. Click on Applications (at the top)
  3. Click Add button on the Wordpress item
  4. Finally, click Install button at the bottom of the screen
The installer will ask you a few questions regarding the database, username and server name... Then it will proceed with the installation in a few seconds.  When the installation is finised, it will give you a like that will take you to the Admin area where you can configure an Admin account and customize your wordpress site.

That should be it.  You should have a wordpress site running on a Windows server now unless you are like me... using a another server for database storage run into some other errors.

If you do run into an issue using remote database server then check out this post: Installing Wordpress on Windows Using Remote Database Server.