mysql - How do I import a single database from a .sql file that contains multiple databases -


how import single database backup file has multiple databases on it?

the main issue file 921mb can't open in notepad or of ide's have. if that, sql need , manually copy phpmyadmin.

it if import straight backup file.

i guess can't work

mysql -u root -p --database1 database1 < backup.sql 

can help? thanks

i had problem data loading scripts. scripts in form:

insert table(a,b,c) values((a0,b0,c0),(a1,b1,c1),...(a50000,b50000,c50000)); 

and contained 5 several dozen of these hyper-long statements. format wasn't recognizable system wanted import data into. needed form:

insert table(a,b,c) values(a0,b0,c0); insert table(a,b,c) values(a1,b1,c1); ... insert table(a,b,c) values(a50000,b50000,c50000); 

even smaller scripts several mb , took hour load text editor. making these changes in standard text editor out of question. wrote quick little java app read in first format , created text file consisting of second format. largest scripts took less 20 seconds total. yes, that's seconds not minutes. that's when lot of data quoted text had make parser quote-aware.

you can write own app (java, c#, perl, whatever) similar. write separate script file lines pertain database want. take few hours or days write , test app, has taken more research text editors work large files -- find out don't really.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -