mac Access denied for user 'root'@'localhost' (using password: YES)

1:苹果->系统偏好设置->最下边点mysql 在弹出页面中 关闭mysql服务

2: Start it in safe mode

进入终端

输入:

cd /usr/local/mysql/bin/

回车后 登录管理员权限

sudo su

回车后输入以下命令来禁止mysql验证功能

./mysqld_safe --skip-grant-tables &

 

3) Open another terminal and run the following command (Keep last terminal open)

mysql -u root

4) Run the following command with suitable new password on the mysql console

mysql > UPDATE mysql.user SET Password=PASSWORD(‘password‘) WHERE User=‘root‘;

5) mysql > FLUSH PRIVILEGES;

6) Quit from both terminals and open new terminal and connect to mysql with root user and new password

mysql -uroot -p

mac Access denied for user 'root'@'localhost' (using password: YES)

时间: 2024-10-02 23:07:36

mac Access denied for user 'root'@'localhost' (using password: YES)的相关文章

mac下,mysql5.7.18连接出错,错误信息为:Access denied for user 'root'@'localhost' (using password: YES)

mac下,mysql5.7.18连接出错,错误信息为:Access denied for user 'root'@'localhost' (using password: YES)()里面的为shell中输入的命令,一定要输全包括:&等符号 第一步:苹果->系统偏好设置->最下面点MySQL,关闭mysql服务 第二步:进入终端输入(cd /usr/local/mysql/bin/)回车输入(sudo su)回车以获取管理员权限输入(./mysqld_safe --skip-grant

Mac Mysql mysql_secure_installation Error: Access denied for user 'root'@'localhost' (using password: YES)

mysql由brew安装, 期间好像自动更新了一次 然后再次执行mysql_secure_installation, 输入root密码后报错, 重装mysql还是不行 Error: Access denied for user 'root'@'localhost' (using password: YES) 原因是之前安装的mysql配置文件没有彻底清除 参照 http://stackoverflow.com/questions/4359131/brew-install-mysql-on-mac

Mac下解决mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Maybe updating the package the updater overwrote the root password. To restore it: Stop mysqld deamons. $ sudo service mysqld stop Go to mysql/bin directory $ cd /usr/bin Start a mysql deamon with this option: $ sudo mysqld_safe --skip-grant-tables O

mac系统中搭建apache+mysql+php的开发环境,安装mysql后,登录报错:mac ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

php新手在mac系统中搭建apache+mysql+php的开发环境(按照这篇博客来操作的:http://my.oschina.net/joanfen/blog/171109?fromerr=xvCsafCe),在安装配置mysql完毕后,登录mysql,报错:mac ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO),折腾很久,终于解决,随手记录下,备忘. 解决方法: 第一步:如

mac下安装mysql5.7.18,连接出现Access denied for user 'root'@'localhost' (using password: YES)

mac下,mysql5.7.18连接出错,错误信息为:Access denied for user 'root'@'localhost' (using password: YES) ()里面的为shell中输入的命令,一定要输全包括:&等符号 第一步:苹果->系统偏好设置->最下面点MySQL,关闭mysql服务 第二步:进入终端输入(cd /usr/local/mysql/bin/)回车 输入(sudo su)回车以获取管理员权限 输入(./mysqld_safe --skip-gr

mac mysql连接报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

找了半天 又是kill进程,又是改设置文件,又是重启电脑,都不管用 翻到stackoverflow上的解决方案,实施成功: 原文链接:https://stackoverflow.com/questions/13480170/access-denied-for-mysql-error-1045 To restore it: Stop mysqld deamons. $ sudo service mysqld stop Go to mysql/bin directory $ cd /usr/bin

mac 环境下 登陆失败问题Access denied for user 'root'@'localhost' (using password: YES)

我的解决方式: 密码输错了.... 最新版本的mysql再安装时需要你设置密码 大家记得在Enter password里面输入你预先设置的密码呀 https://www.jianshu.com/p/b7e9a4da81a3 https://blog.csdn.net/zoucui/article/details/96996554 mac 环境下 登陆失败问题Access denied for user 'root'@'localhost' (using password: YES) 原文地址:h

关于JavaEE项目连接数据库提示 Access denied for user 'root'@'localhost' (using password: YES)的解决方案

最近这三天,都在解决如下的问题:我MyEclipse中的JavaEE工程,运行之后就提示Access denied for user 'root'@'localhost' (using password: YES),当我用一个Java文件连接MySQL数据库时,没有任何问题.于是我在网上找了一些解决方案: (1)让root给当前用户授予增删改查的权限:grant select,insert,update,delete on *.* to 用户名@"%" Identified by &q

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

如上所示,当我们修改数据库的密码之后,再次进入phpmyadmin的时候,就会产生这种错误#1045 - Access denied for user 'root'@'localhost' (using password: NO) .那这种错误产生的原因是什么呢?解释就是,密码修改后,新旧密码不一致产生的.改正过来其实也很简单,在phpmyadmin3.4.10.1文件夹下找到config.inc.php这个文件,然后找到里面$cfg['Servers'][$i]['password'] = '