如何使用ftp上传数据库? [英] how to upload database using ftp?

查看:277
本文介绍了如何使用ftp上传数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个PHP网站,现在我想用HTML中的现有网站替换它.我有旧的ftp用户名和密码,但是如何上传.sql中的数据库.是否可以使用ftp上传数据库????

解决方案

请与您的托管服务提供商联系,他们将向您展示如何使用其软件. br/>

使用FTP上传数据库吗?
出于多种原因,可能无法实现:
1.不允许访问数据库目录
2.兼容版本
3.可能根本不支持数据库
4.您可能没有从命令提示符下运行和执行sql文件的权限

使用安装在计算机中的phpmyadmin应用程序创建数据库的完整结构(我正在谈论mysql).然后将该脚本上传到服务器并从该服务器运行该脚本. 3种可能的方式:
1.使用ftp上传sql文件.如果您有权运行msyql客户端,请执行sql文件
2.如果您具有该服务器的phpmyadmin访问权限,则只需使用该服务器上载sql文件并执行.
3.最后,您可以编写一个简单的PHP代码来执行sql文件.执行后,别忘了删除该php文件和sql文件


I have developed a PHP website and now i want to replace it with existing one which is in HTML.I have ftp username and password of old one but how can I upload my database which is in .sql. Is it possible to upload database using ftp???

解决方案

Check with your hosting provider they will show you how to do this with their software.


Uploading database using FTP?
Probably not possible for lots of reason:
1. You are not allowed to access database directory
2. Version in compatibility
3. May be database wont support at all
4. You may not have permission to run and execute sql file from command prompt

Create a Full structure of your database(I am talking about mysql) using your phpmyadmin application installed in your machine. then upload that script to the server and run the script from that server. 3 possible ways:
1. Upload sql file using ftp . if you have permission to run msyql client then execute the sql file
2. if you have phpmyadmin access of that server then just use that to upload your sql file and execute.
3. finally you can write a simple php code to execute the sql file. After executing don''t forget to remove that php file as well as sql file


这篇关于如何使用ftp上传数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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