How to import sql database using Terminal?

mysql

Uploading the database to your XAMPP phpmyadmin is faster using Terminal than doing it from phpmyadmin. For this please follow the following steps.

  1. Open the Terminal and cd into the folder where the sql database you need to upload is located.
  2. Login to your mysql using the commond
    mysql -u”Your Username” -p”Your Password”
  3. If the terminal asks for the password, enter the password you entered for localhost.
  4. Create a new database by the following command.
    Create “Your Database Name”. If you have already created the database, then select database using “USE <DatabaseName>”
  5. Give the import command by typing the following:
    source “SQL File name”;

    Your sql should be imported really fast and successfully.

535 thoughts on “How to import sql database using Terminal?”

  1. But wanna input on few general things, The website style is perfect, the subject matter is very superb. “To establish oneself in the world, one has to do all one can to appear established.” by Francois de La Rochefoucauld.

  2. A Review of Immunotherapeutic Strategies in Canine Malignant Melanoma emla cream and priligy tablets Patients receiving or who have previously received Gyraxen tamoxifen citrate should have annual gynecological examinations and they should promptly inform their physicians if they experience any abnormal gynecological symptoms, eg, menstrual irregularities, abnormal vaginal bleeding, changes in vaginal discharge, or pelvic pain or pressure