我刚刚通过 Homebrew 在 OS X Lion 上安装了 MySQL,并按照安装后的说明进行操作。现在我需要创建一个数据库:
$ mysql -u peeja
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 5.5.25a Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> CREATE DATABASE `new_db` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'new_db'
怎么了user ''@'localhost'
?为什么不user 'peeja'@'localhost'
呢?为什么这个 Just Work™ 不适合安装用户?这不是 Homebrew 应该如何设置的吗?
还是我做错了什么?