Hello. I was wondering if there is a simple way to create a ySQL database offline and then upload it to my website? I have both mySQL and PHPMyAdmin on my website, but also have it set up on my own laptop (was using it for coursework), and as I'll be spending more than 14 hours on a train in the next two days I want to get some database work done so that I can just have it ready to load onto the website when i get back. I would rather not have to write an entire text file or SQL code to set up tables, etc, even though I could. Thanks. H.
Hi, You can download this free software and Install it on your Laptop. http://www.wampserver.com/en/ Rep me if its of any help regards,
Just configure the laptop the same way your main server is configured. Then work on the laptop as you would on your regular server. Then to transfer the data mysqldump -A | mysql -h server_name
Thanks. I'll try both of those suggestions, installing WAMP now and then will work on the databases on the train. As long as I can get them up onto the website (which is hosted on a paid webhost) I'll be happy - it'll save a lot of time and stop me getting bored. H.
Hello. I was trying to use the dump command, but am unsure of the syntax for my local machine. I'm using ssh under cygwin (basically as good as Unix) so would it just be: mysqldump orders | ssh /cygdrive/c/www/ mysql orders To transfer the database to my laptop. I would put: mysqldump orders | ssh mysql orders To get back to my website, but how do I reference the folder where the database is stored on my laptop, e.g the /cygdrive/c/www/ ? The /cygdrive part is the path to the folder on my laptop where I've got my website's files. Could I then import this into PHPMyAdmin? Sorry but still a little confused. H.
If it's a large database, upload it in gz format, 7zip is a great program for windows. Login to SSH. CD to the folder you uploaded to Run gunzip filename.gz Now run mysql command to import it. mysql -u username -p -q database < filename Works like a charm!