Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

This is driving me crazy.

When I try to create a few tables from my Workbench model I get this error 1044.

I've been trying to find a solution but nothing works for me.

Curiously when I run SELECT USER(),CURRENT_USER(); I get two versions of the same user. One is techboy@(an ip address) and the other is techboy@%.

Access is denied to both at one point or another.

The MySql server is a remote hosted server with the user permissions correctly set.

share|improve this question
    
Check if grants are there for table creation. –  SparKot ॐ Mar 5 '13 at 19:05
add comment

1 Answer

Please keep in mind that when you run

SELECT USER(),CURRENT_USER();

USER() reports how you attempted to authenticate in mysqld

CURRENT_USER() reports how you were allowed to authenticate by mysqld

This means you should run this query

SHOW GRANTS FOR CURRENT_USER();

or just

SHOW GRANTS;

to actually see your credentials. If you run,

SHOW GRANTS FOR USER();

you may not see credentials if they do not exist in mysql.user.

Just try to make the appropriate user on the MySQL Instance.

UPDATE 2013-03-05 16:51 EST

In you comment, you said

Grants shows that 'GRANT USAGE ON . TO \'techboy\'@\'%\' IDENTIFIED BY PASSWORD \'and a character string\'' and 'GRANT ALL PRIVILEGES ON lfc_123awards.* TO \'techboy\'@\'%\' WITH GRANT OPTION'

Since you only have rights to the lfc_123awards database, please make sure you are specifying that database when you connect. If you do not set the default database at authentication, it will not let you connect at all.

Here is what I mean: Let say you trying connecting from the command line

mysql -utechbox -p -hIPofDBServer

This should fail, whereas

mysql -utechbox -p -hIPofDBServer -Dlfc_123awards

should work.

share|improve this answer
    
Thanks. Grants shows that 'GRANT USAGE ON . TO \'techboy\'@\'%\' IDENTIFIED BY PASSWORD \'and a character string\'' and 'GRANT ALL PRIVILEGES ON lfc_123awards. TO \'techboy\'@\'%\' WITH GRANT OPTION' Where does this leave me? I know I am signed in with the correct credentials. –  Rod Gilchrist Mar 5 '13 at 20:27
    
Got it to work! Thanks for your help RolandoMySQDBA. –  Rod Gilchrist Mar 6 '13 at 16:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.