How to import .sql file in mySQL database?
There are 3 ways to import .sql database file in mySQL.
1) Import the .sql file from phpMyAdmin
Import -> Browse for the .sql file and click on GO.
If you are lucky your databae will be imported if not look for next 2 methods
2) Run the sql query from command prompt if you have access to your webhost either direct or via SSH
The sql query to import .sql database is
mysql -h host -u databaseusername -p databasename < database.sql
Replace
host with your actual host (in most cases it would be localhost)
databaseusername with the user name assigned to access above database
databasename with your actual database name
database.sql with your actual .sql file
Similar Posts
No similar recipes.

No comments yet