Hi, how can I import my database to a webhost?
-
I have only ftp access, I I've alrady back up the database from sqlyog as db.sql.
-
Answer:
You can only use the type of database they allow you. Generally any hosting service who allows database use will offer mysql. In this case they should allow you a login to manage it. You then use that login to create a new database user just to run the sql from your scripts. Do NOT use the admin login (maybe called root login) they give you for this as it has too much power and an attacker can get total control on your system. You should give the new user rights to all tables in your database, but NOT allow GRANT rights. Also if you use no delete actions on the database do not allow the new user delete rights. You can then write a php script to create a connection as the admin user and run the .sql file in your document root. This can all be in one page, so you could paste the text of the .sql file into the php page. Then just browse to the file to make it create the new database. Maybe call it setup.php. As soon as you have the database created set the connection in your web site pages to the new user details. Then delete the setup file from the site, it is dangerous.
jay at Yahoo! Answers Visit the source
Related Q & A:
- how can I listen for database changes using java?Best solution by Stack Overflow
- How can I import bookmarks from an old Yahoo account?Best solution by Yahoo! Answers
- How can I import a recording from GarageBand to iTunes?Best solution by Yahoo! Answers
- How can I import an address book from Outlook Express to my Yahoo! addresses?Best solution by uk.answers.yahoo.com
- How can I import a video into my computer?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.