FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 09-08-2012, 05:53 AM
Roger
 
Default mysqldump on Fedora 16 slightly OT

HI
I'm hoping Arjen or another mysql guru can help me with a mysql command
line entry.


I got this command line from Google
mysql mydb1 -u user -p password -e 'select tables like
"field_data_field%"'| xargs | mysqldump -u user -p password d7x


Where mydb1 is a Mysql database on my pc, a mysqldump of the server
database, which has several tables I do need to copy:
field_data_field, node, taxonomy, user and role to the d7x (drupal
7)database on my pc.

I need to copy table structure and content.
Apparently the tables are too big for phpmyadmin which seems to be
particularly limited to miniscule amounts of data.


The command line runs, produces terminal output of each table but puts
nothing into the tables of the d7x database.


I could copy a table one at a time but there are about 35 and a typo
could wreck things.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 09-08-2012, 07:22 AM
NOSpaze
 
Default mysqldump on Fedora 16 slightly OT

On Sat, 2012-09-08 at 15:53 +1000, Roger wrote:
> I got this command line from Google
> mysql mydb1 -u user -p password -e 'select tables like
> "field_data_field%"'| xargs | mysqldump -u user -p password d7x

I can't see the "select tables" command exists, although "tables" is a
table with all the tables list. Anyway, you can try something like this:

$ for table in $(mysql mydb1 -Bse 'show tables'); do mysqldump mydb1 $table>$table.sql; done

or using xargs,

$ mysql mydb1 -Bse 'show tables'|xargs -I TAB mysqldump mydb1 TAB -r TAB.sql

which produce both the same result.

Greetings.
--
Rodolfo Alcazar <nospaze@gmail.com>

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 12:15 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org