Click here to Skip to main content
14,599,199 members
Rate this:
Please Sign up or sign in to vote.
See more:
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???
"Replace PHP Web site with HTML Web site" sounds gibberish.
Rate this:
Please Sign up or sign in to vote.

Solution 1

Check with your hosting provider they will show you how to do this with their software.
Right, a 5.
By the way, did you notice OP actually wants to replace "PHP Web site" with "HTML Web site"? But the new one is with database as well. I can imagine... :-)
Mehdi Gholam 1-Jul-12 5:23am
Rate this:
Please Sign up or sign in to vote.

Solution 2

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
Jackin Shah 3-Jul-12 11:11am
i have done it now using cpanel by browing a database in it..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100