디비서버가 날아가는 바람에.. 흑흑..
디비서버 다시 세팅후.. 데이터를 복구할려고 하는데..
mysql : error reading file 'UNOPENED' (ERROR : 5)라는 에러메시지가
뜨면서 복구가 안됩니다.
dump 파일이 있는 경로 (/mnt/cdrom/db/dump)로 이동한후에..
mysql -u root -p hoho < hoho_0711.dump라고 했더니
위와같은 에러가 뜹니다. hoho_0711.dump는 읽기전용 화일로 되있군요. ^^;
어떻게 해야할지..
그래서 혹시나 하고 hoho_0711.dump파일을 하드로 복사해서 권한을
변경해볼려고 했더니 카피하고 나서 그 용량을 보니 원래 용량이
2M 정도가 되는데 용량이 0M로 나오더라고요
그리고 카피했을때 메시지가 hoho_0711.dump는 읽기전용화일입니다라고 뜨고요
하드카피후 권한변경도 할수 없고.. ㅜ.ㅜ
또 다른 어떤 분께서 이렇게 해보라고 해서 해봤는데..
$mysql 디비명 -u 사용자 -p 디비명 < 화일명(hoho_0711.dump)
이렇게 했더니
Default options are read from the following files in the given order:
/etc/my.cnf /usr/local/var/my.cnf ~/.my.cnf
The following groups are read: mysql client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options file
--defaults-file=# Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read
Possible variables for option --set-variable (-O) are:
connect_timeout current value: 0
max_allowed_packet current value: 16777216
net_buffer_length current value: 16384
select_limit current value: 1000
max_join_size current value: 1000000
위와 같은 메시지가 뜨면서 쉘프롬프트는 뜨는데..
실제로 mysql에 접속해서 보면 테이블이 하나도 없습니다.
ㅠ.ㅠ 도대체 어떻게 해야하는지..
현재 웹서버와 디비서버가 다른 아이피를 쓰기때문에 사용자에게
host 권한에서 local과 아이피(웹서버)에서 접근할수 있는 권한을
모두 주었습니다.
그래서 만약에 guest라는 사용자가 디비(hoho)에 접속하기 위해서는
$ mysql hoho -u guest -p 하고 들어가야 합니다.
왜 데이터가 복구가 안되는지 좀 알려주세요.. 정말 미치겄네요.