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

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -