位置: 编程技术 - 正文

解决mac使用homebrew安装MySQL无法登陆问题(mac上的home键在哪)

编辑:rootadmin

推荐整理分享解决mac使用homebrew安装MySQL无法登陆问题(mac上的home键在哪),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:macbook homebrew,mac /home,mac上的home键在哪,macbook homebrew,macbook homebrew,mac使用homepod,macos home end,macos home end,内容如对您有帮助,希望把文章链接给更多的朋友!

如果你电脑是Mac的,使用homebrew安装MySQL是一个非常便捷的方式,但是还是会出现一些问题;

首先保证你已经安装了mysql,如果是通过homebrew安装的,输入mysql.server start 启动服务

如果在输入

出现这个错误ERROR (): Access denied for user 'zhongchengming'@'localhost' (using password: YES),应该是修改初始密码没有成功

解决步骤

(1)终端输入mysqld_safe --skip-grant-tables 显示如下

--T::.6NZ mysqld_safe Logging to '/usr/local/var/mysql/zhongchengmingdeMacBook-Air.local.err'.--T::.6NZ mysqld_safe Logging to '/usr/local/var/mysql/zhongchengmingdeMacBook-Air.local.err'.--T::.6NZ mysqld_safe A mysqld process already exists

解决mac使用homebrew安装MySQL无法登陆问题(mac上的home键在哪)

(2)再次输入mysql -u root显示如下

Welcome to the MySQL monitor. Commands end with ; or g.Your MySQL connection id is Server version: 5.7. HomebrewCopyright (c) , , Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.mysql>

(3)终端输入 use mysql显示如下

Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql>

(4)修改密码UPDATE mysql.user SET authentication_string=PASSWORD('你的密码') WHERE User='root';

成功 Query OK, 1 row affected, 1 warning (0. sec)

Rows matched: 1 Changed: 1 Warnings: 1

以上所述是小编给大家介绍的解决mac使用homebrew安装MySQL无法登陆问题,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对积木网网站的支持!

MySql登陆密码忘记及忘记密码的解决方案 方法一:MySQL提供跳过访问控制的命令行参数,通过在命令行以此命令启动MySQL服务器:safe_mysqld--skip-grant-tables&即可跳过MySQL的访问控制,任何人都可以

详解MySql的慢查询分析及开启慢查询日志 我最近也在研究MySQL性能优化的路上,那么今天也算个学习笔记吧!在小伙伴们开发的项目中,对于MySQL排查问题找出性能瓶颈来说,最容易发现并解决

mysql连接数设置操作方法(Too many connections) mysql在使用过程中,发现连接数超了~~~~[root@linux-node1~]#mysql-uglance-h..1.-pEnterpassword:ERROR():Toomanyconnections解决办法,这也是centos7下修改mysql连接

本文链接地址:https://www.jiuchutong.com/biancheng/349964.html 转载请保留说明!

上一篇:MySQL几点重要的性能指标计算和优化方法总结(mysql的用处)

下一篇:MySql登陆密码忘记及忘记密码的解决方案(mysql的密码忘了该怎么办)

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络