Connect to mysql in CLI - distinguish db name and password -
Connect to mysql in CLI - distinguish db name and password -
i trying next mysql command:
zcat ***.sql.gz | mysql -u root -p dbname
maybe question applies as following, simpler command:
mysql -u root -p dbname
you can find kind of snippet on internet, , works. should prompt db user's password (in case, db root pw), , utilize "dbname" database name. today did not inquire me root pw, , instead said
access denied user 'root'@'localhost' (using password: yes)
i assume in case mysql thought "dbname" password. don't understand why in usual case understands "dbname" database name.
i have seen variation:
mysql -u root -pthepassword dbname
here interesting thing -u followed space, -p not.
the question: how mysql distinguish dbname password?
mysql
Comments
Post a Comment