Why is GRANT not working in MySQL? -


i'm scratching head on 1 see ton of helper websites showing how create mysql users , grant privileges reason not work me. tried on both winxp , macbook pro laptop latest mysql version installed.

the following example when worked wordpress. actual database different same issues.

here steps:

mysql> mysql -uroot -p<password> mysql> create database wwordpress; mysql> create user 'www'@'localhost' identified 'basic'; 

query ok, 0 rows affected (0.14 sec)

mysql> grant insert on wordpress.* 'www'@'localhost' identified 'basic'; 

query ok, 0 rows affected (0.00 sec)

mysql> flush privileges; 

query ok, 0 rows affected (0.03 sec)

mysql> select * mysql.user user='www' \g 
 *************************** 1. row ***************************                  host: localhost                  user: www              password: *e85c94af0f09c892339d31cf7570a970bcdc5805           select_priv: n           insert_priv: n           update_priv: n           delete_priv: n           create_priv: n             drop_priv: n           reload_priv: n         shutdown_priv: n          process_priv: n             file_priv: n            grant_priv: n       references_priv: n            index_priv: n            alter_priv: n          show_db_priv: n            super_priv: n create_tmp_table_priv: n      lock_tables_priv: n          execute_priv: n       repl_slave_priv: n      repl_client_priv: n      create_view_priv: n        show_view_priv: n   create_routine_priv: n    alter_routine_priv: n      create_user_priv: n            event_priv: n          trigger_priv: n              ssl_type:            ssl_cipher:           x509_issuer:          x509_subject:         max_questions: 0           max_updates: 0       max_connections: 0  max_user_connections: 0 1 row in set (0.00 sec)  mysql> 

as can see "insert_priv: n" should "y".

any suggestions?

thanks in advance.

what selecting global privileges. giving database (and host, doesnt matter) specific privileges.

grant inserton wordpress.* 'www'@'localhost' identified 'basic';

theese permissions stored in db table.

just point in right direction:

show grants 'www'@'localhost' 

http://dev.mysql.com/doc/refman/5.0/en/show-grants.html


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -