Execute command denied to user ”@’localhost’ for routine error
It works….. I try to grant this priviledge in root. log in as root GRANT EXECUTE ON PROCEDURE TestMediaControl.monthavrage TO ‘jeinqa’@’localhost’ flush privileges;
It works….. I try to grant this priviledge in root. log in as root GRANT EXECUTE ON PROCEDURE TestMediaControl.monthavrage TO ‘jeinqa’@’localhost’ flush privileges;
GRANT on the database is not what you need. Grant on the tables directly. Granting privileges on the database mostly is used to grant or revoke connect privileges. This allows you to specify who may do stuff in the database if they have sufficient other permissions. You want instead: GRANT ALL PRIVILEGES ON TABLE side_adzone … Read more
Assuming you have created a user in this database associated with the AD login, e.g. CREATE LOGIN [domain\user] FROM WINDOWS; GO USE your_database; GO CREATE USER [domain\user] FROM LOGIN [domain\user]; GO Then you merely have to follow the same syntax. Because \ is not a standard character for an identifier, you need to escape the … Read more
Found the answer. It is in this line in the ALTER DEFAULT PRIVILEGES documentation. You can change default privileges only for objects that will be created by yourself or by roles that you are a member of. I was using alter default privileges from a different user than the one creating the tables. Make sure … Read more
Your second attempt is the right approach: GRANT EXECUTE ON PROCEDURE myDB.spName TO ‘TestUser’@’localhost’; but if that is not working, verify … a) you (the user from which you are running all these command) have grant rights [i.e WITH GRANT OPTION]. If you are root, then you have grant rights. b) the user exists to … Read more
It works….. I try to grant this priviledge in root. log in as root GRANT EXECUTE ON PROCEDURE TestMediaControl.monthavrage TO ‘jeinqa’@’localhost’ flush privileges;
I know this is an old post, but I thought I’d add on to @tdammers question for others to see. You can also perform a SELECT CONCAT on information_schema.tables to create your grant commands, and not have to write a separate script. First revoke all privileges from that db: REVOKE ALL PRIVILEGES ON db.* FROM … Read more
GRANT SELECT ON database1.view1 TO ‘someuser’@’somehost’;
If I use back-tics instead of single quotes in the syntax, it appears to work just fine: grant all on `projectA\_%`.* to `projectA`@`%`;
What you are selecting are the global privileges. You are however giving database (and host, but that doesn’t matter) specific privileges. GRANT INSERT ON wordpress.* TO ‘www’@’localhost’ IDENTIFIED BY ‘basic’; These permissions are stored in the db table. Just to point you in the right direction: SHOW GRANTS FOR ‘www’@’localhost’ http://dev.mysql.com/doc/refman/5.0/en/show-grants.html