amy.damnit;10922661 wrote:So you are saying that if the resulting .SQL file from some action like "dump" is larger than 2MB then I'd have issues?
If you are accessing phpMyAdmin in a browser and need to upload a file larger than 2MB, you my have issues because this is the default upload_max_filesize for PHP. You might get your web hosting company to increase it, but maybe not.
amy.damnit;10922661 wrote:Can you give me a sense of how that translates into a Physical Database?
Not really sure. A MySQL dump has a lot of redundant data because it has all the SQL syntax like INSERT INTO table_name (field1, field2, field3) VALUES (blah blah blah) rather than just the data itself. Generally speaking, SQL dumps are larger than the original database, but that would depend on how, exactly, you dump the file. There are all kinds of options you can set.
amy.damnit;10922661 wrote:I mean is 2 MB big or small in the scheme of things? (It sounds tiny.)
It's fine if you are creating an empty db, but tiny if you have a db with any data in it. My dump is 345 MB as you may recall.
amy.damnit;10922661 wrote:Why the double-standard?
If a web-host prohibit phpMyAdmin to 2MB, then why GB's on a command-line SSH connection?
.
The double standard happens because phpMyAdmin is running using PHP which has its own limits in terms of the amount of memory that's permitted for a single script, the amount of time that is permitted for the script to run, and the maximum file size PHP lets some random asshole upload. the upload_max_filesize value is there for your protection -- otherwise PHP is at risk for buffer overflow exploits or other hacker-type-stuff.
the command-line mysql client runs when you type 'mysql blah blah' from an SSH terminal window. I don't personally know if it has memory limitations or anything like that. At any rate, it seems to work for me. The basic idea is that you upload your enormous SQL dump using FTP, which can handle pretty much arbitrary file sizes, and then you run the command-line mysql command. It seems to work.
amy.damnit;10922661 wrote:If a web-host prohibit phpMyAdmin to 2MB, then why GB's on a command-line SSH connection?
Again, why the double-standard between uploading and downloading?
Shouldn't they take the same time and use the same bandwidth?
The basic idea again harks back to PHP. It has this limit in place so hackers don't upload 200 GB files to your hard drive and cause your computer to crash. PHP will cut them off after upload_max_filesize. Downloading is different. If you have a huge db on the server, the server probably has no problem outputting the whole thing. That may or may not be true, but it's been my experience that servers are much more willing to dole out data than to let you upload it.
amy.damnit;10922661 wrote:Oops, I think I am confused. You are saying the limits are just on time or they are on data-file size as well?
Was the 2MB file-size or something else?
Depending on the defaults set by your web host, PHP can limit the amount of memory available, the amount of time spent executing, the largest uploadable file, and a variety of other resource-related stuff for a given PHP script. The basic idea is to protect the server. I've inadvertently written plenty of endless loops myself which could easily bring a server to its knees. The server has to protect itself.
amy.damnit;10922661 wrote:Wow, so you think a web-host would only give me 30-60 seconds to run a query and/or transfer data??
It might. Or it might not. The default PHP install probably will. You can change this value on some servers by using [man]set_time_limit[/man]. Some web hosts will not let you change this (there's a thing called 'safe mode' which can be turned on which prevents your script from being able to alter this value.
amy.damnit;10922661 wrote:How hard is it to use SSH via command-line?
Not hard at all if you can type raw SQL statements. You login via SSH using a client like puTTY and then type 'mysql' which starts the command-line mysql client. Then you just start typing SQL -- like SHOW TABLES;
amy.damnit;10922661 wrote:How hard was it to write your SSH backup script?
The tricky part was making sure that I don't completely fill up my backup hard drive on the server. I set it up to only keep about a week's worth of backups and maybe leave one backup every month. It's not exactly beginner's stuff, but not rocket science either. I'd call it intermediate level programming. You have to be able to create a cron job.
amy.damnit;10922661 wrote:Does it run automatically?
Yes. Learn the wonders of cron.