large database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

large database

Post 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?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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 ;)
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post 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:
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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)
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post 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)
Post Reply