为什么从 mysql 控制台插入 mysql.user table 时出现 "not insertable-into" 错误?
why "not insertable-into" error when insert into mysql.user table from mysql console?
从 mysql 控制台,我 运行:
MariaDB [steve]> insert into mysql.user
-> (user,host,authentication_string,ssl_cipher,x509_issuer,x509_subject)
-> values('steve','localhost', PASSWORD('steve'), '','','');
得到错误:
ERROR 1471 (HY000): The target table user of the INSERT is not insertable-into
我以 root 身份登录:
PS C:\Users\srich> C:\xampp\mysql\bin\mysql -u root -p
Enter password:
如何从 mysql 控制台创建新的数据库用户?
用户的创建类似于数据库或table对象
CREATE USER 'user1'@localhost IDENTIFIED BY 'password1';
GRANT ALL PRIVILEGES ON *.* TO 'user1'@localhost IDENTIFIED BY 'password1'
FLUSH PRIVILEGES;
更多信息:
从 mysql 控制台,我 运行:
MariaDB [steve]> insert into mysql.user
-> (user,host,authentication_string,ssl_cipher,x509_issuer,x509_subject)
-> values('steve','localhost', PASSWORD('steve'), '','','');
得到错误:
ERROR 1471 (HY000): The target table user of the INSERT is not insertable-into
我以 root 身份登录:
PS C:\Users\srich> C:\xampp\mysql\bin\mysql -u root -p
Enter password:
如何从 mysql 控制台创建新的数据库用户?
用户的创建类似于数据库或table对象
CREATE USER 'user1'@localhost IDENTIFIED BY 'password1';
GRANT ALL PRIVILEGES ON *.* TO 'user1'@localhost IDENTIFIED BY 'password1'
FLUSH PRIVILEGES;
更多信息: