programing

mysql 콘솔에서 mysql.user 테이블에 삽입할 때 "not insertable-to" 오류가 발생하는 이유는 무엇입니까?

linuxpc 2023. 6. 10. 08:30
반응형

mysql 콘솔에서 mysql.user 테이블에 삽입할 때 "not insertable-to" 오류가 발생하는 이유는 무엇입니까?

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 콘솔에서 새 데이터베이스 사용자를 생성하는 방법은 무엇입니까?

사용자가 데이터베이스 또는 테이블 개체와 같이 생성됨

CREATE USER 'user1'@localhost IDENTIFIED BY 'password1';
GRANT ALL PRIVILEGES ON *.* TO 'user1'@localhost IDENTIFIED BY 'password1'
FLUSH PRIVILEGES;

추가 정보:

https://mariadb.com/kb/en/create-user/

https://mariadb.com/kb/en/grant/ .

언급URL : https://stackoverflow.com/questions/68718339/why-not-insertable-into-error-when-insert-into-mysql-user-table-from-mysql-con

반응형