Koozali.org: home of the SME Server

mysqlimport Question

wallyrp

mysqlimport Question
« 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.

gardnc

mysqlimport Question
« Reply #1 on: January 29, 2005, 12:18:51 AM »
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

wallyrp

mysqlimport Question
« Reply #2 on: January 29, 2005, 03:35:04 AM »
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....

ergozd

mysqlimport Question
« Reply #3 on: January 29, 2005, 09:08:42 AM »
Hi there!

What version of MySQL are you running?

Code: [Select]
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


Code: [Select]
[mysqlimport]
local = 1


then re-gererate your my.cnf file
/sbin/e-smith/expand-template /etc/my.cnf

Best rgds, Ergin

Offline rssmith

  • 3
  • +0/-0
mysqlimport Question
« Reply #4 on: February 20, 2005, 10:18:38 PM »
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