mysqldump import status mysql < filename

-bash-3.2$ mysql -u root -pmypassword < Data.sql

ERROR 1142 (42000) at line 35275: SELECT,LOCK TABL command denied to user ‘root’@‘localhost’ for table ‘cond_instances’
-bash-3.2$

I see some error while importing. What happens after first error , does import still keep going or just aborts. How do I know whether it has imported all dtabases/rows etc ?

Thanks a lot.

Hi sanjay92;

When the mysql command line client errors out during an import, the import stops. So I would first recommend running any imports you do in a screen session, which will help prevent the import form being killed due to inactivity or your session being terminated.

As for how to tell when the import is complete, your command will finish, and you will see your command prompt again with no error messages. To verify that the import is still running, connect to MySQL in another session and run “show processlist;” a few times to see the inserts from your import. To see how far along the import is, you could do a COUNT of the rows in a table being imported (with the understanding that anything you do may slow down the import further).

-Scott

Hi Scott, Thanks for your help. I don’t understand what do you mean by screen session. My session was not terminated or killed. I ran it interactively and my ssh connection is active and got my prompt back after ERROR was reported. I have exported all databases using mysqldump and was trying to import it back on another test server.
Looks like this issue is due to Performance Schema which was part of all databases export dump. I have to exclude performance schema during export dump.

Hi sanjay92;

Yes your specific error this time was unrelated to your session; I meant in the future, I recommend using screen, to prevent other issues when doing large imports. See the link below for one tutorial on screen (or Google it; there are a ton of tutorials).

[URL=“How To Use Linux Screen”]http://www.rackaid.com/blog/linux-sc...al-and-how-to/[/URL]

-Scott

Thanks Scott. I have used screen command in Unix and loved it. Sorry, I thought it has some thing to do with MySQL since my knowledge about MySQL is limited.
Thanks a lot for helping community.