MySQL Create user rights result trigger failed

Source: Internet
Author: User
Tags mysql create parse error mysql create user

Ashamed to say, MySQL I've been only going to use, very appreciative stage.

Even some more deep-seated management, unfamiliar how, we have to strengthen AH!

Recent. System test, using MySQL database, you need to create a trigger on the table. The database is installed on the machine. But. In any case, you cannot create a trigger, such as the following background error message:

Com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:TRIGGER command denied to user ' root ' @ ' mortimer-pc ' for Table ' T_user ' at Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) at Sun.reflect.NativeConstructorAccessorImpl.newInstance (nativeconstructoraccessorimpl.java:39) at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance (delegatingconstructoraccessorimpl.java:27) at Java.lang.reflect.Constructor.newInstance (constructor.java:513) at Com.mysql.jdbc.Util.handleNewInstance ( util.java:411) at Com.mysql.jdbc.Util.getInstance (util.java:386) at Com.mysql.jdbc.SQLError.createSQLException ( sqlerror.java:1052) at Com.mysql.jdbc.MysqlIO.checkErrorPacket (mysqlio.java:4096) at Com.mysql.jdbc.MysqlIO.checkErrorPacket (mysqlio.java:4028) at Com.mysql.jdbc.MysqlIO.sendCommand (Mysqlio.java : 2490) at Com.mysql.jdbc.MysqlIO.sqlQueryDirect (mysqlio.java:2651) at Com.mysql.jdbc.ConnectionImpl.execSQL ( connectionimpl.java:2677) at Com.mysql.jdbc.ConnectionImpl.execSQL (connectionimpl.java:26At Com.mysql.jdbc.StatementImpl.execute (statementimpl.java:841) at Com.mysql.jdbc.StatementImpl.execute ( statementimpl.java:681) at Com.apusic.jdbc.adapter.StatementHandle.execute (Unknown Source) at Com.apusic.esb.base.util.SQLUtil.createDBObjectIfNecessary (sqlutil.java:263) at Com.apusic.esb.base.util.SQLUtil.createDBObjectIfNecessary (sqlutil.java:225) at Com.apusic.esb.config.trigger.mysql.MySqlTriggerManager.createTriggersIfNecessary (mysqltriggermanager.java:83) At Com.apusic.esb.config.trigger.TriggerConfigManager.deploy (triggerconfigmanager.java:331) at SUN.REFLECT.NATIVEMETHODACCESSORIMPL.INVOKE0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke ( nativemethodaccessorimpl.java:39) at Sun.reflect.DelegatingMethodAccessorImpl.invoke ( DELEGATINGMETHODACCESSORIMPL.JAVA:25) at Java.lang.reflect.Method.invoke (method.java:597) at Com.apusic.esb.base.communication.CommInvokeUtil.invoke (comminvokeutil.java:139) at Com.apusic.esb.base.communication.CommInvokeUtil.invoke (Comminvokeutil.java:At Com.apusic.esb.base.communication.CommInvokeUtil.invoke (comminvokeutil.java:27) at Com.apusic.esb.base.communication.socket.server.commsocketserver$requestprocessor.run (CommSocketServer.java:99 ) at Com.apusic.util.threadpoolimpl$workerthread.run (Unknown Source) 2014-06-25 10:38:42 Error [ Apusic.com.apusic.esb.config.trigger.TriggerConfigManager] Com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:TRIGGER command denied to user ' root ' @ ' mortimer-pc ' for Table ' T_user ' at Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) at Sun.reflect.NativeConstructorAccessorImpl.newInstance (nativeconstructoraccessorimpl.java:39) at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance (delegatingconstructoraccessorimpl.java:27) at Java.lang.reflect.Constructor.newInstance (constructor.java:513) at Com.mysql.jdbc.Util.handleNewInstance ( util.java:411) at Com.mysql.jdbc.Util.getInstance (util.java:386) at Com.mysql.jdbc.SQLError.createSQLException ( sqlerror.java:1052) at Com.mysql.jdbc.Mysqlio.checkerrorpacket (mysqlio.java:4096) at Com.mysql.jdbc.MysqlIO.checkErrorPacket (mysqlio.java:4028) at Com.mysql.jdbc.MysqlIO.sendCommand (mysqlio.java:2490) at Com.mysql.jdbc.MysqlIO.sqlQueryDirect (mysqlio.java:2651 ) at Com.mysql.jdbc.ConnectionImpl.execSQL (connectionimpl.java:2677) at Com.mysql.jdbc.ConnectionImpl.execSQL ( connectionimpl.java:2627) at Com.mysql.jdbc.StatementImpl.execute (statementimpl.java:841) at Com.mysql.jdbc.StatementImpl.execute (statementimpl.java:681) at Com.apusic.jdbc.adapter.StatementHandle.execute ( Unknown Source) at Com.apusic.esb.base.util.SQLUtil.createDBObjectIfNecessary (sqlutil.java:263) at Com.apusic.esb.base.util.SQLUtil.createDBObjectIfNecessary (sqlutil.java:225) at Com.apusic.esb.config.trigger.mysql.MySqlTriggerManager.createTriggersIfNecessary (mysqltriggermanager.java:83) At Com.apusic.esb.config.trigger.TriggerConfigManager.deploy (triggerconfigmanager.java:331) at SUN.REFLECT.NATIVEMETHODACCESSORIMPL.INVOKE0 (Native Method) at sun.reflect.NativeMethodAccessOrimpl.invoke (nativemethodaccessorimpl.java:39) at Sun.reflect.DelegatingMethodAccessorImpl.invoke ( DELEGATINGMETHODACCESSORIMPL.JAVA:25) at Java.lang.reflect.Method.invoke (method.java:597) at Com.apusic.esb.base.communication.CommInvokeUtil.invoke (comminvokeutil.java:139) at Com.apusic.esb.base.communication.CommInvokeUtil.invoke (comminvokeutil.java:43) at Com.apusic.esb.base.communication.CommInvokeUtil.invoke (comminvokeutil.java:27) at Com.apusic.esb.base.communication.socket.server.commsocketserver$requestprocessor.run (CommSocketServer.java:99 ) at Com.apusic.util.threadpoolimpl$workerthread.run (Unknown Source)
Parse error message: TRIGGER command denied to the user ' root ' @ ' mortimer-pc ' for table ' T_user ', it appears that the root user is not agreed to run T_user commands on the TRIGGER table. Why don't you agree?
Analysis, the first question is whether to drive the problem. Because the driver does have a mismatch problem, the driver has a lower version number (for 5.0), and the server version number is 5.5. The problem remains after the replacement drive.

Second, parse the error message itself. Do not agree to run the Divine Horse command. It seems to be a permissions problem. Navicat connect to the database. Check the user rights, found that the user "[email protected]%" The "Trigger" column is not selected! The user of this connection appears to be "[email protected]", so. The "[email protected]" rule does not appear to be in effect and is expected to be the cause of the failure to create a trigger.

Adjust the "[email protected]%" User's permissions, select the "Trigger" column, restart the MySQL service, another connection to MySQL, create a trigger, OK.

Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

MySQL Create user rights result trigger failed

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.