@savedlema:- you are not following all the instructions we are giving.In my first post i have given the path but you are not following it. If you go to my blog,you will get everything you required. In second just change backslash to forward ... ... This step might be ignored if you have added this path to system variables. Please read all the solution properly.
There is another command to do that. Run following command in mysql command client. create database dbname; use dbname; source C:/Backup/dbname.sql; This is also provided in my blog that I have provided above.
take a look at http://adityangoyal.blogspot.in/2013/04/importexport-mysql-database.html .I have explained how to import and export mysql database.
* As what i can see,the error you are getting is because you have to set the path of mysql.exe in your system environment variable.
Go to System properties->Environment variable.In system varaiable->path.At end add semicolon and add the path of mysql.exe(location of mysql.exe eg:C:\Program Files\MySQL\MySQL Server 5.5\bin)
* Using command prompt go till the location of mysql.exe and then run above command
imBaCodes, there I had tried that, and there something that I could not figure out:
-I backed up a database successfully with mysqldump.
-In my live database, I deleted one user from a table that contained users information.
-I restored the database (with the same codes as you gave me) from the backup I created in step one. The command prompt shows that everything went well.
-Now I accessed the database to see if the record/user I deleted is back (since I restored the backup that contained him), the user WAS NOT THERE.
-I tried the same thing over and over, no success. I wonder what this is.
Can you explain that imBaCodes?
Thanks pixel, and ops, sorry, I had forgotten the /bin. I tried your two steps and, upon running the second one, it brought me lots of information about mysql version, Oracle...then it brough that list which is always brought to you when you miss a command. It brought me a lot of stuff, which I think, means that we missed something there in the second step. Can you figure it out please?
*Let me also declare that I'm looking for a script/code to take with me to an application I'm developing with VB.NET.
@savedlema:- you are not following all the instructions we are giving.In my first post i have given the path but you are not following it.
If you go to my blog,you will get everything you required.
In second just change backslash to forward
2) mysql -uroot -ppassword -hlocalhost dbname < C:/Backup/dbname.sql
cd C:\Program Files\MySQL\MySQL Server 5.5\bin
This step might be ignored if you have added this path to system variables.
savedlema .. it did not work beacause we just imported .. It did not update the database you have ..
if you are using phpmyadin just upload your backup .. in that case you will not have a prblem in your data..