mac Can't connect to MySQL server on '127.0.0.1' (61)
来源:互联网 发布:mac专柜价格口红 编辑:程序博客网 时间:2024/06/04 01:23
Mac 下安装mysql,安装完成后是无用户无密码的状态,并且数据库只有 information_schema,可以通过命令查看
xxxxxxxMac-mini:bin fighting$ mysql
mysql> show databases;
这就需要我们手动的处理一下,处理过程如下1、停止MySQL
sudo /usr/local/mysql/support-files/mysql.server stop
2、切换到MySQL的安装目录下的bin目录
cd /usr/local/mysql/bin
3、安全模式启动MySQL
sudo ./mysqld_safe --skip-grant-tables
该命令执行后会得到完整的MySQL数据库,如下
mysql> show databases;
+-----------------------------+
| Database |
+-----------------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+-----------------------------+
4、使用root用户启动mysql
mysql -u root
5、为root用户设置新的密码
mysql > UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
6、刷新
mysql > FLUSH PRIVILEGES;
7、退出MySQL后重启使用root登录,大功告成!!!!
- Mac 解决Can't connect to MySQL server on '127.0.0.1' (61)
- mac Can't connect to MySQL server on '127.0.0.1' (61)
- MAC Can't connect to MySQL server on '127.0.0.1' (61)
- [mysql] Can't connect to mysql server on '127.0.0.1'
- Can't connect to MySQL server on '127.0.0.1' (10061)
- Can't connect to MySQL server on '127.0.0.1' (13)
- Can't connect to MySQL server on
- Mysql 连接报错 Can't connect to MySQL server on “127.0.0.1” (61)
- Ruby—Mysql2::Error: Can't connect to MySQL server on '127.0.0.1' (61)
- Can’t connect to Mysql server on ‘127.0.01’(10061)
- Can't connect to MySQL server on 'xxxx' (61)
- database connect failed!Can't connect to MySQL server on '127.0.0.1' (13)
- mysql出现 can't connect to mysql server on '127.0.0.1'
- 解決MySQL can't connect to mysql server on'127.0.0.1'(10061)的問題
- MySQL---can't connect to MySQL server on '127.0.0.1'(1006)
- MySQL 数据库连接失败 SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (13)
- MySQL 数据库连接失败 SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (13)
- MySQL连接失败:Can't connect to MySQL server on '127.0.0.1'
- 第92讲:Akka第一个案例动手实战开发环境的搭建
- ServletContext.getRealPath() 的输入参数要以"/"开头
- gradle--第十二章 使用Gradle图形用户界面接口
- Eclipse “cannot be resolved to a type” error
- Failed to read key from keystore解决方案
- mac Can't connect to MySQL server on '127.0.0.1' (61)
- Android自定义控件
- HDU 1541 Stars (树状数组)
- GPU 图像处理trick
- 可空数据类型 和 随机数
- 百钱买百鸡
- 大小排序算法
- input subsystem
- 【POJ】1741 Tree 点分治