Re: [CentOS] Problem getting mysqldump on Centos 5.x server

2013-04-24 Thread Les Mikesell
On Wed, Apr 24, 2013 at 2:06 PM, Bruce Whealton
 wrote:

>>Check out
> http://christiank.org/wp/2010/12/pipe-a-gzipped-mysql-dump-over-ssh/ for an
> example of how you might do this
>
> So, first it gave the usual error that relates to not enough disk space.

That doesn't make much sense.  If you are piping the output it
shouldn't need local disk space.

> Then it made the connection to the other server, asking me to accept a
> certificate that isn't known...  then asking for my password.  Finally, it
> creates a file that is only 805B in size.

You should be able to view that with 'less'  (which should
automatically uncompress if needed) to see what you got.

> So, I was doing the mysqldump on a Centos 5.x server and sending it to my
> own Linux Centos 6.x box that does have a url that allows ssh across the
> internet.  I suppose it wouldn't create the connection or the dump.sql.gz
> file if it could not connect to my Centos 6.x box.

Yes, but it does not sound like your mysqldump command generated the
right output.

> I wish I understood the makeup of how mysql actually saves a database.  I
> mean there is this mysql directory that has an directory for the same
> database that I am trying to get.  However, if I just copy those files, I
> don't know if that will give me a database or not.

I think it should, given reasonably similar mysql versions, but you
should be able to make the mysqldump| gzip| ssh command work.

--
   Les Mikesell
lesmikes...@gmail.com
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Problem getting mysqldump on Centos 5.x server

2013-04-24 Thread Bruce Whealton
 

>Bruce, one other option if you are low on diskspace is using ssh to pipe
the file to another server.

>Check out
http://christiank.org/wp/2010/12/pipe-a-gzipped-mysql-dump-over-ssh/ for an
example of how you might do this

So, first it gave the usual error that relates to not enough disk space.
Then it made the connection to the other server, asking me to accept a
certificate that isn't known...  then asking for my password.  Finally, it
creates a file that is only 805B in size.  

So, I was doing the mysqldump on a Centos 5.x server and sending it to my
own Linux Centos 6.x box that does have a url that allows ssh across the
internet.  I suppose it wouldn't create the connection or the dump.sql.gz
file if it could not connect to my Centos 6.x box.  

I wish I understood the makeup of how mysql actually saves a database.  I
mean there is this mysql directory that has an directory for the same
database that I am trying to get.  However, if I just copy those files, I
don't know if that will give me a database or not.

Bruce






 

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Problem getting mysqldump on Centos 5.x server

2013-04-24 Thread Bruce Whealton
>> 

Bruce, one other option if you are low on diskspace is using ssh to pipe the
file to another server.

Check out
http://christiank.org/wp/2010/12/pipe-a-gzipped-mysql-dump-over-ssh/ for an
example of how you might do this

 

On Wed, Apr 24, 2013 at 7:06 PM, Eero Volotinen 
wrote:

Hi Bruce,

Error 28 means that "not enought diskspace", free some more disk space and
try again.
>>

I freed up some space but we are back to the access denied.  But wait.  I
recall that I changed the password yesterday.

Ok, so we are back to the error that relates to the lack of disk space.  So,
I guess that other technique will put the sqldump file into the users home
folder on that other server.

Interestingly, it isn't the directory or partition that holds the mysql
files that is nearly full, it is the /usr and the /tmp.  The latter, even
when I recursively delete everything is still reporting as full.  So, my
curiosity is whether or not, for the purpose of piping it through to another
server, it still needs disk space from one of those partitions.  I'm not
sure otherwise, why it reports not enough disk space when the /home
partition has over 100GB free.  Maybe it needs space in the /tmp directory.
I'll see if I get the same error trying to pipe it through to another
server.

Bruce




 

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Problem getting mysqldump on Centos 5.x server

2013-04-24 Thread Clint Dilks
Bruce, one other option if you are low on diskspace is using ssh to pipe
the file to another server.

Check out
http://christiank.org/wp/2010/12/pipe-a-gzipped-mysql-dump-over-ssh/ for an
example of how you might do this



On Wed, Apr 24, 2013 at 7:06 PM, Eero Volotinen wrote:

> Hi Bruce,
>
> Error 28 means that "not enought diskspace", free some more disk space and
> try again.
>
> --
> Eero
>
>
> 2013/4/24 Bruce Whealton 
>
> > >
> > > If time is pressing, and he's not sure how to get mysqldump to
> > > function properly, I'd suggest shutting down the mysql server, taking
> > > a tarball backup of /var/lib/mysql (or wherever the database files
> > > are), compressing that (xz is nice for these purposes), and then
> > > getting the mysqldump backup.
> >
> > I'm a bit confused here.  If I get a tarball and compress that, then is
> > that
> > for download and moving to the other server?  Is this just in case the
> > mysqldump does not work at all.
> > >
> > > As for getting the mysql dump itself, if he's not sure what privileges
> > > are set up, I'd probably skip resetting permissions and instead taking
> > > the dump from a daemon running under --skip-grant-tables.
> >
> > So, I start mysql-server with the option --skip-grant-tables and then try
> > to
> > do the mysqldump?
> >
> > >
> > > It all depends on how much time he has before the system becomes
> > > unavailable to him.
> > >
> > >
> > In my previous email, I point out that the error now is different.  It is
> > error 28 from the storage engine.  So, I have to google that and see what
> > that means.
> >
> > Thanks,
> > Bruce
> >
> >
> > >Definitely another option.
> >
> > >The only thing I would say is if getting the dump under
> > --skip-grant-tables
> > you need to make absolutely >sure external access to the database is
> > blocked
> > as the daemon will presumably be running a lot longer in
> > ->-skip-grant-tables to complete a dump than it would be just to reset a
> > password.
> >
> > ___
> > CentOS mailing list
> > CentOS@centos.org
> > http://lists.centos.org/mailman/listinfo/centos
> >
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Problem getting mysqldump on Centos 5.x server

2013-04-24 Thread Eero Volotinen
Hi Bruce,

Error 28 means that "not enought diskspace", free some more disk space and
try again.

--
Eero


2013/4/24 Bruce Whealton 

> >
> > If time is pressing, and he's not sure how to get mysqldump to
> > function properly, I'd suggest shutting down the mysql server, taking
> > a tarball backup of /var/lib/mysql (or wherever the database files
> > are), compressing that (xz is nice for these purposes), and then
> > getting the mysqldump backup.
>
> I'm a bit confused here.  If I get a tarball and compress that, then is
> that
> for download and moving to the other server?  Is this just in case the
> mysqldump does not work at all.
> >
> > As for getting the mysql dump itself, if he's not sure what privileges
> > are set up, I'd probably skip resetting permissions and instead taking
> > the dump from a daemon running under --skip-grant-tables.
>
> So, I start mysql-server with the option --skip-grant-tables and then try
> to
> do the mysqldump?
>
> >
> > It all depends on how much time he has before the system becomes
> > unavailable to him.
> >
> >
> In my previous email, I point out that the error now is different.  It is
> error 28 from the storage engine.  So, I have to google that and see what
> that means.
>
> Thanks,
> Bruce
>
>
> >Definitely another option.
>
> >The only thing I would say is if getting the dump under
> --skip-grant-tables
> you need to make absolutely >sure external access to the database is
> blocked
> as the daemon will presumably be running a lot longer in
> ->-skip-grant-tables to complete a dump than it would be just to reset a
> password.
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Problem getting mysqldump on Centos 5.x server

2013-04-23 Thread Bruce Whealton
>
> If time is pressing, and he's not sure how to get mysqldump to 
> function properly, I'd suggest shutting down the mysql server, taking 
> a tarball backup of /var/lib/mysql (or wherever the database files 
> are), compressing that (xz is nice for these purposes), and then 
> getting the mysqldump backup.

I'm a bit confused here.  If I get a tarball and compress that, then is that
for download and moving to the other server?  Is this just in case the
mysqldump does not work at all.  
>
> As for getting the mysql dump itself, if he's not sure what privileges 
> are set up, I'd probably skip resetting permissions and instead taking 
> the dump from a daemon running under --skip-grant-tables.

So, I start mysql-server with the option --skip-grant-tables and then try to
do the mysqldump?

>
> It all depends on how much time he has before the system becomes 
> unavailable to him.
>
>
In my previous email, I point out that the error now is different.  It is
error 28 from the storage engine.  So, I have to google that and see what
that means.

Thanks,
Bruce


>Definitely another option.

>The only thing I would say is if getting the dump under --skip-grant-tables
you need to make absolutely >sure external access to the database is blocked
as the daemon will presumably be running a lot longer in
->-skip-grant-tables to complete a dump than it would be just to reset a
password.

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Problem getting mysqldump on Centos 5.x server

2013-04-23 Thread Bruce Whealton
Clint,
Thanks for the tip.  The server is running but I noticed when I was inside a
mysql session, I was getting messages that the mysql went away and then came
back.  Anyway, I updated the password and now I have 'Got error 28 from
storage engine' when trying to dump tablespaces
mysqldump: couldn't execute 'show fields from `jos_banner`': Got error 28
from storage engine (1030)
So, it might be getting stuck on the first table.
Or does it matter where you run this command?
Bruce

-Original Message-
From: centos-boun...@centos.org [mailto:centos-boun...@centos.org] On Behalf
Of Clint Dilks
Sent: Tuesday, April 23, 2013 9:42 PM
To: CentOS mailing list
Subject: Re: [CentOS] Problem getting mysqldump on Centos 5.x server

Hi Bruce

>From your message I am assuming that either you installed MySQL 
>yourself or
had some do it for you?

Is the mysql database currently running?  If not it should be.
Are you able to access the database using the command line tools ?  From the
machine its currently running on try

mysql -p ( when prompted enter the password you believe should work)

If it is running I suggest you schedule a time to shut it down and reset the
root password See
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html or Google

Moving the physical files associated with a MySQL Database can be made to
work if you absolutely must.  But getting a mysql dump is a much cleaner
approach.

I hope this helps :)






___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Problem getting mysqldump on Centos 5.x server

2013-04-23 Thread Clint Dilks
On Wed, Apr 24, 2013 at 1:56 PM, Michael Mol  wrote:

> On 04/23/2013 09:42 PM, Clint Dilks wrote:
> > Hi Bruce
> >
> >>From your message I am assuming that either you installed MySQL yourself
> or
> > had some do it for you?
> >
> > Is the mysql database currently running?  If not it should be.
> > Are you able to access the database using the command line tools ?  From
> > the machine its currently running on try
> >
> > mysql -p ( when prompted enter the password you believe should work)
> >
> > If it is running I suggest you schedule a time to shut it down and reset
> > the root password
> > See http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html or
> > Google
> >
> > Moving the physical files associated with a MySQL Database can be made to
> > work if you absolutely must.  But getting a mysql dump is a much cleaner
> > approach.
> >
> > I hope this helps :)
>
> If time is pressing, and he's not sure how to get mysqldump to function
> properly, I'd suggest shutting down the mysql server, taking a tarball
> backup of /var/lib/mysql (or wherever the database files are),
> compressing that (xz is nice for these purposes), and then getting the
> mysqldump backup.
>
> As for getting the mysql dump itself, if he's not sure what privileges
> are set up, I'd probably skip resetting permissions and instead taking
> the dump from a daemon running under --skip-grant-tables.
>
> It all depends on how much time he has before the system becomes
> unavailable to him.
>
>

Definitely another option.

The only thing I would say is if getting the dump under --skip-grant-tables
you need to make absolutely sure external access to the database is blocked
as the daemon will presumably be running a lot longer in
--skip-grant-tables to complete a dump than it would be just to reset a
password.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Problem getting mysqldump on Centos 5.x server

2013-04-23 Thread Michael Mol
On 04/23/2013 09:42 PM, Clint Dilks wrote:
> Hi Bruce
> 
>>From your message I am assuming that either you installed MySQL yourself or
> had some do it for you?
> 
> Is the mysql database currently running?  If not it should be.
> Are you able to access the database using the command line tools ?  From
> the machine its currently running on try
> 
> mysql -p ( when prompted enter the password you believe should work)
> 
> If it is running I suggest you schedule a time to shut it down and reset
> the root password
> See http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html or
> Google
> 
> Moving the physical files associated with a MySQL Database can be made to
> work if you absolutely must.  But getting a mysql dump is a much cleaner
> approach.
> 
> I hope this helps :)

If time is pressing, and he's not sure how to get mysqldump to function
properly, I'd suggest shutting down the mysql server, taking a tarball
backup of /var/lib/mysql (or wherever the database files are),
compressing that (xz is nice for these purposes), and then getting the
mysqldump backup.

As for getting the mysql dump itself, if he's not sure what privileges
are set up, I'd probably skip resetting permissions and instead taking
the dump from a daemon running under --skip-grant-tables.

It all depends on how much time he has before the system becomes
unavailable to him.



signature.asc
Description: OpenPGP digital signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Problem getting mysqldump on Centos 5.x server

2013-04-23 Thread Clint Dilks
Hi Bruce

>From your message I am assuming that either you installed MySQL yourself or
had some do it for you?

Is the mysql database currently running?  If not it should be.
Are you able to access the database using the command line tools ?  From
the machine its currently running on try

mysql -p ( when prompted enter the password you believe should work)

If it is running I suggest you schedule a time to shut it down and reset
the root password
See http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html or
Google

Moving the physical files associated with a MySQL Database can be made to
work if you absolutely must.  But getting a mysql dump is a much cleaner
approach.

I hope this helps :)




On Wed, Apr 24, 2013 at 1:20 PM, Bruce Whealton
wrote:

> Hello all,
> I have a dedicated hosting account that I am closing down but I am
> having problems getting an access denied error when I run the mysqldump
> command from the ssh prompt, logged in as root.  So, the hosting provider,
> who saw the same error, reported, " Hence, we would suggest you directly
> FTP
> the database from server to your machine by using ssh client."  I am not
> sure what that means.  Unless it means going into the /home/msyql directory
> and then into the corresponding directory for the particular db that I am
> trying to get.  This is for a joomla installation.  So, there are files
> that
> include db.opt and then jos_banner.frm, jos_banner.MYD, jos_banner.MYI, and
> etc.
> So, do I download all those files?
> I am wanting to move the site to another server which is a VPS hosting
> account that also runs Centos 5.x.
> Thanks in advance for any help,
> Bruce
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos