usr/bin/mysqladmin: refresh failed; error: 'Unknown error'

debian wheezy 升级后, 由于授权错误, 导致password给改动, 在debian的mysql safe下也无法进入.

我在/etc/mysql/my.cnf 里面已经改动了bind-address 为局域网ip

进而运行了

GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘123456‘ WITH GRANT OPTION;

然后重载授权表:

FLUSH PRIVILEGES;

然后重新启动后, 尽管能够远程链接, 可是debian 本身报了一个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

这个问题的产生是由于第一次mysql服务启动的时候mysql_safe的error.log日志文件是被root创建的, mysqladmin 调用cron的日志切割清除这个日志文件没有权限导致的.

这个bug已经在新点儿的debian sid里面修复了, 可是stable版本号还没有接到这个fix.

解决的方法:

又一次配置下mysql的error_log , 在my.cnf里面. 而且让你的mysql对这个文件有权限.

-rw-r-----  1 root  adm      517639 [2014-07-01  9:26] mysql_error.log

改动root为mysql 就能够了

chown mysql /var/log/mysql/mysql_error.log

对于centos6,7的远程连接失败问题, 普遍是新装的server

没有root密码的: mysqladmin -uroot password "newpass"

已经有root密码: mysqladmin -uroot password ‘oldpasswd‘ ‘newpasswd‘

也能够直接登录mysql, mysql -u root;use mysql;UPDATE user SET Password = PASSWORD(‘newpass‘) WHERE user = ‘root‘;FLUSH PRIVILEGES;

丢失password: mysqld_safe --skip-grant-tables& mysql -u root mysql;

UPDATE user SET password=PASSWORD("new password") WHERE user=‘root‘; FLUSH PRIVILEGES;

给用户授权远程訪问, 首先确认端口[client] port=3307 [mysqld] port=3307 其次看mysql是否启动起来, netstat -anp | grep 3307看端口占用

然后grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘your_password‘ with grant option; FLUSH PRIVILEGES;

防火墙开放3307端口,  iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3307 -j ACCEPT

查看规则是否生效, iptables -L -n

删除老的规则iptables -D INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT

同一时候防火墙须要保存service iptables save /etc/init.d/iptables save

或者直接改动vi /etc/sysconfig/iptables 增加

-A INPUT -p tcp -m state --state NEW -m tcp --dport 3307 -j ACCEPT

这样就能够远程登录了.

usr/bin/mysqladmin: refresh failed; error: 'Unknown error'

时间: 2024-10-08 09:49:47

usr/bin/mysqladmin: refresh failed; error: 'Unknown error'的相关文章

usr/bin/mysqladmin: refresh failed; error: 'Unknown error'

debian wheezy 升级后, 因为授权错误, 导致密码给修改, 在debian的mysql safe下也无法进入. 我在/etc/mysql/my.cnf 里面已经修改了bind-address 为局域网ip 进而执行了 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION; 然后重载授权表: FLUSH PRIVILEGES; 然后重启后, 虽然可以远程链接, 但是debia

Promise is rejected: Error: 2 UNKNOWN: error starting container: API error (404): {"message":"network build-blockchain-insurance-app_default not found"}出错的解决方案

错误描述: docker logs web 现象: > [email protected] serve /app > cross-env NODE_ENV=production&&node ./bin/server /app/app/static/js Server running on port: 3000 Default channel not found, attempting creation... Successfully created a new default

VDDK error: 1 (Unknown error). Value: 0x0000000000000001

veeam backup error:6/12/2016 3:29:01 PM :: Processing vm-01 Error: VDDK error: 1 (Unknown error). Value: 0x0000000000000001Failed to read from a virtual diskFailed to upload disk.Agent failed to process method {DataTransfer.SyncDisk}.Exception from s

Gogs 首次运行安装程序 立即安装 数据库设置不正确:Error 1049: Unknown error 1049

场景: docker 安装gogs,按着这篇博文(Docker 方式安装Gogs)的步骤,到达步骤:Gogs 的配置和使用 针对mysql数据库,输入正确的mysql数据库信息后,点击立即安装,出现提示信息:数据库设置不正确:Error 1049: Unknown error 1049. 解决: 手动添加对应数据库(如:gogs),并设置utf8_general_ci 字符集,再点击安装解决. 原因: 后续深究. 原文地址:https://www.cnblogs.com/wonderboy/p/

HTTP Error 500 - Server Error.

Error Details: The FastCGI process exited unexpectedly Error Number: -1073741819 (0xc0000005). Error Description: Unknown Error HTTP Error 500 - Server Error.Internet Information Services (IIS) 在网上找了一大堆资料和在国外论坛详细查询了下,一直没有找到解决办法.php.ini也不知道被我修改了多少次了,也

yum安装报错error: unpacking of archive failed on file /usr/bin/xxxx: cpio: open Failed

Bash漏洞爆出来了,赶紧更新一下补丁,#yum -y update bash 报错了 error: unpacking of archive failed on file /usr/bin/bashbug-64;54254708: cpio: open 参考了网上资料,原来是以前加固时给/usr/bin加了i权限 # lsattr /usr | grep bin ----i-----I-- /usr/bin # chattr -i /usr/bin 然后yum安装就OK了 参考资料:http:

innobackupex:Error:xtrabackup child process has died at /usr/bin/innobackupex

使用innobackupex进行数据库备份,报如下错误:innobackupex --compress --parallel=4  --user=root  --password=yoon /export/backup/xtrabackup_56 version 2.1.9 for MySQL server 5.6.17 Linux (x86_64) (revision id: 744)xtrabackup: uses posix_fadvise().xtrabackup: cd to /var

Ubuntu 16.04出现:Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi'

错误: Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi' E: Sub-process returned an error code 在运行

"Installation failed !" in GUI but not in CLI (/usr/bin/winusb: line 78: 18265 Terminated )

"Installation failed !" in GUI but not in CLI (/usr/bin/winusb: line 78: 18265 Terminated ) Installation failed ! Exit code: 256 Log: **blank** ----- Install log(when running winusbgui as root) Installation failed ! Exit code: 256 Log: Formattin