상세 컨텐츠

본문 제목

View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

mysql

by 2hansoul 2021. 8. 31. 20:30

본문

반응형

sql 비번을 바꾸려고 하는데 오류가 뜬다 mariadb 10.5 ㅣ상의 버전부터는 mysql의 user테이블이 뷰테이블이라서

변경을 하고 진행을 해야됌 

set passwood 함수를 이용하여 변경이 가능 하다

 

MariaDB [mysql]> set password for 'root'@'localhost' = password('1234');
Query OK, 0 rows affected (0.018 sec)

MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.010 sec)

MariaDB [mysql]> select host,user,password from user;
+-----------------+-------------+-------------------------------------------+
| Host            | User        | Password                                  |
+-----------------+-------------+-------------------------------------------+
| localhost       | mariadb.sys |                                           |
| localhost       | root        | *A4B6157319038724E3560894F7F932C8886EBFCF |
| desktop-730lfn7 | root        | *A4B6157319038724E3560894F7F932C8886EBFCF |
| 127.0.0.1       | root        | *A4B6157319038724E3560894F7F932C8886EBFCF |
| ::1             | root        | *A4B6157319038724E3560894F7F932C8886EBFCF |
+-----------------+-------------+-------------------------------------------+
5 rows in set (0.004 sec)

반응형

관련글 더보기

댓글 영역