usr/bin/mysqladmin:refreshfailed;error:'Unkn_MySQL
來(lái)源:懂視網(wǎng)
責(zé)編:小采
時(shí)間:2020-11-09 19:58:46
usr/bin/mysqladmin:refreshfailed;error:'Unkn_MySQL
usr/bin/mysqladmin:refreshfailed;error:'Unkn_MySQL:debian wheezy 升級(jí)后, 因?yàn)槭跈?quán)錯(cuò)誤, 導(dǎo)致密碼給修改, 在debian的mysql safe下也無(wú)法進(jìn)入. 我在/etc/mysql/my.cnf 里面已經(jīng)修改了bind-address 為局域網(wǎng)ip進(jìn)而執(zhí)行了GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDEN
導(dǎo)讀usr/bin/mysqladmin:refreshfailed;error:'Unkn_MySQL:debian wheezy 升級(jí)后, 因?yàn)槭跈?quán)錯(cuò)誤, 導(dǎo)致密碼給修改, 在debian的mysql safe下也無(wú)法進(jìn)入. 我在/etc/mysql/my.cnf 里面已經(jīng)修改了bind-address 為局域網(wǎng)ip進(jìn)而執(zhí)行了GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDEN

debian wheezy 升級(jí)后, 因?yàn)槭跈?quán)錯(cuò)誤, 導(dǎo)致密碼給修改, 在debian的mysql safe下也無(wú)法進(jìn)入.
我在/etc/mysql/my.cnf 里面已經(jīng)修改了bind-address 為局域網(wǎng)ip
進(jìn)而執(zhí)行了
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
然后重載授權(quán)表:
FLUSH PRIVILEGES;
然后重啟后, 雖然可以遠(yuǎn)程鏈接, 但是debian 本身報(bào)了一個(gè)mysql的error.
/etc/cron.daily/logrotate:
/usr/bin/mysqladmin: refresh failed; error: 'Unknown error'
error: error running shared postrotate script for '/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1
Saved 4 messages in /home/tom/mbox
這個(gè)問(wèn)題的產(chǎn)生是因?yàn)榈谝淮蝝ysql服務(wù)啟動(dòng)的時(shí)候mysql_safe的error.log日志文件是被root創(chuàng)建的, mysqladmin 調(diào)用cron的日志分割清除這個(gè)日志文件沒(méi)有權(quán)限導(dǎo)致的.
這個(gè)bug已經(jīng)在新點(diǎn)兒的debian sid里面修復(fù)了, 但是stable版本還沒(méi)有接到這個(gè)fix.
解決辦法:
重新配置下mysql的error_log , 在my.cnf里面. 并且讓你的mysql對(duì)這個(gè)文件有權(quán)限.
-rw-r----- 1 root adm 517639 [2014-07-01 9:26] mysql_error.log
修改root為mysql 就可以了
chown mysql /var/log/mysql/mysql_error.log
聲明:本網(wǎng)頁(yè)內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問(wèn)題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
usr/bin/mysqladmin:refreshfailed;error:'Unkn_MySQL
usr/bin/mysqladmin:refreshfailed;error:'Unkn_MySQL:debian wheezy 升級(jí)后, 因?yàn)槭跈?quán)錯(cuò)誤, 導(dǎo)致密碼給修改, 在debian的mysql safe下也無(wú)法進(jìn)入. 我在/etc/mysql/my.cnf 里面已經(jīng)修改了bind-address 為局域網(wǎng)ip進(jìn)而執(zhí)行了GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDEN