Support » Installing WordPress » wordpress unable to use new MySQL Table

  • Before getting started
    Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.

    Database name
    Database username
    Database password
    Database host
    Table prefix (if you want to run more than one WordPress in a single database)
    We’re going to use this information to create a wp-config.php file. If for any reason this automatic file creation doesn’t work, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open wp-config-sample.php in a text editor, fill in your information, and save it as wp-config.php. Need more help? We got it.

    In all likelihood, these items were supplied to you by your Web Host. If you don’t have this information, then you will need to contact them before you can continue. If you’re all ready…

    Let’s go!

    Set up your database connection
    Below you should enter your database connection details. If you’re not sure about these, contact your host.

    Database Name
    wordpress
    The name of the database you want to use with WordPress.
    Username
    wordpress
    Your database username.
    Password
    password
    Your database password.
    Database Host
    localhost
    You should be able to get this info from your web host, if localhost doesn’t work.
    Table Prefix
    wp_
    If you want to run multiple WordPress installations in a single database, change this.

    Gives the error:

    WordPress database error Unknown column ‘wp_’ in ‘field list’ for query SELECT wp_

    OS: Windows server 2016
    php version: 7.1.26
    MySQL version: 5.7
    Wordpress download: 5.0.3

    mysql> create database wordpress
    -> ;
    Query OK, 1 row affected (0.00 sec)

    mysql> grant all privileges on wordpress.* to “wordpress”@”localhost” identified by “password”;
    Query OK, 0 rows affected, 1 warning (0.02 sec)

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • I think about 10 months ago someone presented a similar error. Have you tried using the latest version of WordPress?

    Yes there was but it seems the topic was set to “resolved” but without a step by step guide to implementing the solution.

    The version I downloaded has the file name: wordpress-5.0.3.zip

    I believe it’s the latest one.

    Thank you for your response.

    mysql> grant all privileges on wordpress.* to “wordpress”@”localhost” identified by “password”;
    Query OK, 0 rows affected, 1 warning (0.02 sec)

    What was the warning?

    You should check the user’s privileges in the mysql table:

    USE mysql;
    SELECT * FROM user WHERE user = 'wordpress';

    If they are correct, then issue a FLUSH PRIVILEGES; query to reload the privileges from the mysql table.

    FYI, unless you specifically configured MySQL to use named pipes (the Windows version of sockets), you should use 127.0.0.1 and not localhost for the database host. You may need to create a new 'wordpress'@'%' user if you make this change.

    mysql> USE mysql;
    No connection. Trying to reconnect…
    Connection id: 1789
    Current database: *** NONE ***

    Database changed
    mysql> SELECT * FROM user WHERE user = ‘wordpress’;
    +———–+———–+————-+————-+————-+————-+————-+———–+————-+—————+————–+———–+————+—————–+————+————+————–+————+———————–+——————+————–+—————–+——————+——————+—————-+———————+——————–+——————+————+————–+————————+———-+————+————-+————–+—————+————-+—————–+———————-+———————–+——————————————-+——————+———————–+——————-+—————-+
    | Host | User | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | Create_tablespace_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections | plugin | authentication_string | password_expired | password_last_changed | password_lifetime | account_locked |
    +———–+———–+————-+————-+————-+————-+————-+———–+————-+—————+————–+———–+————+—————–+————+————+————–+————+———————–+——————+————–+—————–+——————+——————+—————-+———————+——————–+——————+————+————–+————————+———-+————+————-+————–+—————+————-+—————–+———————-+———————–+——————————————-+——————+———————–+——————-+—————-+
    | localhost | wordpress | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 | mysql_native_password | *EE3A42CC2343344D831212BD9F58C05BD1B29269 | N | 2019-02-18 17:49:09 | NULL | N |
    +———–+———–+————-+————-+————-+————-+————-+———–+————-+—————+————–+———–+————+—————–+————+————+————–+————+———————–+——————+————–+—————–+——————+——————+—————-+———————+——————–+——————+————+————–+————————+———-+————+————-+————–+—————+————-+—————–+———————-+———————–+——————————————-+——————+———————–+——————-+—————-+
    1 row in set (0.03 sec)

    mysql>

    Are these privileges correct?

    Yes for the contents of the page I pasted, the source of the contents was:

    http://127.0.0.1/wordpress/wp-admin/setup-config.php

    Then clicked “Let’s go”

    The follow-on screen I entered the database name, user, pwd, changed local host to 127.0.0.1 and left the last entry on the screen as wp_ for the table prefix and clicked submit. A nearly blank page immediately came back with the following at the top of the page:

    WordPress database error Unknown column ‘wp_’ in ‘field list’ for query SELECT wp_

    Thank you for helping.

    Okay, now I see. I’ve checked the privileges using the MySQL workbench and now I have:

    mysql> USE mysql;
    Database changed
    mysql> SELECT * FROM user WHERE user = ‘wordpress’;
    +———–+———–+————-+————-+————-+————-+————-+———–+————-+—————+————–+———–+————+—————–+————+————+————–+————+———————–+——————+————–+—————–+——————+——————+—————-+———————+——————–+——————+————+————–+————————+———-+————+————-+————–+—————+————-+—————–+———————-+———————–+——————————————-+——————+———————–+——————-+—————-+
    | Host | User | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | Create_tablespace_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections | plugin | authentication_string | password_expired | password_last_changed | password_lifetime | account_locked |
    +———–+———–+————-+————-+————-+————-+————-+———–+————-+—————+————–+———–+————+—————–+————+————+————–+————+———————–+——————+————–+—————–+——————+——————+—————-+———————+——————–+——————+————+————–+————————+———-+————+————-+————–+—————+————-+—————–+———————-+———————–+——————————————-+——————+———————–+——————-+—————-+
    | localhost | wordpress | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | *EE3A42CC2343344D831212BD9F58C05BD1B29269 | N | 2019-02-18 17:49:09 | NULL | N |
    +———–+———–+————-+————-+————-+————-+————-+———–+————-+—————+————–+———–+————+—————–+————+————+————–+————+———————–+——————+————–+—————–+——————+——————+—————-+———————+——————–+——————+————+————–+————————+———-+————+————-+————–+—————+————-+—————–+———————-+———————–+——————————————-+——————+———————–+——————-+—————-+
    1 row in set (0.00 sec)

    However, I’m still getting this error:

    WordPress database error Unknown column ‘wp_’ in ‘field list’ for query SELECT wp_

    And just for completeness I “dropped” the schema in the MySQL workbench, (btw in MySQL parlance a database is a schema and a database is actually the database management instance), and received this error when trying to execute the wordpress configuration:

    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 wordpress 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.

    My now question is what creates the correct blank initial vanilla wordpress schema for MySQL? No database comes with the download so some SQL statement is needed to create the initial blank schema correct? What am I missing?

    WordPress database error Unknown column ‘wp_’ in ‘field list’ for query SELECT wp_

    If you understand how WordPress functions to display your web pages, you’ll have a better idea where the problem comes from and why it can be so crippling.

    WordPress is built using PHP and MySQL. The information that makes up your website is stored in a MySQL database, and PHP scripts tell WordPress how to store and retrieve that information to create and update your pages.

    The follow-on screen I entered the database name, user, pwd, changed local host to 127.0.0.1 and left the last entry on the screen as wp_ for the table prefix and clicked submit.

    Thank you for that response. I’ve installed and used WordPress since 2005, so I probably should have prefaced with that understanding. This installation is for a new server using windows 2016, MySQL version 5.7 and PHP version 7.1.26 and wordpress download 5.0.3

    Where this setup is having an issue is the original setup of the database for WordPress to use in the first place in the first place.

    http://127.0.0.1/wordpress/wp-admin/setup-config.php

    I’ve not encountered this problem in past installations and want to understand two things:

    1) What is this error:
    WordPress database error Unknown column ‘wp_’ in ‘field list’ for query SELECT wp_

    2) What is the resolution?

    I’m getting this error now. Was there a resolution?

    Running on IIS, WP 5.2 and PHP 7.3.7

    thanks,

    Chris

    No, no-one seems to know the step by step green field process with sources outlined for a brand new clean out of the box Windows Server 2016. With screen shots preferred.

    My solution was to build my wordpress site on a clean install of Centos 7.2 from scratch. No issues.

    Carl

Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.