Windows下MysqL无法启动1067错误解决:
解决步骤:
1. 找到自己的MysqL安装目录,比如,我的是D:\MysqL\MysqL Server 5.5
2. 打开my.ini文件
3. 找到 #Path to the database root这一行,将 datadir="C:/ProgramData/MysqL/MysqL Server 5.5/Data/" 修改为自己MysqL安装目录下的 datadir="D:/MysqL/MysqL Server 5.5/Data/"
4. 保存后用cmd输入net start MysqL重启服务即可,然后自己试试看能否启动服务。
登录报错Access denied for user ‘root’@‘localhost’ (using password:YES)
解决步骤:
2.找到my.ini文件,大概67行 [MysqLd] 下添加 一行 skip-grant-tables 保存退出
3.重新打开cmd命令行,执行 MysqL;
4.继续执行 use MysqL;
5.update user set password=password('888888') where user='root';(88888为密码 设置自己想要的密码) 直接复制的注意中英文符号....
6.执行 flush privileges; 刷新权限
9.在执行MysqL -u root -p 输入刚刚重置的密码,登陆成功!!