PHP

How To Import MySQL Database Using Command Prompt

In this article, We learn about how to import MySQL Database using Command Prompt.

Here is a step:

  1. Open Command Prompt.

2. go to the MySQL folder.

    • If you use wamp then add this line on CMD “cd C:\wamp64\bin\mysql\mysql5.7.24\bin“.
    • If you use xampp then add this line on CMD “cd C:\myxamp\mysql\bin“.

3. Create a Database on phpMyadmin.

4. Connect your database using this command “mysql.exe -use databasename -u username -p”

  • databasename: Add Database name
  • username: Add database’s username

5. press Enter and add password again.

6. To make things easier, copy the SQL file into the same folder as mysql.exe, and then run this “source thecodehubs.sql” and press Enter.

Here is a result

This process is very helpful and faster than manually import.

Ankit Bavishi

I am an sr. WordPress developer and web designer and Project Manager and Specialized in developing Wordpress, Customization Theme, HTML, CSS, jQuery, Ajax, and Author at thecodehubs.

Share
Published by
Ankit Bavishi

Recent Posts

Testing hk

Testing

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

Operation

Testing

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

TETS NEW

test

3 years ago