Mysql 错误1044(42000):用户的访问被拒绝

Mysql 错误1044(42000):用户的访问被拒绝,mysql,macos,terminal,Mysql,Macos,Terminal,我不知道如何登录到我的数据库,我不断收到错误,无法在数据库上执行任何查询,下面是我的错误示例 HW-001b63b70b4c:~ imac$ /usr/local/mysql/bin/mysql; Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 5.5.13 MySQL Community Server (GPL) Copyrigh

我不知道如何登录到我的数据库,我不断收到错误,无法在数据库上执行任何查询,下面是我的错误示例

HW-001b63b70b4c:~ imac$ /usr/local/mysql/bin/mysql;

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.5.13 MySQL Community Server (GPL)

Copyright (c) 2000, 2010, 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> 
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| test               |
+--------------------+
2 rows in set (0.00 sec)

mysql> create database dev;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'dev'
mysql> 

以root用户身份登录怎么样:

/usr/local/mysql/bin/mysql -u root

啊。。这奏效了。。如何创建新用户?另外,如果我创建了一个新用户,那么用户和密码的syantax是什么?谢谢你的帮助。