MySQL

MySQL 8.0 出现: ERROR 1410 (42000): You are not allowed to create a user with GRANT 问题怎么办

在 docker 里面启动了 MySQL 8.0 版本数据库容器,出现了 报错: ERROR 1410 (42000): You are not allowed to create a user with GRANT 。一查日志显示是 ” “Error 1130: Host ‘172.17.0.1’ is not allowed to connect to this MySQL server“。 于是进入容器 docker exec -it mysql-project mysql -uroot -p 输入密码。查看数据库连接实例的配置,发现 host 配置是 localhost ,想着重新授权一下。grant 命令改授权的 host 时, grant all on book.* to ‘book’@’%’; 报错 【ERROR 1410 (42000): You are not allowed to create …

MySQL 8.0 出现: ERROR 1410 (42000): You are not allowed to create a user with GRANT 问题怎么办 Read More »

ERROR 1293 (HY000): Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

今日在 AWS 上创建数据库表时,突然出现这种问题。 -> create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP,-> update_time timestamp NULL ON UPDATE CURRENT_TIMESTAMP, 就是这两行。完整的报错是 ERROR 1293 (HY000): Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause。 mysql –version 一看,我晕。aws yum install 的 mariadb 的版本居然是 5.5 的。于是我删除已经安装的版本。 sudo yum remove mariadb mariadb-server 重新采用 docker 来安装比较新的 …

ERROR 1293 (HY000): Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause Read More »

mysql task_log.ibd 文件占用大量磁盘空间引发的血案

早起访问 gitvim.com , logo出来了,但是首页内容一直是空白的,F12 打开看加载完了,但是我这网站怎么挂啦?没有一丁点页面文字? 快速排查日志, 先查 nginx 日志 tail -f /var/log/nginx/error.log 发现 Nginx 错误日志是空的,这说明业务服务器没有问题。但是在这里敲命令的过程中,发现 tab 键失效了,一直弹出来 [root@api nginx]# less ac-bash: cannot create temp file for here-document: No space left on device 一开始我没太在意,以为是自己的键盘快捷键重合导致的。然后继续排查 Nginx 访问日志。 [root@api nginx]# less ac-bash: cannot create temp file for here-document: No space left on device tail -f /var/log/nginx/access.log 一看,也是空的。也没啥毛病。我就纳闷了,难道是 PHP …

mysql task_log.ibd 文件占用大量磁盘空间引发的血案 Read More »