일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- GitHub
- 이미지 절대경로
- 국내형상관리툴
- gitlab merge request
- mysql dump
- frism
- 형상관리프리즘
- java
- 프리즘반입
- MySQL
- 청년희망적금
- vue
- vue 이미지
- jdk
- merge request
- javascript
- vue개발환경세팅
- 깃랩 머지
- jenkins오류
- vue개발환경
- whitelabel
- react
- NGINX
- vue3
- vscode
- vuejs
- 프리즘반출
- 리눅스오류
- 프리즘커밋
- firestore
Archives
- Today
- Total
여씨의 개발이야기
[MySQL] mysqldump: Got error: 1356: View 'database.view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them when using LOCK TABLES 본문
💾 Database
[MySQL] mysqldump: Got error: 1356: View 'database.view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them when using LOCK TABLES
yeossi 2022. 1. 28. 10:45📢 원인을 알아보자
덤프를 하려는 도중에 참조하는 놈이 invalid하다는 에러가 떴다.
이럴 땐 무조건 view의 ddl을 확인해서 수정되거나 사라진 table 또는 column 또는 function 등이 있는 지 확인해야한다.
😮 해결 방법
필자의 경우에는 참조하고 있는 테이블 중 하나가 데이터베이스 이름이 바뀌어서 나는 오류였다.
view의 ddl을 복사해서 replace를 하면 해결된다.
CREATE OR REPLACE
ALGORITHM = UNDEFINED VIEW `데이터베이스명`.`뷰명` AS
select
...
from
...
union
select
...
from
...
where
...
'💾 Database' 카테고리의 다른 글
[MYSQL] insert, update할 때 timestamp 자동 업데이트 하는 법 (0) | 2024.01.17 |
---|---|
[MySQL] insert, update할 때 timestamp 자동 업데이트 하는 법 (0) | 2022.05.03 |
[MySQL] database rename 하는 법 (2) | 2022.01.28 |
Comments