user1551672
user1551672

Reputation: 119

Importing MySql Database to online web hosting site?

I'm doing this website and I first tested it locally. Everything works including the database. The form from the html automatically sends submitted data to my database. The problem is, I want to host it online. I already have the website. I use webfreehosting.net. How can I insert my database to the file manager? I checked out the mysql manager and it says it imports text files. But the database folder on my local disk has opt and frm files only.

Upvotes: 1

Views: 7995

Answers (4)

automaticAllDramatic
automaticAllDramatic

Reputation: 2073

It looks like you are just starting out with web development. There are better, safer and faster ways to take MySQL dumps, but I would suggest you start with a graphical interface that aids in learning.

Your hosting provider would have provided you with a control panel. On their website, I can see that they provide phpMyAdmin. To import your database, you need to take the following steps:

  1. Download a desktop MySQL administrator like MySQL Workbench
  2. Export your database to a .SQL file
  3. Log in to your web hosting control panel.
  4. Create a Database.
  5. Create a Database user and set a password for this
  6. Grant this user all permissions to your database (not advisable, but its okay to start with)
  7. Find phpMyAdmin. You will see this database listed.
  8. Click on import and Import the database .sql file you created in step 2

Upvotes: 2

Keval Domadia
Keval Domadia

Reputation: 4763

How can I insert my database to the file manager?

You do not. If you made the website, you should know that you did not use it. Use phpMyAdmin for SQL.

Also, if you application is not working then check if you have made configuration changes in the file, like username, password.

Upvotes: 0

Geordee Naliyath
Geordee Naliyath

Reputation: 1859

Export your local database from MySQL Workbench in SQL format (text files). Then, import the same into online database using PHPMyAdmin.

Upvotes: 0

eggyal
eggyal

Reputation: 126005

Take a backup of your development database using mysqldump, then run the generated SQL against your production system.

Upvotes: 0

Related Questions