简体   繁体   English

PhpMyAdmin数据库导出。

[英]PhpMyAdmin database Export.

I am exporting database from PHPMYADMIN . 我正在从PHPMYADMIN导出数据库。 Database has 341 tables on remote server but when I import Sql file into local server PHPMYADMIN I got only 213 Tables. 数据库在远程服务器上有341个表,但是当我将Sql文件导入本地服务器PHPMYADMIN时,我只有213个表。

Question : 题 :

How can I get all tables of database on localhost. 如何获取本地主机上数据库的所有表。

phpmyadmin should export all when you do export -> quick, but try to use the custom option and make sure all are selected. 当您导出->快速时,phpmyadmin应该导出所有内容,但是请尝试使用自定义选项并确保已全部选中。 Also, may want to check the mysql mode (select @@global.sql_mode) of local and remote. 另外,可能要检查本地和远程的mysql模式(选择@@ global.sql_mode)。 If your local has default settings, there may be some tables with data in a column that's not allowed. 如果您的本地计算机具有默认设置,则可能有某些表的数据包含在不允许的列中。

Assuming that your database is pretty large then you may have more success with exporting it via the command line rather than phpMyAdmin: 假设您的数据库很大,那么通过命令行而不是phpMyAdmin导出数据库可能会更加成功:

/usr/bin/mysqldump -u USERANME -p DATABASE_NAME > output.sql

Run that, you'll be prompted for your database password and then you'll get output.sql containing your database 运行该命令,系统将提示您输入数据库密码,然后您将获得包含数据库的output.sql

You can then import this using .. 然后,您可以使用..导入

/usr/bin/mysql -u USERNAME -p DATABASE_NAME --no-create-db < output.sql

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM