I just managed to use mysqldump to dump a database into a text file. Now I uploaded it into my server where i want to import it.
I tried looking up in google and came up with this command:
where web16u1 is my databse username and workready.txt is the file that contains all the CREATE TABLE stuff as output of mysqldump command.
I got the following error:
I can easily see the problem but how do I modify the command to make it include the database name?
You could do this two ways.
One is just to add the database name to the command line mysql command:
-
mysql -p --user=web16u1 databasename < workready.txt
-
Of course, substitute the word "databasename" with the name of the database.
What I usually do is to edit the mysqldump file, in your case workready.txt, and add the following line just before the first statement that tries to do anything to your database:
Again substitute your database name with the word "databasename". This is just a simple statement to change the current database.