Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: wallyrp on January 28, 2005, 07:34:19 PM
-
Good Afternoon,
I'm attempting to restore my phphelpdesk database that I mysqldump'ed. I've read the manual but I'm evidently not grasping something. The dump went fine and I've viewed the dump file. The dump file looks like it has all the data that was in place before I dumped everything. Does anyone have any idea of how to restore or reimport this data.
Here's a sample of the commands I've tried and all resulting in this error:
Error message:
Connecting to localhost
Selecting database phphelpdesk
Loading data from SERVER file: /root/phphelpdesk.sql into phphelpdesk
mysqlimport: Error: Table 'phphelpdesk.phphelpdesk' doesn't exist, when using table: phphelpdesk
Disconnecting from localhost
Command lines:
mysqlimport -v -f -r -uroot -p***** phphelpdesk phphelpdesk.sql
mysqlimport -v -f -r phphelpdesk phphelpdesk.sql
mysqlimport phphelpdesk phphelpdesk.sql
Any ideas? I'm kind of stuck now that I've wiped out the box and can't restore the dadblame sql database.
-
I have great success restoring "dumped" mysql data by:
mysql -u whatever -p whatever database file.sql
Usually root and root password, data base you are restoring and the "dumped" file.
example:
mysql -u root -p k2304i2* industrial 2005-01-28_industrial.sql
Never used mysqlimport.
Larry
-
Good Evening,
Thanks for the info. I guess I figured out my problem without answering the question about mysqlimport. I used the sample phphelpdesk.mysql did "mysql < phphelpdesk.mysql" and then went into phpmyadmin, dropped all the tables. I then went "mysql -uroot phphelpdesk < phphelpdesk.sql" and it worked. I realize now that I could have just created an empty database with that name. After doing that, imported the information. Arrgghh....
-
Hi there!
What version of MySQL are you running?
If your mysqlimport's are not working anymore after the upgrade to mysql 4.0.22, try adding this to your my.cnf:
[mysqlimport]
local = 1
Or add "--local" to your scripts...
So cerate a new template
/etc/e-smith/templates-custom/etc/my.cnf/045import
[mysqlimport]
local = 1
then re-gererate your my.cnf file
/sbin/e-smith/expand-template /etc/my.cnf
Best rgds, Ergin
-
I have the same issue, although I am a noob at this - where do I put the dumped file, and where do i run the mysgl -u command from? I have winscp to copy the .sql file over