Re: ReFilling mySQL Database with CSV file!!
| From: | Miles Thompson | Date: | Fri, 01 Feb 2002 12:29:01 +0000 |
| Subject: | Re: ReFilling mySQL Database with CSV file!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83118@lists.php.net to get a copy of this message | ||
Thomas,
What phpMyAdmin is doing is providing a graphic interface for mysqldump. So read the MySQL docs on that and it will give you a better idea of what you're getting.
What facilities do they provide at the new site? Will you have a shell, or is it a web interface? Will they provide a default database name to which you add your own tables and data?
The other problem is file size. Will you encounter any file size limitations uploading to your new provider?
Let's assume you do a dump with the data and structure to olddata.sql. You have ftp'd the file to /home/joe at the new ISP. The database name provided by the ISP is bftsplk, you have shell access and can use the mysql command line.
To import your data you would simply issue:
mysql bftsplk < /home/joe/olddata.sql
This will recreate your tables and load them with data.
The extension on the dump file does not matter, I just use .sql to tell me it is a different type of text file.
If the new location uses phpMyAdmin, you'll have to find out what options are provided for creation of tables and import of data. The administrator may be willing to do the import as part of your setup.
HTH - Miles Thompson
At 04:01 AM 2/1/2002 -0800, Thomas Edison Jr. wrote:
I have to shift my site to a new location. I have
enormous records in many tables in my database which
will be needed 2 be shifted to.
The 'phpMyAdmin' at my site allows me make dumps of
the Data in the CSV format. I haven't done this
before. These are the options it gives me :
1. Structure only
2. Structure and data
3. Data only
4. CSV for Ms Excel data
5. CSV data :
Fields terminated by ;
Fields enclosed by "
Fields escaped by /
Lines terminated by \r\n
6. Save as file
Can someone please tell me exactly which option should
i be choosing? And also, once i have chosen that and
saved the lot of .csv files on my computer. What is
going to be the process to re-fill the new Database &
It's new tables with the data in the saved .csv File?
Thanks,
T. Edison Jr.
=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : abraxastech@yahoo.com
Tel : 91-4546512/4522124
*******************************************
__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net