Support » Localhost Installs » Can't access the database.

  • I am trying to install wordpress on my pc at home.

    I am running iis 7.5 on a windows 7 pro 64-bit machine.
    I’ve installed php 5.3.19 and the latest MySQL community server.

    I have setup a website in IIS called wordpress.tiffs.first which is working as I have added it to the hosts file. Internal ip address being

    In my sql workbench I can connect to the database. I added a schema called wordpress as per instructions here and am using the root user with a password.

    Workbench will open a connection when hostname: port: 3306, username root, and with or without wordpress as the default schema.

    Now I’m not sure what to enter for my information into the wordpress setup screen.

    What is the DB name? Is this the same as schema name? or is it something else.

    DB User I have set as root
    DB password as root’s password
    database host has confused me. While I am all on this pc i could use localhost. or does this need to have the :3306 for the port added? It fails either way.

    I assume that the table prefix option is irrelevant for the database connectivity issue.

    I’m worried about using localhost as I intend to work on the site over my network, via a client. I have added wordpress.tiffs.first to both the servers and clients hosts file. I did notice that there is no localhost defined in there it says this is handled by dns now but I did define it to give it a try.

    When I try to connect in mysql workbench if I use it fails to connect.

    Any advice would be good I’m really rather confused.

Viewing 7 replies - 1 through 7 (of 7 total)
  • I would just localhost to connect to the database and an IP for the path to WP.

    Try removing renaming your wp-config.php file and see if a new install works, it should pick up the old content

    Nope makes no difference, trying again, what do you mean ip for path to WP?

    I’m not sure I’m setting the right database name, what I have noticed is that if I set databasehiost to then it at least appears to try to connect, on localhost it erros straight away!

    Is there anyway to track how this connection is made to find out why it is failing?

    What I would do is install Xampp as an Apache server, this will also give you MySQL IIS is not really designed for PHP.

    By default your local host location would be “localhost” or and username “root” but the password normally may be blank unless you have set one.

    Just remember you have to MAKE a DB instance before you can connect to it.

    Download xampp at

    install the .exe

    Put your files here Default path C:\xampp\htdocs\my_wordpress_install
    URL -> create DB

    DB “localhost” UN:root PW: (blank)

    I’d suggest you install WordPress locally using

    Easiest way to do it.

    You can use the WP Migrate DB plugin to import your DB.

    Thanks for all the advice, in the end I created a new mysql user and gave it rights to the database. I then used that rather than root and there were no problems!

    I thought I should let you all know, and yes the database field wants the schema name!


    Looks like you used the wrong passwort.You may reset it following

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can't access the database.’ is closed to new replies.