Can you please help me how do I upload a database dump from the shell. I’m on OS X. What’s the Terminal command for it?
Got same problem, my database is too big, and got time exec error.
I try with bigdump.php, but on dreamhost, it doesn’t work.
So, what is the solution to uplaod big file of mysql.
Don’t know shell, putty, …and it looking difficult.
Haven’t tried OS X, but I believe that the following will work:
mysql --host=[i]DBSERVER[/i] --user=[i]DBUSER[/i] --password=[i]DBPASSWORD[/i] [i]DBNAME[/i] < [i]dump.sql[/i]where DBSERVER is the MySQL server name (e.g. mysql.yourdomain.com), DBUSER is your MySQL username, DBPASSWORD your MySQL password, DBNAME the name of the database and dump.sql is the file with your database dump.
mysql --host=[i]DBSERVER[/i] --user=[i]DBUSER[/i] --password=[i]DBPASSWORD[/i] [i]DBNAME[/i] < [i]dump.sql[/i]
You can run mysql --help to see all the options.
Earn FREE HOSTING through DreamHost Rewards!
Current promo: Code Monster!
do i have to connect to Dreamhost first? Or is the mysql application running from the local machine?
I’m not sure if I understand your questions correctly, but I will try to explain…
Yes, you have to connect to DreamHost first…
First you have to enable ssh/telnet for you username at DreamHost. You do that by choosing Users in the Control Panel. Check “Enable ssh/telnet”.
Now you can connect to the shell environment at DreamHost. On Windows I use a telnet/SSH client called PuTTY. On OS X I believe you can use the Terminal to connect to DreamHost’s server.
Try something like:
You can connect directly from your home (or office) computer to your DreamHost mysql database. In order to do this you will need to configure the list of allowed hosts for you database username to include your current ip address. If you want to do this, go to Goodies->MySQL in the control panel. Then select modify next to the mysql username that you will be using, and add your current ip address (shown on the page) to the list of allowed hosts.
Goodies->MySQL in the control panel also shows the mysql command line syntax for connecting to your specific database(s).
BTW, at least for me, this is one control panel change that seems to be applied instantaniously…
thanks guys for the help. it looks like it’s working without connecting even by using a local mysql. i can see it is uploading it slowly. very slowly actually… just 600B/s. is that normal?
Try with bigdump.php
I succes to do with it, just upload your file.sql and the file bigdump.php in a rep, after edit bigdump.php, and in the conf indicate the filename of your .sql, and all is fine.
on bigdump.php i have to edit the upload path manually in order to get it to work
[quote]Try with bigdump.php
God - they really should rename that one.