SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    problem using mysqldump command

    Hello everyone,

    I am using the mysql program along with phpMyAdmin to run mysql queries and am having problems using the mysqldump command. This is the command line that should backup my database and put it in the file full_backup.sql:

    mysqldump -u root -p mypassword --all-databases > full_backup.sql

    When I put this command in my mysql command line client or the phpMyAdmin client I get this error:

    "#1064 - 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 -u root -p mypassword --all-databases >full_backup.sql' at line 1"

    Can someone help me with this...

    Thanks A lot...

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,276
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    mysqldump is a shell command, not a mysql command -- you don't run it from within phpmyadmin

    in fact, you don't have to run it at all, because phpmyadmin has a backup feature built in
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply r937....Your book is definately on my list....


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
  •