我刚刚在Mac OS x上安装了MySQL,下一步是设置root用户密码,所以我接下来这样做:
启动终端应用程序,访问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
命令行!
为什么会这样?