Need a Dump Truck
Results 1 to 8 of 8

Thread: Need a Dump Truck

  1. #1
    Senior Member
    Join Date
    Sep 2012
    Posts
    269

    Need a Dump Truck

    More like a 5-gal. bucket.

    When I do this inside a terminal shell:
    PHP Code:
    mysqldump -'root' -'gi...9' --all-databases all_db_backup.sql 
    I get a file that is measured in bytes. I've done the same on a different computer and get the same result. I have also tried to create a dump file from inside NaviCat on both machines and also get the same result.

  2. #2
    Senior Member traq's Avatar
    Join Date
    Jun 2011
    Location
    so.Cal
    Posts
    949
    ... not sure what your problem is. Do you mean to imply that data is missing from your dump?

  3. #3
    Senior Member
    Join Date
    Sep 2012
    Posts
    269
    Yes, data is missing from the dump. The file should be several megs.

  4. #4
    High Energy Magic Dept. NogDog's Avatar
    Join Date
    Aug 2006
    Location
    Ankh-Morpork
    Posts
    13,816
    Might also be worthwhile to look at what is actually in the file, too, just in case some interesting STDOUT stuff got redirected there.
    Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." ~ from Nation, by Terry Pratchett

    "But the main reason that any programmer learning any new language thinks the new language is SO much better than the old one is because hes a better programmer now!" ~ http://www.oreillynet.com/ruby/blog/...ck_to_p_1.html


    eBookworm.us

  5. #5
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,621
    Mysqldump dumps plain text, as you probably know, so I second NogDog ... take a look at see if it says anything. Like "your password is inconnect" or something ... perhaps your flavor uses different switches, etc.

    The other part, I guess ... from a client, can you verify there is actually data in the database?

    And last, doublecheck the filesize of the resulting file with more than one tool ... perhaps "du -hc dumpfile.sql" or similar?

    Just some thoughts.
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  6. #6
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,621
    Also, does it work for just one database (mysqldump -u root -p pass mysql). And does root have LOCK_TABLES privileges ... (should, of course).
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  7. #7
    Senior Member Derokorian's Avatar
    Join Date
    Apr 2011
    Location
    Denver
    Posts
    1,740
    For what its worth,

    If you use the short option form (-p), you cannot have a space between the option and the password.
    --Man

    Also note, none of the examples on that page or anywhere I can find use quotes around the username or password.
    Sadly, nobody codes for anyone on this forum. People taste your dishes and tell you what is missing, but they don't cook for you. ~anoopmail
    I'd rather be a comma, then a full stop.
    User Authentication in PHP with MySQLi - Don't forget to mark threads resolved - MySQL(i) warning

  8. #8
    Senior Member
    Join Date
    Sep 2012
    Posts
    269
    I know this is an old problem, but is has bitten me again. When I use dalecosp's
    mysqldump -u root -p pass mysql
    I get a whole lot of answers that are greek to me. The last line says:
    Got error: 1146: Table 'mysql.innodb_index_stats' doesn't exist when using LOCK TABLES
    I have re-installed MySQL-5.7.1-m11 twice and the table isn't created.

    The calls_to_dispatch.sql file simply reads:

    Code:
    /*
     Navicat Premium Data Transfer
    
     Source Server         : KathyString
     Source Server Type    : MySQL
     Source Server Version : 50701
     Source Host           : localhost
     Source Database       : calls_to_dispatch
    
     Target Server Type    : MySQL
     Target Server Version : 50701
     File Encoding         : utf-8
    
     Date: 07/19/2013 10:46:47 AM
    */
    I've found a whole bunch of varying answers on the web, but they don't agree at all. What are my options? Manually create the table? Where would I put it?

    As always, thanks for the help.

    tim
    Last edited by timstring; 07-19-2013 at 12:21 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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