This roles out mysql, linux, and windows from the scenerio, leaving only YII as causing factor. I checked, my linux host is running 5.0 community, but my local machine is running mysql 5.1.xx and is working great in it.įurther checking revealed that my old script is still working on the same server, Googling this error suggests that this had occurred in Prado and upgrading resolved this.īut alas, nothing happens in YII, as upgrading to 1.1.5 does no good.įurther googling suggests its a syntax error pertaining to Mysql Version 5.0.xx and mysql 5.2 has resolved this. However on the server, the YII script generates the following error.ĬDbCommand failed to execute the SQL statement: SQLSTATE: Syntax error or access violation: 1142 SHOW VIEW command denied to user for table 'herb_price_list' These views are running perfectly fine on my local machine, both using the old php script and the new one using YII. I have 2-3 views defined in mysql, each taking data from 3-4 tables. If you use AFTER INSERT, it's too late.That’s another problem I am facing in using YII. + NEW.sottoscapolare + NEW.ascellare + NEW.pettorale + NEW.coscia Īlso you must use BEFORE INSERT if you want to change a value in the row before you insert it. SET NEW.sommapliche = NEW.tricipite + NEW.addome + NEW.soprailiaca If so, you would reference the current row being inserted with the NEW.* syntax: CREATE TRIGGER SumPliche BEFORE INSERT ON wp_wpdatatable_8 doesn't this mean this user should have all privileges for this database). You probably want to set values only in the row you insert. create view testview as select from transactions ERROR 1142 (42000): CREATE VIEW command denied to user 'callagga''localhost' for table 'testview'mysql> Any ideas why Note below in select from db, all the fields are 'Y' (i.e. Stored function/trigger because it is already used by statement which invoked mysql> INSERT INTO myschema.mytable VALUES (UNIXTIMESTAMP()) ERROR 1142 (42000). If I create this trigger in my test database (as a different user with TRIGGER privilege), and then try to insert a row: mysql> insert into wp_wpdatatable_8 values (1, 1, 1, 1, 1, 1, 1, 1) ĮRROR 1442 (HY000): Can't update table 'wp_wpdatatable_8' in This table is created during the MySQL 5.4 installation procedure. SET sommapliche = tricipite + addome + soprailiaca + sottoscapolare + ascellare + pettorale + coscia CREATE TRIGGER SumPliche AFTER INSERT ON wp_wpdatatable_8 I also think your trigger might not do what you think it does, so it's just as well that you didn't create it. I've given 'grant all' to my user account, but still cannot create a table. I'm having problems setting up user access to a database (jsportal), and cant figure out what i've missed. Mysql> create trigger tt before insert on t for each row set new.i = 42 ĮRROR 1142 (42000): TRIGGER command denied to user for table 't' I'm running mysql 5.0.19 on current Ubuntu Dapper. Now try creating a trigger as this user: ~ mysql -ubill -p | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT ON `test2`.* TO | Stored routines (stored procedures and functions) and views can include an SQL SECURITY clause with a value of DEFINER or INVOKER : CREATE DEFINERuser. | GRANT USAGE ON *.* TO IDENTIFIED BY PASSWORD '*29A1BB43D3B9EB42028B4566E4836353285B9395' | SELECT command denied to user user1localhost for table sellerlist 0.000 sec. Apache comes pre-installed on such a server. Lightsail with LAMP expects you to use AWS RDS database, but that is expensive and this is for a personal genealogy database. Running on AWS Lightsail with LAMP virtual server. Create a test user: mysql> create user grant all privileges on test2.* to revoke trigger on test2.* from show grants for Grants for | access violation: 1142 INDEX command denied to user. You lack the TRIGGER privilege on the database you are using.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |