登录数据库


update mysql.user set authentication_string=password('root'), plugin = 'mysql_native_password' where user = 'root';使用这一行明令将root密码修改为root。

flush privileges;刷新应用权限。
![]()
退出并重启MySQL。
数据库导入数据缓存区不够增加缓存区
set global max_allowed_packet=100000000;
set global net_buffer_length=100000;
SET GLOBAL interactive_timeout=28800000;
SET GLOBAL wait_timeout=28800000;
本文详细指导如何在MySQL中安全地更新root用户的密码,包括设置新的密码、刷新权限以及调整数据库缓存。涉及操作如update_mysql_auth, flush_privileges, 和环境变量设置,以优化性能。
469

被折叠的 条评论
为什么被折叠?



