开发者

SQL Access Denied

I'm working through tutorials in the book 'Cloning internet apps w/ Ruby.' I've made web apps before but they depended on sqlite and now I have to use mysql.

I've installed community server but when I try to create a database using the command line I'm receiving the error message listed above.

$ mysql 

mysql> create database tinyclone;

Returns

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

Notes:

  • The mysql command-line client flashes open and immediately closes, so I'm accessing it from the command prompt.
  • I've installed and uninstalled mysql several times in attempts to figure out this problem. In the latest install, I didn't set a password.
  • I'm aware that this line should probably be '$mysql -u <username> -p <password>' but I didn't set a password and I'm not sure wha开发者_开发知识库t the username would be.


By default, the user is root

If you havn't set a password, use $ mysql -u root


The default MySQL username is 'root', try that without a password


The default username for MySQL is root, so you can try by

$ mysql -u root

by default it logs you with your Linux account. If you're logged as root on your Linux machine it will be OK just using $ mysql

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜