MySQLDB생성 썸네일형 리스트형 [mySQL]최초실행, 종료, 비번설정 방법 #1 MySQL 실행하기 mySQL이 설치 됐다면 터미널에서 아래와 같이 실행한다. (PATH 연결이 안되어있다면, 시작 - MySQL Command and Client)로그인 mysql -uroot -p //Enter password: MySQL 종료하기 exit 로컬 접속 가능한 사용자 추가 create user '사용자'@'localhost' identified by '비밀번호'; 예) create user 'admin'@'localhost' identified by '1234'; DB 권한 부여하기 grant all privileges on *.* to 'admin'@'localhost'; //모든 DB접근 권한 가능 grant all privileges on DB명.* to 'admin'@'local.. 더보기 [MySQL]DB테이블 생성, 삭제 #2 테이블 안의 내용을 확인하자 desc posts; DB 내용 입력하기 insert into posts(title, content) values('title1','content1') 이런식으로 입력 된다. idtitlecontent 1title1content12title2content2 DB 내용 확인하기 select * from posts; 특정 조건을 걸어 검색할 수 도 있다. select * from posts where id=1; //id=1인 title, content select title from posts where id=1; //id=1인 title 테이블 삭제하기 drop table posts; 지운 테이블을 확인해보자 show tables; 잘 지워진걸 확인할 수 있다. https://.. 더보기 이전 1 다음