Not the answer you need?
Register and ask your own question!

mysqldump import status mysql < filename

sanjay92sanjay92 ContributorCurrent User Role Beginner
-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.

Comments

  • scott.nemesscott.nemes MySQL Sage Current User Role Patron
    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
  • sanjay92sanjay92 Contributor Current User Role Beginner
    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.
  • scott.nemesscott.nemes MySQL Sage Current User Role Patron
    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).

    http://www.rackaid.com/blog/linux-sc...al-and-how-to/

    -Scott
  • sanjay92sanjay92 Contributor Current User Role Beginner
    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.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.