1.修改mysql服务(服务在控制面板-》管理工具下)
找到mysql(服务名) 打开属性,将登陆身份修改为本地系统账户,再重新安装
2. 修改my.ini文件
找到C:ProgramDataMySQLMySQL Server 8.0my.ini文件 在mysqld下写入
[mysqld]
skip-name-resolve= (跳过密码验证解决MySQL error 1042: Cant get hostname for your address)
lower_case_table_names=1
skip-grant-tables= (跳过权限表的限制解决MySQL error 1130: Host 127.0.0.1 is not allowed to connect to this MySQL server)
3.在mysql安装完成后,出现ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NOYES)
先关闭mysql服务 在C:Program FilesMySQLMySQL Server 8.0in 路径下打开终端,输入mysqld --defaults-file=“C:ProgramDataMySQLMySQL Server 8.0my.ini” --console --shared-memory –skip-grant-tables 其中 –shared-memory 不是必须输入但是有可能会报错 当控制台光标保持闪烁时,则此模式启动成功 新打开一个控制台,输入mysql -uroot -p 按两次回车进入mysql 先更新权限flush privileges 在8.0版本使用*update user set authentication_string=password(“password”) where user=“root”;时可能不会执行,还有可能报语法不规范的错,因此 我们使用ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘password’*设置 然后再重新打开控制台 即可进入
4. mysql8.0使用Navicat报错2059解决方法
百度了一下,发现是加密规则的问题 在mysql中修改一下
ALTER USER root@localhost IDENTIFIED BY password PASSWORD EXPIRE NEVER; #修改加密规则
ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY password; #更新一下用户的密码
flush privileges #更新权限;