Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9023013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:39:35+00:00 2026-06-16T05:39:35+00:00

I created user ‘wordpress’ and granted privileges at mysql via phpMyAdmin. However, when I

  • 0

I created user ‘wordpress’ and granted privileges at mysql via phpMyAdmin. However, when I log-in at the command line as user wordpress, I can’t seem to access what I should be able to access. Take a look:

>mysql -u wordpress
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.27 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW GRANTS;
+--------------------------------------+
| Grants for @localhost                |
+--------------------------------------+
| GRANT USAGE ON *.* TO ''@'localhost' |
+--------------------------------------+
1 row in set (0.00 sec)

Isn’t that supposed to show Grants for wordpress@localhost?

Furthermore, I granted all (dangerous, I know, but I’m sanity testing) priveleges for wordpress on datbase sitedb. I get the following when I try to use sitedb (this, in the same session):

mysql> USE sitedb;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'sitedb'

What’s up?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:39:36+00:00Added an answer on June 16, 2026 at 5:39 am

    I figured it out…

    I logged in as as root and checked the priveleges of root and where it differs from wordpress:

    mysql> SHOW GRANTS;
    +---------------------------------------------------------------------+
    | Grants for root@localhost                                           |
    +---------------------------------------------------------------------+
    | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION |
    | GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION        |
    +---------------------------------------------------------------------+
    2 rows in set (0.00 sec)
    
    mysql> SHOW GRANTS FOR wordpress;
    +-----------------------------------------------------------------------------+
    | Grants for wordpress@%                                                      |
    +-----------------------------------------------------------------------------+
    | GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'%' WITH GRANT OPTION            |
    | GRANT ALL PRIVILEGES ON `skytreader`.* TO 'wordpress'@'%' WITH GRANT OPTION |
    +-----------------------------------------------------------------------------+
    2 rows in set (0.00 sec)
    

    As it stands, the only difference I can gather is the host. I went back to phpMyAdmin to change the host of user wordpress and specify it as ‘localhost’. And lo,

    >mysql -u wordpress
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 42
    Server version: 5.5.27 MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql> SHOW GRANTS;
    +-------------------------------------------------------------------------------------+
    | Grants for wordpress@localhost                                                      |
    +-------------------------------------------------------------------------------------+
    | GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION            |
    | GRANT ALL PRIVILEGES ON `skytreader`.* TO 'wordpress'@'localhost' WITH GRANT OPTION |
    +-------------------------------------------------------------------------------------+
    2 rows in set (0.00 sec)
    
    mysql> USE sitedb;
    Database changed
    

    Now I wonder why is this so? Isn’t it that ‘wordpress’@’%’ should stand for wild card host (and so it should include localhost)? I’m guessing this is some kind of security feature…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a User called Student and Teacher that can login into the
How can i assign newly created user to the particular group in modx Programmaticaly
What privileges does a newly created user have after running: CREATE USER 'jeffrey'@'localhost' IDENTIFIED
I am learning CakePHP 2.0, and created a sample test application, where user can
Does newly created user: create user John identified by secret; have some privileges? Or
I had followed these steps. 1) I log in as root user to mysql.
I am using spring mvc in my application,when i created user i have to
What gives? My previously created user control is visible, but the newly created one
I created few user defined types in my database as below CREATE TYPE [dbo].[StringID]
I have created a user control (link) which has a label and a button.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.