Matthias Posted August 7, 2012 Share Posted August 7, 2012 Hey guys, I've been learning to build websites through w3schools and I've come to my first problem. I am trying to transfer across my sql database to another computer. I believe I have performed the sql dump successfully as I have a small sql file in my bin directory. But when I saved it to disk and inserted into the bin directory on the other computer it doesn't seem to be found. Could someone please confirm that this is the correct syntax to be used: "mysql dump -u [user] -p [password] [db name] < [db name.sql]". Note; i do not use the brackets in the actual syntax. Also does the version of mysql have to be exactly the same for the import to work? Link to comment Share on other sites More sharing options...
niche Posted August 7, 2012 Share Posted August 7, 2012 (edited) You can just switch files as you described. You can also export/import your tables with something like phpmyadmin. That's how I prefer to do it. Edited August 7, 2012 by niche 1 Link to comment Share on other sites More sharing options...
justsomeguy Posted August 7, 2012 Share Posted August 7, 2012 mysqldump is one word, that's the name of the program, and there should be no space before the password. It considers the space part of the password. You also use ">" to export, "<" is for importing. You can find the reference for the program including all of the available options here: http://dev.mysql.com.../mysqldump.html You can also export/import your tables with something like phpmyadmin. That's how I prefer to do it.Guess what phpMyAdmin uses to export databases. 2 Link to comment Share on other sites More sharing options...
niche Posted August 7, 2012 Share Posted August 7, 2012 If you mean mysqldump, I didn't know that. Thanks for the background jsg. Link to comment Share on other sites More sharing options...
Matthias Posted August 9, 2012 Author Share Posted August 9, 2012 Niice and justsomeguy, thank you guys for your help, I'll double check my syntax and if that fails I'll use phpmyadmin. Sorry in late reply and thank you guys once again. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now