To do the restore:

1. Stop the MySQL server. On Windows NT/2000/XP you should use the command
"net stop mysql" assuming you have installed MySQL as a service. On
Unix/Linux, if you installed the init script, simply issue a command
something like "/etc/rc.d/init.d/mysql stop" or
"/etc/rc.d/init.d/mysql-server stop".
2. Start the MySQL server by skipping the grant tables::
               "mysqld-nt --skip-grant"  or
"mysqld_safe --skip-grant-tables"
3. If everything goes to plan, the command prompt will *not* return. Open a
new command prompt and load the data in using the MySQL client:
        "mysql < sql71.sql".
4. Type "mysql" and in the MySQL client type "flush tables" to flush the
data you just imported to disk.
5. Kill the MySQL server and restart it as you would normally.

Be aware that it is not normally recommended to drop the mysql database
since if you make a mistake you will have to recreate your security settings
by hand. You should probably try restoring the MySQL database using this
procedure on another system, then verify that the tables have been restored
correctly before running it on your main box, particularly if you really
need this to work (it sounds like you do!)

Also, if you did not delete the "test" database after you installed MySQL
*before* you did the backup, you will need to issue the command "drop
database test;" as well otherwise MySQL will choke there too.

HTH

Andrew.


----- Original Message ----- 
From: "Chuck Barnett" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 03, 2004 2:58 AM
Subject: restore from mysqldump file


> Hello, I have a huge problem that you guys may be able to help me with.
>
> I did a mysqldump   all databases into a sql71.sql file.
>
> when I try and I get the following error when trying to restore
>
> ERROR 1050 at line 204528: Table 'columns_priv' already exists
>
> I'm sure that this is for the mysql database.
>
> Im doing this to restore
> mysql --user=root -p < sql71.sql
>
> please give me some help on this....the .sql file is 170+megs in size.
>
>
> Thanks,
> Chuck
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>
>



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to