- User Search at root (๋ฃจํธ์์ ์ฌ์ฉ์ ์กฐํ)
USE mysql;
SELECT host, user FROM user;
- Give Privileges at root (๋ฃจํธ์์ ์ฌ์ฉ์ ๊ถํ ๋ถ์ฌ)
GRANT ALL PRIVILEGES on testdb.* TO ‘testuser’@‘localhost’;
- Check User (ํ์ฌ ์ฌ์ฉ์ํ์ธ)
SELECT USER();
- Check current DB (ํ์ฌ DB ํ์ธ)
SELECT DATABASE();
- Check the data of sepecific table (ํน์ TABLE ๋ฐ์ดํฐ ํ์ธ)
SELECT * from (name of table);
- Check column (Column ํ์ธ)
EXPLAIN (name of table); OR DESC (name of table);
- Delete all data on table (ํ
์ด๋ธ์ ์๋ ๋ฐ์ดํฐ ‘์ ์ฒด’ ์ญ์ )
DELETE TABLE (name of table);