MacbookPro 安装完mysql后,登录出现错误error: 'Access denied for user 'root'@'localhost' (using password: NO)'
先停止MySQL服务打开“系统偏好设置”,选择“MySQL”,在打开的对话框中点击“StopMySQLServer“打开终端,输入命令:sudo/usr/local/mysql/bin/mysqld_safe--user=mysql--skip-grant-tables--skip-networking&--skip-grant-tables:不启动grant-tables(授权表),跳过权限控制