如何通过Plesk将script.sql文件和数据库文件上传到GoDaddy? [英] How can I upload my script.sql file and my database file to GoDaddy via Plesk?

查看:106
本文介绍了如何通过Plesk将script.sql文件和数据库文件上传到GoDaddy?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过Plesk将数据库上传到GoDaddy的帮助.

我创建了一个名为"ph20800551931_FlixForFams"的数据库.在"Plesk数据库"面板中(本地数据库的原始名称为"Flix4FamsData").

我想上传/导入数据以及为在其服务器上重新创建数据库而生成的script.sql文件.

我已按照步骤此处,但无法建立连接.这是我在SQL Server Management Studio的连接到服务器"对话框中输入的:

...但是得到了这个错误消息:

我也尝试过首先通过Plesk中的文件"选项卡上载我的数据库备份文件,但是出现了一个错误消息,消息是该文件太大,并通过ftp传输-但它没有向我提供我所需的信息.可以使用FileZilla来做到这一点,即主机,用户名,密码和端口.

顺便说一句,无论是好是坏,我还尝试了以下步骤:

那么我需要采取什么步骤将script.sql文件上传到数据库"面板,以及在ftp'ing我的数据库文件并包括在内时要使用的主机,用户名,密码和端口是什么?在我的Plesk数据库面板中?

更新

压缩后我可以将数据库备份文件(.bak)上传到文件"区域(.zip文件大小是原始文件大小的1/6):

数据库及其表确实存在,但它们为空:

所以问题仍然存在:如何将数据库文件(在文件"区域中)获取到表中?我需要将压缩的.bak文件移动到何处(并将其解压缩),以便找到该文件,也可以从Plesk"My Little Admin"中访问该文件.或来自SSMS,或...?我实在感到难以置信,我必须跳过很多圈.

解决方案

由于安全问题.

话虽如此,您可以使用表和数据创建.SQL文件,将其压缩并使用导入数据库转储恢复.

创建.sql脚本文件

尽管我没有保存SSMS,但步骤应该非常相似.

  1. 打开Sql Server Management Studio
  2. 对象资源管理器面板上,在数据库上
  3. 右键单击
  4. 点击任务>生成脚本菜单项
  5. 按照向导中的步骤操作,然后选择为整个数据库和所有数据库对象编写脚本
  6. 完成向导并修改 .sql文件,以将数据库名称更改为与GoDaddy数据库相同的名称
  7. .sql压缩文件

导入数据库转储

  1. 转到您的GoDaddy产品页面.
  2. 单击Plesk管理员.
  3. 在左侧菜单中,单击数据库.
  4. 点击导入转储.
  5. 导入数据库转储"窗口将打开.
  6. 选择上载",然后单击浏览"以选择计算机上的ZIP存档.或者,选择导入以从目录中选择一个文件.
  7. 选中重新创建数据库",然后单击确定".

I need help uploading my database to GoDaddy via Plesk.

I created a database with the name "ph20800551931_FlixForFams" in the Plesk Databases panel (locally, the original name of my database is "Flix4FamsData").

I want to upload/import the data as well as the script.sql file that I generated for re-creating the database on their server.

I followed the steps here, but was unable to make a connection. This is what I entered in the Connect to Server dialog in SQL Server Management Studio:

...but got this err msg:

I also tried first uploading my database backup file via the Files tab in Plesk, but got an err msg that the file was too large, and to ftp it - but it doesn't provide me with the information I would need in order to do that using FileZilla, namely the Host, Username, Password, and Port.

By the way, for good (or bad) measure, I also tried the steps here; it shows an "Import Dump" icon on the plesk Databases tab, but I do not have such:

So what steps do I need to take to upload my script.sql file to the Databases panel, and what are the Host, Username, Password, and Port to use in ftp'ing my database file, and then getting it included in my Plesk Databases panel?

UPDATE

I was able to get the database backup file (.bak) uploaded to the Files area after zipping it (.zip file 1/6th the size of the original):

And the database and its tables do exist, but they are empty:

So the question remains: how can I get get the database file (in the Files area) into the tables? Where do I need to move the zipped .bak file (and extract it) so that it will be found or I can access it from either the Plesk "My Little Admin" or from SSMS, or...? It kind of boggles my mind that there are so many hoops I have to jump through.

解决方案

Unfortunately you cannot restore database from your own .bak file due to security concerns.

That being said you can create .SQL file with your table and data, zip it, and restore using Import Database Dump.

Creating .sql script file

Although I do not have save SSMS as you are steps should be pretty similar.

  1. Open Sql Server Management Studio
  2. Right click on you database on the Object Explorer panel
  3. Click on Tasks > Generate Scripts menu item
  4. Follow the steps in the wizard and select Script entire database and all database objects
  5. Finish wizard and modify .sql file to change database name to same name that your GoDaddy database have
  6. Zip .sql file

Importing Database Dump

  1. Go to your GoDaddy product page.
  2. Click Plesk Admin.
  3. In the left-hand menu click Databases.
  4. Click Import Dump.
  5. The Import Database Dump window will open.
  6. Select Upload and click Browse to choose a ZIP archive on your computer. Or, select Import to choose a file from the directory.
  7. Check Recreate the database, and then click OK.

这篇关于如何通过Plesk将script.sql文件和数据库文件上传到GoDaddy?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆