I want to move a MySQL database tables, data, everything from the old hosting company to the new database on my new hosting company. I have the .sql file, i.e. mynamedb.sql How do I do this - I'm tearing me hair out! Ta Darren
SSH into new server put SQL file on new server create empty DB on new server run from command line: mysql -u USERNAME -p DATABASENAME < FILE.SQL
Okay I know Im been very thick., but I don't have access to the SSH and when you say put SQL file on server, do you mean on my own webspace.. I have created DB on new server and was going to use the runcommand..
You can also login to the newly created DB and run the file as a sql command as well. If you are still having trouble, I know Mysql.com has a lot of good documentation on how to do this. http://dev.mysql.com/doc/refman/4.1/en/index.html
If you're paying a company to host the server, maybe their tech support could do it for you? They only have to start the command, not watch it run.. would take them 2 minutes. If you don't have access to SSH I'm not sure how you can do it.. assuming it is a fairly large database that you couldn't import with something like PHPMyAdmin (times out after 60 seconds or so). But yea.. you need to get the SQL file on to the new server.. you can FTP it there.. but then you have to issue the mysql commands from the SSH command line... unless it is a fairly small dataset, then you might be able to do it from a web interface.
Okay guys - thanks. I'll contact the hosting company. I've tried to load the .sql file and it has timed out, it is quite a big forum, so probably why. Ta Darren
Good idea. It isn't tough, but you need that SSH access. Might as well FTP it up there for them to start.
Let me know if you have any problems, a programmer I have used in the past has a script that will install the contents of a sql file into a database.
without shell level access you're programmer's script will likely fail as well. And if the script tries to upload the file and process it as it goes, well... the PHP 2MB timeout will take care of that
Like I said, without shell access (which is probably what your script uses to pull this off) it will likely fail. The .sql files were on the local server when you ran install.php right?
Installer.php and .sql file on the server, all thats needed was the database connection data (database name, username, password)
Im doing the same type of converstion from a vendor hosted server to my own and I have to back the database up in a .sql file and have created all my users, but is there something I have to do in order to deploy or unpack the .sql?
This command helped a lot. This was the last thing that I had to do before getting my LAMP server up and running on CentOS. Thanks!
If you have phpMyadmin, this is very easy. Go to your phpMyadmin -> select your database -> go to import -> select your .sql file -> click submit -> done!
I couldnt get phpMyAdmin to work, I did it all through AccuTerm SSH tunnel. Maybe now that I have the server up and running Ill start on phpMyAdmin to manage any future changes I need. Thanks.
hi .. thanks to all the tips I recently TRIED to move my localhost.sql to my new hosting phpadmin. The problem is the max per upload is 60 MB and my localhost.sql is more than 200 MB. Is there any solutions?
If the SQL isn't too large use PHPMyAdmin... If it is too large.. zip the SQL then ftp it from one server to the other.. extract.. and import into your mysql... You need SSH and most web hosts will give you access...
thanks netstar. I uploaded the 1.1 SQL file to hosting provider via FTP. They helped me to export to my SQL database. Now my site is up .. this is article directory bought from flippa http://articlefulltime.com/