不要直接拷贝,用mysqldump备份。mysqldump -h172.20.6.250 -uroot -p123456 test > a.sql

解决方案 »

  1.   

    to:mathematecian
    这个命令是Unix下的不?
    我在mysql下敲mysql出错的(还是要设环境变量呢?)
    我现在用mysql是命令行(dos下)和那个mysql control center(图形界面)一起用,但在mysql cc下找不到怎么备份啊
      

  2.   

    比如说你的数据库名字叫 test,里面是你的若干表格;进入命令行,切换到mysql\bin目录下,nysqldump test > test.txt -u root;备份后的test.txt出现在bin目录下;你将test.txt 拷贝到要转移到的数据库的bin目录下;进入命令行,进入mysqlmysql create database test;然后退回到命令行,mysql test < test.txt -u root.
    察看test中的表,应该转移成功了。
      

  3.   

    不是在mysql下备份,是在命令行备份。
      

  4.   

    谢谢楼上的,我试了下
    mysqldump:Got error:1045:Access denied for user 'odbc'@'localhost'(using password;NO)
    when trying to connect
    我怎么输入密码获得权限?