PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > mysql.general > Copying InnoDB files to remote server -> remote server won't start
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Copying InnoDB files to remote server -> remote server won't start

Réponse
 
LinkBack Outils de la discussion
Vieux 11/09/2007, 22h44   #1 (permalink)
Whil Hentzen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Copying InnoDB files to remote server -> remote server won't start

Hi gang,

After reading through two years of 'how do I back up my database'
threads, I'm trying out the various backup mechanisms offered up.

I've read through these steps:
http://dev.mysql.com/doc/refman/5.0/...db-backup.html

Running a local box and a remote box, both with Fedora 6, MySQL 5.
Trying to copy a local /var/lib/mysql/mydata InnoDB.

The problem: After I copy InnoDB files to a remote box, the MySQL server
on the remote box won't restart. Here are the steps I've followed:

1. Stop the local and remote servers
2. Rename the remote ibdata and ib_logfile0 files
3. Copy the local ibdata and ib_logfile0 files to the remote
/var/lib/mysql folder
4. Copy the local /var/lib/mysql/mydata/* to the remote
/var/lib/mysql/mydata/* folder (contains one .frm and db.opt)
5. Change the ownership of the remote files and folders to 'mysql'
6. Restart the remote server (service mysqld start)
7. Failure, with a 'timeout' error

There is no error log created in the remote /var/lib/mysql folder.

When I rid the copied files and folders, and then rename the originals
back to their initial names, the server starts up nice and neat again.

I can copy a MyISAM database from the local box to the remote box and it
is accessible via the remote MySQL server just fine.

Obviously, there is something wrong in the way I'm copying the InnoDB
files.

What am I missing?

Whil
  Réponse avec citation
Vieux 11/09/2007, 23h17   #2 (permalink)
Whil Hentzen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Copying InnoDB files to remote server -> remote server won'tstart

Michael Dykman wrote:
> if you see no errors, check your config... are you sure InnoDB is enabled ?


I can create a new database and add InnoDB tables to it without problems.

Ack, I lied. No error in the /var/lib/mysql, but there IS an error file
in /var/logs, and it contains:

"./ibdata1: error 13 in a file operation"
"mysqld does not have access rights to the directory"

But..... I'm sitting here looking and I can't see any difference between
the ibdata1 and the ibdata1_orig files, nor the folders that contain the
..frm files either.

There must be something but I sure can't see it...

Whil

> On 9/11/07, Whil Hentzen <amp07@softwaremuscle.com> wrote:
>> Hi gang,
>>
>> After reading through two years of 'how do I back up my database'
>> threads, I'm trying out the various backup mechanisms offered up.
>>
>> I've read through these steps:
>> http://dev.mysql.com/doc/refman/5.0/...db-backup.html
>>
>> Running a local box and a remote box, both with Fedora 6, MySQL 5.
>> Trying to copy a local /var/lib/mysql/mydata InnoDB.
>>
>> The problem: After I copy InnoDB files to a remote box, the MySQL server
>> on the remote box won't restart. Here are the steps I've followed:
>>
>> 1. Stop the local and remote servers
>> 2. Rename the remote ibdata and ib_logfile0 files
>> 3. Copy the local ibdata and ib_logfile0 files to the remote
>> /var/lib/mysql folder
>> 4. Copy the local /var/lib/mysql/mydata/* to the remote
>> /var/lib/mysql/mydata/* folder (contains one .frm and db.opt)
>> 5. Change the ownership of the remote files and folders to 'mysql'
>> 6. Restart the remote server (service mysqld start)
>> 7. Failure, with a 'timeout' error
>>
>> There is no error log created in the remote /var/lib/mysql folder.
>>
>> When I rid the copied files and folders, and then rename the originals
>> back to their initial names, the server starts up nice and neat again.
>>
>> I can copy a MyISAM database from the local box to the remote box and it
>> is accessible via the remote MySQL server just fine.
>>
>> Obviously, there is something wrong in the way I'm copying the InnoDB
>> files.
>>
>> What am I missing?
>>
>> Whil
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe: http://lists.mysql.com/mysql?unsub=mdykman@gmail.com
>>
>>

>
>


  Réponse avec citation
Vieux 12/09/2007, 01h10   #3 (permalink)
Baron Schwartz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Copying InnoDB files to remote server -> remote server won'tstart

Whil Hentzen wrote:
> Michael Dykman wrote:
>> if you see no errors, check your config... are you sure InnoDB is
>> enabled ?

>
> I can create a new database and add InnoDB tables to it without problems.
>
> Ack, I lied. No error in the /var/lib/mysql, but there IS an error file
> in /var/logs, and it contains:
>
> "./ibdata1: error 13 in a file operation"
> "mysqld does not have access rights to the directory"
>
> But..... I'm sitting here looking and I can't see any difference between
> the ibdata1 and the ibdata1_orig files, nor the folders that contain the
> .frm files either.


Ownership and permissions are both identical?
  Réponse avec citation
Vieux 12/09/2007, 02h30   #4 (permalink)
Whil Hentzen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Copying InnoDB files to remote server -> remote server won'tstart

Baron Schwartz wrote:
> Whil Hentzen wrote:
>> Michael Dykman wrote:
>>> if you see no errors, check your config... are you sure InnoDB is
>>> enabled ?

>>
>> I can create a new database and add InnoDB tables to it without problems.
>>
>> Ack, I lied. No error in the /var/lib/mysql, but there IS an error
>> file in /var/logs, and it contains:
>>
>> "./ibdata1: error 13 in a file operation"
>> "mysqld does not have access rights to the directory"
>>
>> But..... I'm sitting here looking and I can't see any difference
>> between the ibdata1 and the ibdata1_orig files, nor the folders that
>> contain the .frm files either.

>
> Ownership and permissions are both identical?


As best as I can tell - here's the remote machine list:

drwxr-xr-x 11 mysql mysql 4096 Sep 11 18:29 .
drwxr-xr-x 33 root root 4096 May 10 11:17 ..
drwx------ 2 mysql mysql 4096 Sep 11 13:22 delme
drwx------ 2 mysql mysql 4096 Sep 11 14:19 delmeinno
-rw-r----- 1 mysql mysql 10485760 Sep 11 17:10 ibdata1
-rw-rw---- 1 mysql mysql 10485760 Sep 11 14:19 ibdata1_5
-rw-r----- 1 mysql mysql 5242880 Sep 11 17:10 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Sep 11 14:20 ib_logfile0_5

There are two databases here.

delme is MyISAM. Works fine.
delmeinno is the InnoDB. The original works fine.

ibdata1 and ib_logfile0 are the original InnoDB files. They work fine.

ibdata1_5 and ib_logfile0_5 are the InnoDB files that were copied from
the local box. Yes, i see that these have 'w' permissions for mysql
group but I can't see why that would matter or cause the error that is
occurring.

When I get rid of the ibdata1 and ib_logfile0 files (move them
elsewhere), and then rename the '5's so that MySQL tries to access
those, the MySQL server won't start.

Whil
  Réponse avec citation
Vieux 13/09/2007, 03h20   #5 (permalink)
Baron Schwartz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Copying InnoDB files to remote server -> remote server won'tstart

Whil Hentzen wrote:
> Baron Schwartz wrote:
>> Whil Hentzen wrote:
>>> Michael Dykman wrote:
>>>> if you see no errors, check your config... are you sure InnoDB is
>>>> enabled ?
>>>
>>> I can create a new database and add InnoDB tables to it without
>>> problems.
>>>
>>> Ack, I lied. No error in the /var/lib/mysql, but there IS an error
>>> file in /var/logs, and it contains:
>>>
>>> "./ibdata1: error 13 in a file operation"
>>> "mysqld does not have access rights to the directory"
>>>
>>> But..... I'm sitting here looking and I can't see any difference
>>> between the ibdata1 and the ibdata1_orig files, nor the folders that
>>> contain the .frm files either.

>>
>> Ownership and permissions are both identical?

>
> As best as I can tell - here's the remote machine list:
>
> drwxr-xr-x 11 mysql mysql 4096 Sep 11 18:29 .
> drwxr-xr-x 33 root root 4096 May 10 11:17 ..
> drwx------ 2 mysql mysql 4096 Sep 11 13:22 delme
> drwx------ 2 mysql mysql 4096 Sep 11 14:19 delmeinno
> -rw-r----- 1 mysql mysql 10485760 Sep 11 17:10 ibdata1
> -rw-rw---- 1 mysql mysql 10485760 Sep 11 14:19 ibdata1_5
> -rw-r----- 1 mysql mysql 5242880 Sep 11 17:10 ib_logfile0
> -rw-rw---- 1 mysql mysql 5242880 Sep 11 14:20 ib_logfile0_5
>
> There are two databases here.
>
> delme is MyISAM. Works fine.
> delmeinno is the InnoDB. The original works fine.
>
> ibdata1 and ib_logfile0 are the original InnoDB files. They work fine.
>
> ibdata1_5 and ib_logfile0_5 are the InnoDB files that were copied from
> the local box. Yes, i see that these have 'w' permissions for mysql
> group but I can't see why that would matter or cause the error that is
> occurring.


Give it a try making the permissions identical anyway and just see what
happens. There might be something funny going on, such as the server
running as a different group than you think.

Baron
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h22.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,14635 seconds with 13 queries