SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2001
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQLDump problems...

    To make a long story short, i backed up a database a few days ago using mysqldump (the syntax was just your regular 'mysqldump -uuser -ppass database > data.sql')

    later on, i went in and fried the database, so i tried to do a import using mysqldump (the syntax was 'mysqldump -uuser -ppass database < data.sql'). now, for some odd reason, it does import all of the data for certain tables but not for others. it will import all of my members tables but none of my message tables. ive tried doing each table individually via 'mysqldump -uuser -ppass database table1 < data.sql' but it doesn't import the info in it. ive opened up data.sql in notepad and saw all of the insert statements for the table there, and yet when i run the mysqldump command, it ignores them (but not the create table statement above them).

    ive tried most of the switches they have and ive tried fragging the database completely, fragging just the tables, fragging the stuff in the tables. im out of ideas and this is my first attempt to restore a mysqldump file.

    any help?
    signature

  2. #2
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it's called mysqlDUMP for a reason. it's only for dumping, not restoring. i'm surprised if it somewhat worked... weird.

    to import, use mysql:

    Code:
    mysql -uuser -ppass database < file.sql
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  3. #3
    SitePoint Member
    Join Date
    Aug 2001
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *laughs*
    well ill be. your right. i probably would have figured it out sooner if it didn't partially work. unfortunatly, my mind state was "its importing only half of the tables. must be some special switch i must use".

    good to finally figure it out though. thanks. now my database is fully recovered
    signature


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •