WordPress.org

Forums

[resolved] Get admin permission for wordpress database not using admin user in windows (3 posts)

  1. toolmania1
    Member
    Posted 2 years ago #

    Hello all,

    I started to install wordpress on my local computer. I have IIS 7 and php already set up. I have created other web sites with no problem, so I have no problem there. I have mysql. I can log into this. I can create new connection. I created a new one called 'wordpress'. I set up my new virtual directory to a folder on my desktop. I moved the whole wordpress folder into this folder. Then, I filled in the correct credentials and location for my set up:

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'wordpress');

    /** MySQL database username */
    define('DB_USER', 'root');

    /** MySQL database password */
    define('DB_PASSWORD', 'password');

    /** MySQL hostname */
    define('DB_HOST', '127.0.0.1:3306');

    Then, in Firefox, I hit this page:

    http://localhost/wordPressSite/wordpress-3.5/wordpress/wp-admin/install.php

    Here is the error message:

    Can’t select database

    We were able to connect to the database server (which means your username and password is okay) but not able to select the wordpress database.

    Are you sure it exists?
    Does the user root have permission to use the wordpress database?
    On some systems the name of your database is prefixed with your username, so it would be like username_wordpress. Could that be the problem?

    If you don't know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

    ========

    I had a different error message at first. I think I had the user name and password wrong or something. I corrected it and now I am at this error. I think it is because I have a second user in windows 7. I am not the admin user. This usually isn't a problem because I just open IIS and "Run as Administrator". I don't know how to get that to happen when I run that install.php file in Firefox. I think that could be my problem though. It that is not it, then something has to happen in which the MySQL runs as an administrator even though I am logged in as a regular user. I tried to open that with 'Run as Administrator'. That did not seem to help. Any ideas?

  2. toolmania1
    Member
    Posted 2 years ago #

    Oh, for this:

    /** MySQL hostname */
    define('DB_HOST', '127.0.0.1:3306');

    I also tried:

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    and

    /** MySQL hostname */
    define('DB_HOST', 'localhost:3306');

  3. toolmania1
    Member
    Posted 2 years ago #

    It turned out to have nothing to do with admin permissions. I needed to put 'mysql' instead of a table name.

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'mysql');

    /** MySQL database username */
    define('DB_USER', 'root');

    /** MySQL database password */
    define('DB_PASSWORD', 'password');

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.