Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
1.00/5 (1 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???
Posted
Comments
Sergey Alexandrovich Kryukov 1-Jul-12 3:02am    
"Replace PHP Web site with HTML Web site" sounds gibberish.
--SA

Check with your hosting provider they will show you how to do this with their software.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 1-Jul-12 3:02am    
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... :-)
--SA
Mehdi Gholam 1-Jul-12 5:23am    
Thanks
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
 
Share this answer
 
Comments
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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900