This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

*/

MySQL DB 옮기기

환경

 원본 DB시스템 : Windows 11, MySQL 8.0

 타겟 DB시스템 : CentOS Linux 7, MariaDB 5.5


MySQL dump 사용법

Backup

> mysqldump.exe -u[유저명] -p[패스워드] database명 [table명] > 파일명.sql 이나
> mysqldump.exe -u[유저명] -p[패스워드] database명 [table명] -r 파일명.sql

Restore

     > mysql 실행
     mysql> use DB명
     mysql> source 디렉토리명/파일명.sql


예) Windows 에 있는 MySQL의 database명 fd, table명 breeds 을 a.sql로 백업

d:\work> & 'C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqldump' -uroot -p fd breeds  > a.sql 


예) 윈도우즈의 database fd에 있는 table 전체를 백업 할 때

d:\work> & 'C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqldump' -uroot -p fd -r fd.sql



윈도우즈에서 백업한것을 다시 DB에 올리는 경우

c:\> &'C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql' -uroot -p fd 

mysql> source d:/work/fd.sql 

한강 공원 야경

 지난 주말 한강 풍경

어디 외국에 나와있는 듯한 느낌