void
void

Reputation: 1896

How to Import Local MySQL Database to Web Server

I have a database with two tables in it, and I have exported them into a "dump.sql" file in my computer.

I am using a free web hosting service (000webhost.com) and I have a database named "username_newdb" and I want the two tables to be imported in that database.

I tried "Import" from phpmyadmin page, but it gives the error access denied for user, I don't know why. Moreover, I prefer to import the tables into new database, not to import (and create) the whole database. Can I do this? Maybe with PHP code?

If not, creating a new database would be accepted, too. Any help would be appreciated.

Upvotes: 1

Views: 4955

Answers (1)

Marcin Orlowski
Marcin Orlowski

Reputation: 75629

if you can connect to that database from your computer directly, you can use any mysql manager to do the import, assuming your login/password is right as backup sql is just text file with bunch of INSERTs and CREATE TABLEs (so basically phpmyadmin should not even complain).

Upvotes: 1

Related Questions