Mysql必读解决mac使用homebrew安装MySQL无法登陆问题

MysqL必读解决mac使用homebrew安装MysqL无法登陆问题》要点:
本文介绍了MysqL必读解决mac使用homebrew安装MysqL无法登陆问题,希望对您有用。如果有疑问,可以联系我们。

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

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

MysqL必读如果在输入

MysqL必读
MysqL -u root

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

MysqL必读办理步骤

MysqL必读(1)终端输入MysqLd_safe --skip-grant-tables 显示如下

MysqL必读2017-03-21T11:44:11.6NZ MysqLd_safe Logging to '/usr/local/var/MysqL/zhongchengmingdeMacBook-Air.local.err'.
2017-03-21T11:44:11.6NZ MysqLd_safe Logging to '/usr/local/var/MysqL/zhongchengmingdeMacBook-Air.local.err'.
2017-03-21T11:44:11.6NZ MysqLd_safe A MysqLd process already exists

MysqL必读 (2)再次输入MysqL -u root显示如下

MysqL必读Welcome to the MysqL monitor.  Commands end with ; or \g.
Your MysqL connection id is 10
Server version: 5.7.17 Homebrew
copyright (c) 2000,2016,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必读   (3)终端输入 use MysqL显示如下

MysqL必读Reading table @R_767_4045@ion for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MysqL>

MysqL必读(4)修改暗码UPDATE MysqL.user SET authentication_string=PASSWORD('你的暗码') WHERE User='root';

MysqL必读  成功  Query OK,1 row affected,1 warning (0.05 sec)

MysqL必读  Rows matched: 1  Changed: 1  Warnings: 1

MysqL必读以上所述是小编给大家介绍的办理mac使用homebrew安装MysqL无法登陆问题,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的.在此也非常感谢大家对编程之家PHP网站的支持!

编程之家培训学院每天发布《MysqL必读解决mac使用homebrew安装MysqL无法登陆问题》等实战技能,PHPMysqL、LINUX、APP、JS,CSS全面培养人才。

相关文章

最近做自动化测试时,深感自己对前端涉猎太少,加上对这块比...
homebrew本身就是一个git仓库。使用homebrew安装软件包时,会...
一、Homebrew安装、卸载等命令Homebrew的安装和卸载都非常简...
在mac系统中,使用homebrew可以很方便的管理包。按照官网的说...
我按照说明从这里使用brew安装mysqlhttps://gist.github.com...
我在macOS10.12.4上安装了nginx1.10.3和php5.5.38作为开发服...