2. mac mysql error
2016-07-16 16:36
477 查看
1.配置mysql的环境变量
2.关闭服务器
3.sudo mysqld_safe –skip-grant-tables
4.打开另一个终端
后面会报错:
也就是用mysql> SET PASSWORD = PASSWORD(‘123456’);这句话重新设置一次密码!大爷的,真费劲啊。
“`
http://www.codes51.com/article/detail_342058.html
http://superuser.com/questions/603026/mysql-how-to-fix-access-denied-for-user-rootlocalhost
http://www.jb51.net/article/39187.htm
cd ~ vim .bash_profile 加入 export PATH=${PATH}:/usr/local/mysql/bin
2.关闭服务器
sudo /usr/local/mysql/support-files/mysql.server stop 如果遇到pid找不到可在系统偏好设置里手动关闭mysql
3.sudo mysqld_safe –skip-grant-tables
4.打开另一个终端
输入mysql ; mysql> select User from mysql.user; $mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root'; If you face the unknown field Password error above use: update user set authentication_string=password('my_password') where user='root';
后面会报错:
You must SET PASSWORD before executing this statement的解决方法 ``
也就是用mysql> SET PASSWORD = PASSWORD(‘123456’);这句话重新设置一次密码!大爷的,真费劲啊。
“`
http://www.codes51.com/article/detail_342058.html
http://superuser.com/questions/603026/mysql-how-to-fix-access-denied-for-user-rootlocalhost
http://www.jb51.net/article/39187.htm
相关文章推荐
- MySQL中的integer 数据类型
- MySQL存储过程
- mysql中int、bigint、smallint 和 tinyint的区别与长度
- mysql load data 导出、导入 csv
- source命令执行SQL脚本文件
- MySQL创建用户及权限控制
- MySQL管理数据表
- linux下mysql添加用户
- mysql procedure
- mysql触发器
- MySQL 备份和恢复策略
- mac下安装mysql(转载)
- mysql 修改编码 Linux/Mac/Unix/通用(杜绝修改后无法启动的情况!)
- MySQL数据的导出、导入(mysql内部命令:mysqldump、mysql)
- mysql数据行转列
- Linux下修改MySQL编码的方法
- MySQL Server 日志
- MySQL 安全事宜
- MySQL 备份与恢复