服务器端有ssh设置。
语句如下,结果一直错误。请各路大神帮忙。先谢过了。
Mysqldump –hxxx.xx.30.xx -Pxxx -u xxx -pxxxxx --default-character-set=utf8 mydatabase --skip-lock-tables> d:\mydatatest.sql

解决方案 »

  1.   

    多谢关注。C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin\mysql.exe  Ver 14.14 Distrib
    .5.20, for Win32 (x86)Connection id:          1
    Current database:
    Current user:           root@localhost
    SSL:                    Not in use
    Using delimiter:        ;
    Server version:         5.5.20 MySQL Community Server (GPL)
    Protocol version:       10
    Connection:             localhost via TCP/IP
    Server characterset:    utf8
    Db     characterset:    utf8
    Client characterset:    utf8
    Conn.  characterset:    utf8
    TCP port:               3306
    Uptime:                 3 hours 28 min 54 secThreads: 1  Questions: 56  Slow queries: 0  Opens: 33  Flush tables: 1  Open ta
    les: 0  Queries per second avg: 0.004
    --------------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 'mysq
    dump -hxxx.xx.xx.xx -Pxxxx -uxxxx -pxxxxxx --default-character-set=u' at
    line 1
      

  2.   

    你是在MYSQL命令行下运行上述命令?
    你在WINDOWS的DOS窗口下运行上述命令
      

  3.   

    看看3楼你贴的内容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 'mysq
     dump -hxxx.xx.xx.xx -Pxxxx -uxxxx -pxxxxxx --default-character-set=u' at
     line 1
      

  4.   

    +1
    这应该是你在MySQL命令行下运行的吧
      

  5.   

    多谢楼上两位,的确是我错了。不过还是有问题。C:\>Mysqldump –hxxx.xx.xx.xx -P xxxx -u root -p xxxxxx --default-character
    -set=utf8 lottery --skip-lock-tables> d:\lotterytest.sql
    Enter password: ***************
    mysqldump: Got error: 2003: Can't connect to MySQL server on 'localhost' (10061)
     when trying to connect