宝塔用户_bdwjbj 发表于 2024-2-21 13:41:41

【已完成】MySQL无法正常使用,各种尝试均无果

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:免费版8.0.5,MySQL5.6.50
系统版本:CentOS 7.9.2009 x86_64(Py3.7.9)
问题描述:就是我的MySQL一开始是无法登陆的,我的网站显示“Error establishing a database connection”,且返回503状态码,尝试过重启,重载以及强制卸载重装(均对MySQL5.6.50进行操作),均无果,在今天上午我在MySQL的配置文件中添加了“skip-grant-tables”语句,解决了MySQL服务器登录问题,PHPmyadmin已可正常使用,但是网站依旧显示相同的语句以及503状态码,尝试过修改数据库密码,无果
相关截图(日志、错误):这是错误日志“Key caches:defaultBuffer_size:      33554432Block_size:         1024Division_limit:      100Age_limit:             300blocks used:             0not flushed:             0w_requests:            0writes:                  0r_requests:            0reads:                   0handler status:read_key:            3read_next:         0read_rnd             0read_first:          4write:             797delete               0update:            0Table status:Opened tables:         61Open tables:         56Open files:             5Open streams:         0Alarm status:Active alarms:   0Max used alarms: 0Next alarm time: 0Memory status:<malloc version="1"><heap nr="0"><sizes><size from="17" to="32" total="32" count="1"/><size from="65" to="80" total="80" count="1"/><size from="33" to="33" total="825" count="25"/><size from="49" to="49" total="294" count="6"/><size from="65" to="65" total="130" count="2"/><size from="81" to="81" total="1944" count="24"/><size from="97" to="97" total="194" count="2"/><size from="113" to="113" total="565" count="5"/><size from="129" to="129" total="2709" count="21"/><size from="145" to="145" total="145" count="1"/><size from="161" to="161" total="966" count="6"/><size from="209" to="209" total="418" count="2"/><unsorted from="145" to="13105" total="21017" count="9"/></sizes><total type="fast" count="2" size="112"/><total type="rest" count="103" size="29207"/><system type="current" size="7454720"/><system type="max" size="7454720"/><aspace type="total" size="7454720"/><aspace type="mprotect" size="7454720"/></heap><heap nr="1"><sizes><unsorted from="33" to="8225" total="14230" count="6"/></sizes><total type="fast" count="0" size="0"/><total type="rest" count="6" size="14230"/><system type="current" size="1748992"/><system type="max" size="1748992"/><aspace type="total" size="1748992"/><aspace type="mprotect" size="174”

大炮运维V587 发表于 2024-2-21 16:20:45

您好,“skip-grant-tables”是跳过密码登陆数据库,也就是免密登陆,如果你的服务器开了外网访问数据库的权限,任何人都可以登陆你的数据库的。您不要用这种方式来进入数据库。
您截图是网站无法连接您的数据库,请排查网站 使用的数据库账号+密码是否正确。

宝塔用户_bdwjbj 发表于 2024-2-21 16:23:08

大炮运维V587 发表于 2024-2-21 16:20
您好,“skip-grant-tables”是跳过密码登陆数据库,也就是免密登陆,如果你的服务器开了外网访问数据库的 ...

我确认过,在config文件中填写的都对
页: [1]
查看完整版本: 【已完成】MySQL无法正常使用,各种尝试均无果