【发布时间】:2013-11-25 07:31:06
【问题描述】:
我似乎忘记了在终端 (mac) 中以 root 用户身份登录 MySql 的密码。我在 http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html 查阅了 mysql 文档,但这似乎对我不起作用。接下来我还能做什么?
user$ mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
这是我当前可用的数据库 w。 MySql 数据库似乎没有出现在那里。这是为什么呢?
user$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.6.13 Source distribution
Copyright (c) 2000, 2013, 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> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
【问题讨论】:
标签: mysql database unix terminal user-permissions