text Mysql大数据库导入mamp mac

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Mysql大数据库导入mamp mac相关的知识,希望对你有一定的参考价值。

cd /Applications/MAMP/Library/bin
./mysql -uroot -proot
connect your_database_name
source /path/to/your/file/sql_export.sql

/////////////////



   $ mysqldump -u [uname] -p[pass] db_name > db_backup.sql
If it's all DBs, then:

   $ mysqldump -u [uname] -p[pass] --all-databases > all_db_backup.sql
If it's specific tables within a DB, then:

   $ mysqldump -u [uname] -p[pass] db_name table1 table2 > table_backup.sql
You can even go as far as auto-compressing the output using gzip (if your DB is very big):

   $ mysqldump -u [uname] -p[pass] db_name | gzip > db_backup.sql.gz
If you want to do this remotely and you have the access to the server in question, then the following would work (presuming the MySQL server is on port 3306):

   $ mysqldump -P 3306 -h [ip_address] -u [uname] -p[pass] db_name > db_backup.sql
It should drop the .sql file in the folder you run the command-line from.


mysql -u bn_magento -p  dbnamehere -S /opt/magento-1.9.2.4-3/mysql/tmp/mysql.sock < db_backup.sql


https://stackoverflow.com/questions/13484667/downloading-mysql-dump-from-command-line

以上是关于text Mysql大数据库导入mamp mac的主要内容,如果未能解决你的问题,请参考以下文章

MAMP:将大型数据库导入 phpMyAdmin

如何在Mac的MAMP中允许远程连接到mysql数据库

跨平台导入 MySQL 数据时出错(MAMP 到 WIMP)

使用 mamp、phpMyAdmin 导入 mysql 数据库

我可以在 xampp 和 mamp (mac amp) 之间共享同一个 mysql 数据库吗?

Mac MAMP + Navicat数据库连接注意事项