Jump to content

Recommended Posts

I am trying to import sql using command prompt. Suppose my sql file is mydata.sql and the database is mydb. Note that no password for the phpmyadmin.

 
D:\wamp\bin\mysql\mysql5.6.17\bin>mysql -h localhost -u root -p mydb > mydata.sql
 
After I typed the below, it is asking for the password . But for my case no password. 
When I pressed enter without typing the password, it shows error "Access denied for user root@localhost (using password no)".
 
Someone please help me to import the sql file. Since it is large file I want to import through command line
 
Link to comment
https://forums.phpfreaks.com/topic/296756-import-sql-file-using-command-line/
Share on other sites

either your root account has a password and phpmyadmin holds it in it's settings, or your phpmyadmin isn't using the root account.  either way you shouldn't be using the root acount.  you should have set up an account for normal use either with or without a password.  root should only be used for initial config and for emergencies - neither of which covers this.  Create an account yourself and try using that.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.