简体   繁体   English

我的SQL查询有什么问题? (mysql.user表)

[英]What's wrong with my SQL query? (mysql.user table)

This line isn't working well. 这条线工作不正常。

INSERT INTO `mysql`.`user` (`Host`, `User`, `ssl_cipher`, `x509_issuer`, `x509_subject`) VALUES ('%', 'User1', ?, ?, ?); 

I'm try to do this trigger later, but first I need the correct insert. 我稍后尝试尝试执行此触发器,但是首先我需要正确的插入。

CREATE TRIGGER new_user AFTER INSERT ON BBDD.users for each row INSERT INTO `mysql`.`user` (`Host`, `User`, `ssl_cipher`, `x509_issuer`, `x509_subject`, `authentication_string`) VALUES ('%', BBDD.users(name), ?, ?, ?, BBDD.users(password)); 

I use MySQL Workbench 6.3 CE. 我使用MySQL Workbench 6.3 CE。

Don't insert something manually into system tables, unless you really know what you are doing (and from this question I doubt that's the case here). 除非您真的知道自己在做什么,否则不要在系统表中手动插入内容(并且从这个问题中我怀疑是这种情况)。 Instead use the designated commands, here CREATE USER . 而是使用指定的命令,在这里CREATE USER

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM