Home > Database > Mysql Tutorial > 把 MySQL 从 Windows 上移植到 Linux 下

把 MySQL 从 Windows 上移植到 Linux 下

WBOY
Release: 2016-06-07 16:53:48
Original
1152 people have browsed it

Windows下导出,在命令行下mysql\bin目录下运行:mysqldump -uroot -p密码 -a gt;mysql_data.sql将文件 mysql_data.sql

Windows下导出,在命令行下mysql\bin目录下运行:

mysqldump   -uroot   -p密码   -a   >mysql_data.sql

将文件   mysql_data.sql   复制到Linux下.

Linux下运行:

mysql   -uroot   -p密码  

上面的方法是可以的,最好能加上参数--default-character-set=gb2312(gbk等)

要打开所备份出来的sql文件,最好用utraledit或editplus之类打开.

另外,如果所有的表类型都是myisam的话,就更简单,把那个数据库打包成.zip文件,传到Linux下mysql/var目录,再解压就可以了.

 

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template