VPS侦探论坛

 找回密码
 注册
查看: 8517|回复: 3

[Oracle] 求教关于mysql导入导出的问题

[复制链接]
发表于 2012-2-20 15:27:18 | 显示全部楼层 |阅读模式

各位大虾:
      先说一下我的情况:我是在lnmp中想导出数据库news,因为这个news数据库太大,将近200M,所以phpmyadmin 无法导出和导入,所以想通过命令进行。
      问题来了,我用命令行导出,提示出错:

    mysql>  /usr/local/mysql/bin/mysqldump -u root -p *** news > 12345.sql;
    提示错误为:
    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
    'mysql>  /usr/local/mysql/bin/mysqldump -u root -p *** news > 12345.sql;"

    求教各位大虾了。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-2-20 15:32:02 | 显示全部楼层


看到军哥的帖子,我试了一下:
mysql> /usr/local/mysql/bin/mysqldump -uroot -p --all-databases > all.sql
    -> ;
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 '/usr/local/mysql/bin/mysqldump -uroot -p --all-databases > all.sql' at line 1

我的是2011年8,9月份的版本,是不是那时的版本无法用这个功能?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-2-20 15:38:27 | 显示全部楼层

犯2了,知道哪里错了。导出命令不应该运行mysql后执行。应该在root下进行。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-2-20 16:13:35 | 显示全部楼层



是ssh命令,不是mysql 里的命令
https://www.vpser.net/manage/mysql-import-export.html
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-5-17 11:17 , Processed in 0.027431 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表