【发布时间】:2011-09-22 10:02:40
【问题描述】:
我刚刚在 Mac OS X 上安装了 MySQL。下一步是设置 root 用户密码,所以接下来我这样做了:
-
启动终端应用程序以访问 Unix 命令行。
-
在 Unix 提示下,我执行了以下命令:
cd /usr/local/mysql/bin ./mysqladmin -u root password 'password'
但是,当我执行命令时
./mysql -u root,这就是答案:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 224
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 命令行!
这是为什么?
【问题讨论】: