Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to import mysql database using command line?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 445
    Comment on it

    Sometimes when you have large databases files and you are unable to import the database manually. Then the easiest (and fastest) way is to use command line.

    Import:--
    1. Run the cmd (DOS) and get into the mysql folder, which in my case works like this

    C:\>cd C:\wamp\bin\mysql\mysql5.0.51b\bin 
    

    2. Then use this command to run up MySQL

    C:\wamp\bin\mysql\mysql5.0.51b\bin>mysql.exe -use databasename -u username -p password_optional 
    3. To make things easier, I copy my SQL file into the C derive. And then run following command

    mysql> source C:/myfilename.sql; 
    

    You can put the SQL file anywhere in your system and give the source file path.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: