Mars
Mars

Reputation: 4995

Running mysql from terminal

I'm trying to create a database in terminal but I get the error

ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mydatabase'

All I've done so far is install mysql and install the workbench to go along with it.

This is my personal computer so I have administrator privilege from this log-in account.

Another thing is that the database I created in the workbench doesn't show up when I type the command

SHOW DATABASE;

in the terminal.

Upvotes: 0

Views: 110

Answers (1)

Mr. B.
Mr. B.

Reputation: 8697

You've to login. Try:

mysql -u root -p

You will be asked for a password.

More information: mysql --help

Hope that helps. :-)

Upvotes: 2

Related Questions