List:General Discussion« Previous MessageNext Message »
From:Tim Johnson Date:April 7 2014 4:02pm
Subject:Re: Excluding MySQL database tables from mysqldump
View as plain text  
* shawn l.green <shawn.l.green@stripped> [140407 07:05]:
> Hello Tim,
> 
> On 4/4/2014 10:27 PM, Tim Johnson wrote:
> >* Tim Johnson <tim@stripped> [140404 17:46]:
> >>Currently I'm running mysql on a Mac OSX partition.
> >>
> >>I have installed an ubuntu dual-booted partition and put mysql on
> >>it. I have already set up a mysql user on the ubuntu OS.
> >>
> >>In the past I have used mysqldump with just the --all-databases
> >>option to transfer data across different linux partitions.
> >>
> >>I'm wondering if I should explicitly exclude some of the tables from
> >>the mysql database. If so, which? perhaps mysql.user?
> >>
> >>thoughts? Opinions?
> >>thanks
> >   I should add the following:
> >
> >   1)the only user added to the new partition is the same as the
> >   primary non-root user on the Mac partition. Same credentials
> >
> >   2)this is a workstation - it is closed to the outside world.
> >
> >   FYI: ...
> >
> 
> There are several ways to select which data you want in the backup. You 
> can backup per-table, per-database, object type per database (routines, 
> triggers), or global objects (events). What level of detail you want to 
> copy from your old instance into your new instance is completely up to you.

  I've run into other problems, such as a 

  1)running mysqldump exactly as I would have in linux and not
  getting all databases. Dunno why, but keep on reading.

  2)mysqldump forces all database names to lower case in the "CREATE
  DATABASE" statement. I know, one shouldn't use upper case in
  database names, but :) tell that to my clients.

  It turns out '2)' is a known problem in Mac, but I just didn't
  know it...

  My workaround was to write a python app that uses the MySQLdb
  module to get the name of all databases, iterate through the list
  and selectively operate on them, and ensure that proper case is
  used in the "CREATE DATABASE" command..

  So I'm good here, I think.
  Thanks much for the reply.

-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com
Thread
Excluding MySQL database tables from mysqldumpTim Johnson5 Apr 2014
  • Re: Excluding MySQL database tables from mysqldumpTim Johnson5 Apr 2014
    • Re: Excluding MySQL database tables from mysqldumpshawn l.green7 Apr 2014
      • Re: Excluding MySQL database tables from mysqldumpTim Johnson7 Apr 2014
        • Re: Excluding MySQL database tables from mysqldumphsv8 Apr 2014
          • Re: Excluding MySQL database tables from mysqldumpTim Johnson8 Apr 2014