Moving of databases from one server to another

Moving of databases from one server to another

am 08.12.2010 09:51:33 von machielr

--=-uYqvCIyEimqMKDp6WH0q
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

HI All

I am hoping someone has had this before as this one is baffling me
entirely.

We did a MySQL database move from one machine to another one last
night.

The O/S versions are the same and so are the database version
(5.1.22).

The database was installed and configured on the new machine and
was running perfectly. no issues.

Seeing that both versions would be exactly the same, we decided
to do a full backup including the mysql database in order to preserve
all permissions etc... and then restore this to the new machine.

The backup and restore went through without any issues
whatsoever.

However when I used the /etc/init.d/mysql script to restart the
database, I started getting errors during shutdown and startup
procedure.

Despite this the database did start up and was accessible,
however even when running /etc/init.d/mysql status command I get errors
as below (these are the same received during startup):




/etc/init.d/mysql status
/usr/bin/mysqladmin: connect to
server at 'localhost' failed
error: 'Access denied for user
'debian-sys-maint'@'localhost' (using password: YES)'
*

I have tried to look on the net for answers but nothing was
found to resolve this. I have reset the passwords for this user (also
getting the same error for root@localhost).
One site also suggested correcting the password in
the /etc/mysql/debian.cnf which I did, but still getting these messages.


This is a production system and I am a bit concerned to the
fact that the startup script does not work properly.


Is there anyone who has had this issue before and have
been able to resolve it?

Thank you in advance for any help on this matter.


Regards
Machiel






--=-uYqvCIyEimqMKDp6WH0q--

Re: Moving of databases from one server to another

am 08.12.2010 10:01:01 von Ananda Kumar

--00163683351847020a0496e25ca8
Content-Type: text/plain; charset=ISO-8859-1

copy the /etc/init.d/mysql file from your old m/c to the new and try the
start/stop.

regards
anandkl

On Wed, Dec 8, 2010 at 2:21 PM, Machiel Richards wrote:

> HI All
>
> I am hoping someone has had this before as this one is baffling me
> entirely.
>
> We did a MySQL database move from one machine to another one last
> night.
>
> The O/S versions are the same and so are the database version
> (5.1.22).
>
> The database was installed and configured on the new machine and
> was running perfectly. no issues.
>
> Seeing that both versions would be exactly the same, we decided
> to do a full backup including the mysql database in order to preserve
> all permissions etc... and then restore this to the new machine.
>
> The backup and restore went through without any issues
> whatsoever.
>
> However when I used the /etc/init.d/mysql script to restart the
> database, I started getting errors during shutdown and startup
> procedure.
>
> Despite this the database did start up and was accessible,
> however even when running /etc/init.d/mysql status command I get errors
> as below (these are the same received during startup):
>
>
>
>
> /etc/init.d/mysql status
> /usr/bin/mysqladmin: connect to
> server at 'localhost' failed
> error: 'Access denied for user
> 'debian-sys-maint'@'localhost'
> (using password: YES)'
> *
>
> I have tried to look on the net for answers but nothing was
> found to resolve this. I have reset the passwords for this user (also
> getting the same error for root@localhost).
> One site also suggested correcting the password in
> the /etc/mysql/debian.cnf which I did, but still getting these messages.
>
>
> This is a production system and I am a bit concerned to the
> fact that the startup script does not work properly.
>
>
> Is there anyone who has had this issue before and have
> been able to resolve it?
>
> Thank you in advance for any help on this matter.
>
>
> Regards
> Machiel
>
>
>
>
>
>

--00163683351847020a0496e25ca8--

Re: Moving of databases from one server to another

am 08.12.2010 11:02:55 von Johan De Meersman

--0021cc022382a6fd2c0496e339b4
Content-Type: text/plain; charset=ISO-8859-1

That's a very Debian-specific issue. The credentials for the
debian-sys-maint user are randomly generated at install, and stored in
/etc/mysql/debian.cnf. Either copy the file from the old to the new machine,
or update the user's password on the new machine to the one in the file.



On Wed, Dec 8, 2010 at 9:51 AM, Machiel Richards wrote:

> HI All
>
> I am hoping someone has had this before as this one is baffling me
> entirely.
>
> We did a MySQL database move from one machine to another one last
> night.
>
> The O/S versions are the same and so are the database version
> (5.1.22).
>
> The database was installed and configured on the new machine and
> was running perfectly. no issues.
>
> Seeing that both versions would be exactly the same, we decided
> to do a full backup including the mysql database in order to preserve
> all permissions etc... and then restore this to the new machine.
>
> The backup and restore went through without any issues
> whatsoever.
>
> However when I used the /etc/init.d/mysql script to restart the
> database, I started getting errors during shutdown and startup
> procedure.
>
> Despite this the database did start up and was accessible,
> however even when running /etc/init.d/mysql status command I get errors
> as below (these are the same received during startup):
>
>
>
>
> /etc/init.d/mysql status
> /usr/bin/mysqladmin: connect to
> server at 'localhost' failed
> error: 'Access denied for user
> 'debian-sys-maint'@'localhost'
> (using password: YES)'
> *
>
> I have tried to look on the net for answers but nothing was
> found to resolve this. I have reset the passwords for this user (also
> getting the same error for root@localhost).
> One site also suggested correcting the password in
> the /etc/mysql/debian.cnf which I did, but still getting these messages.
>
>
> This is a production system and I am a bit concerned to the
> fact that the startup script does not work properly.
>
>
> Is there anyone who has had this issue before and have
> been able to resolve it?
>
> Thank you in advance for any help on this matter.
>
>
> Regards
> Machiel
>
>
>
>
>
>


--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

--0021cc022382a6fd2c0496e339b4--

Re: Moving of databases from one server to another

am 08.12.2010 11:05:12 von machielr

--=-Xf+xoHmUB/2bSMP3ACm2
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

Hi Johan

Would the server require a restart after this or not?

Machiel

-----Original Message-----
From: Johan De Meersman
To: Machiel Richards
Cc: mysql mailing list
Subject: Re: Moving of databases from one server to another
Date: Wed, 8 Dec 2010 11:02:55 +0100

That's a very Debian-specific issue. The credentials for the
debian-sys-maint user are randomly generated at install, and stored
in /etc/mysql/debian.cnf. Either copy the file from the old to the new
machine, or update the user's password on the new machine to the one in
the file.



On Wed, Dec 8, 2010 at 9:51 AM, Machiel Richards
wrote:

HI All

I am hoping someone has had this before as this one is
baffling me
entirely.

We did a MySQL database move from one machine to another one
last
night.

The O/S versions are the same and so are the database
version
(5.1.22).

The database was installed and configured on the new
machine and
was running perfectly. no issues.

Seeing that both versions would be exactly the same, we
decided
to do a full backup including the mysql database in order to
preserve
all permissions etc... and then restore this to the new machine.

The backup and restore went through without any issues
whatsoever.

However when I used the /etc/init.d/mysql script to
restart the
database, I started getting errors during shutdown and startup
procedure.

Despite this the database did start up and was
accessible,
however even when running /etc/init.d/mysql status command I get
errors
as below (these are the same received during startup):




/etc/init.d/mysql status
/usr/bin/mysqladmin:
connect to
server at 'localhost'
failed
error: 'Access denied for
user

'debian-sys-maint'@'localhost' (using password: YES)'
*

I have tried to look on the net for answers but
nothing was
found to resolve this. I have reset the passwords for this user
(also
getting the same error for root@localhost).
One site also suggested correcting the password in
the /etc/mysql/debian.cnf which I did, but still getting these
messages.


This is a production system and I am a bit concerned
to the
fact that the startup script does not work properly.


Is there anyone who has had this issue before and
have
been able to resolve it?

Thank you in advance for any help on this matter.


Regards
Machiel








--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

--=-Xf+xoHmUB/2bSMP3ACm2--

Re: Moving of databases from one server to another

am 08.12.2010 11:15:52 von Johan De Meersman

--0021cc022382ee79d60496e367c1
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Dec 8, 2010 at 11:05 AM, Machiel Richards wrote:

> Hi Johan
>
> Would the server require a restart after this or not?
>

You can restart to check that the credentials in file and database match, to
avoid surprises later, but the server operation itself is not impacted by
this.

That user is used mostly for system-based maintenance: table checks at
startup, clean shutdown and package upgrade operations, plus during the
install of some other packags to create and initialize their necessary
databases.



--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

--0021cc022382ee79d60496e367c1--

Re: Moving of databases from one server to another

am 08.12.2010 12:38:43 von machielr

--=-bRu9TR7UxAfaL+zk33H1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

HI Johan

Thank you for the advice... Problem resolved.

Regards
Machiel

-----Original Message-----
From: Johan De Meersman
To: Machiel Richards
Cc: mysql mailing list
Subject: Re: Moving of databases from one server to another
Date: Wed, 8 Dec 2010 11:15:52 +0100



On Wed, Dec 8, 2010 at 11:05 AM, Machiel Richards
wrote:
Hi Johan

Would the server require a restart after this or not?


You can restart to check that the credentials in file and database
match, to avoid surprises later, but the server operation itself is not
impacted by this.

That user is used mostly for system-based maintenance: table checks at
startup, clean shutdown and package upgrade operations, plus during the
install of some other packags to create and initialize their necessary
databases.




--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

--=-bRu9TR7UxAfaL+zk33H1--