| 7:56 am on Apr 15, 2003 (gmt 0)|
Use the 'Export' to SQL feature, export the structure (and data if wanted), create the new DB, import.
| 9:00 am on Apr 15, 2003 (gmt 0)|
How do you import the whole db?
do I have to convert it to a txt file or can I leave it as a sql file?
| 2:34 pm on Apr 15, 2003 (gmt 0)|
I would suggest two things:
1. .sql files *are* text files. Export to .sql file from your DB1 and open it with NotePad or a text editor, and try to understand what's going on inside. Check out different .sql files that are created as a result of choosing different options. I had a real "a ha" moment the first time I did that.
2. create a duplicate temp database for playing and testing, exporting from DB1 and importing to DB1_test on the same machine, for example. Make sure you play with and understand the options, like "add 'drop table.'" Change some data in the tables, and upload again--understand how some data can be overwritten and some can't.
| 3:52 pm on Apr 17, 2003 (gmt 0)|
I know it sounds stupid but it's just not working properly. I managed to export and then import the structure, but I can't import the data, I have no idea why. I exported the data to a .sql file but it's not importing. It's probably just something silly that I'm missing.
How can I do it with comand line in SSH?
| 4:06 pm on Apr 17, 2003 (gmt 0)|
down the page it talks about "SELECT ... INTO OUTFILE" that is what you need to get the info out and then you can use load data infile to bring it back in.
If that doesn't work then you could write a script to get the data and write it to a file and then get a script to insert it as well.