$ mysql -uroot -p
mysql>
SET @tables = NULL;
SELECT GROUP_CONCAT(table_schema, '.', table_name) INTO @tables
FROM information_schema.tables
WHERE table_schema = 'DB명'; -- specify DB name here.
SET @tables = CONCAT('DROP TABLE ', @tables);
PREPARE stmt FROM @tables;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
Reference
https://bizmark.co.kr/setup-and-tips/mysql/mysql-테이블만-전체-삭제-하는법/
Mysql 테이블만 전체 삭제 하는법 - IT infomation
myslq 에서 접속을 하고 난 후 실행 하시면 됩니다.
bizmark.co.kr
'Server > Django issue' 카테고리의 다른 글
[Django] 인증 인가 참고자료 (0) | 2022.08.08 |
---|---|
[Django] Custom User (0) | 2022.08.05 |
[Django] User model 확장 (0) | 2022.08.04 |
[Django] mysql 로그인 오류 해결방법 (0) | 2022.08.04 |
[Django] mysqlclient 설치 에러 해결 (0) | 2022.08.04 |