Page 1 of 1

large database

Posted: Mon Nov 07, 2005 4:51 am
by s.dot
excuse my n00bness. ive only used phpmyadmin when dealing with databases (mysql). my question is how do i upload a database that is larger than what phpmyadmin will allow? do i export the database and save it as a php file and run the page?

Posted: Mon Nov 07, 2005 5:02 am
by Chris Corbyn
Well the actual import query is:

Code: Select all

mysql>  \.  /path/to/sql/dump.sql
.... (Inserting data etc etc...)
If you have access to a command line version of the mysql client on your server just import the dump in that way.

If not: (I've never tried this), try running that query from within php.

Code: Select all

mysql_query("\\. /path/to/sql/dump.sql") or die (mysql_error());
You can just upload the file by FTP... or use SCP and SSH if you have shell access since you should definitely be able to import that data in that way ;)

Posted: Mon Nov 07, 2005 5:16 am
by n00b Saibot
I once tried running 21MB INSERTs and it just gave me blank response... not even a timeout error :( not even phpmyadmin could help even though i had exported it thru myadmin still it would accept the file. would you believe it I got page not found error on uploading the SQL dump thru phpmyadmin. :lol:

Posted: Mon Nov 07, 2005 5:33 am
by Chris Corbyn
It's most likely that the web server itself is timing out rather than phpMyAdmin. Something beyod phpMyAdmin's control. I prefer the command line anyway (I like to watch all those "Query OK, 1 rows affected" messages whizz past my eyes :D)

Posted: Mon Nov 07, 2005 5:43 am
by n00b Saibot
d11wtq wrote:It's most likely that the web server itself is timing out rather than phpMyAdmin.
I also thought so... but I had only FTP access so i couldn;t go for cmdline option :(
d11wtq wrote:I prefer the command line anyway (I like to watch all those "Query OK, 1 rows affected" messages whizz past my eyes :D )
Yeah! CMDLINE ROCKS! Makes you a geek 8)