SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Mar 2008
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trying to dump MySQL schema....

    Hey all.

    I'm trying to get a hold of MySQL and am trying to dump the schema. This is the command I'm using:

    mysql> mysqldump -user root -password=rootpass flatland > flatland.dump;

    And this is the error I'm getting:

    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqldump -user root -password=rootpass flatland > flatland.dump' at line 1

    Any suggestions? I'm running the latest version of MySQL.

  2. #2
    SitePoint Zealot
    Join Date
    Mar 2008
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using MySQL on a Mac (Leopard)

  3. #3
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    mysqldump is a OS command, not a mysql command. run that at an OS command prompt.
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  4. #4
    SitePoint Zealot
    Join Date
    Mar 2008
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I figured that out after much deliberation. I think I'm turning the corner on getting the jist of how MySQL works.

  5. #5
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    also you say you want to dump the schema but here you will dump the schema plus all records. use mysqldump with the --no-data option to dump only the schema


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
  •