简体   繁体   English

如何使用SSH在mysql数据库的一张表中导入大数据(10GB)?

[英]How to Importing the large size(10GB) data in one table in mysql database using SSH?

I have more then 10 GB data in the one table. 我在一张表中有10 GB以上的数据。 I want to upload the 10 GB data in only single table. 我只想在单个表中上传10 GB数据。 Is this possible to upload the 10 GB data using the SSH ? 是否可以使用SSH上传10 GB数据? If no then how many maximum data upload in one time in one table using the SSH. 如果否,则使用SSH在一张表中一次上传多少个最大数据。

Please... 请...

Thank You. 谢谢。

upload the database file to your server and import it via the mysql command 将数据库文件上传到服务器并通过mysql命令导入

eg 例如

mysql -h HOSTNAME -u USERNAME -p DATABASENAME < file.sql

and enter the password when promoted 并在升级时输入密码

where... 哪里...

HOSTNAME = localhost/127.0.0.1/etc...
USERNAME = DB User
DATABASENAME = name of the database you are importing into

You can see the another solutions For BLUE HOST SERVER 您可以查看BLUE HOST SERVER的其他解决方案

Using SSH to import your MySQL database 使用SSH导入MySQL数据库

The file must be in .sql format. 该文件必须为.sql格式。 It can not be compressed in a .zip or .tar.gz file. 无法将其压缩为.zip或.tar.gz文件。

  1. Upload the SQL file to the server. 将SQL文件上传到服务器。
  2. If the database does not exist please create one with an user. 如果数据库不存在,请与用户一起创建一个。 Note the username and password. 记下用户名和密码。
  3. Log into the server through SSH 通过SSH登录服务器
  4. Navigate to the directory where your .sql file is. 导航到.sql文件所在的目录。

Type this this command: 键入以下命令:

mysql -p -u username database_name < file.sql 

OR 要么

https://my.bluehost.com/cgi/help/162 https://my.bluehost.com/cgi/help/162

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

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