你重新安装的时候有删掉 pvc 吗?
小写的字母加数字
c7n-mysql-pvc和/u01/prod/下mysql相关的都删掉的,还有mysql-service也删了
使用类似于Abcd123456格式
不是你这样操作的。使用kubectl 命令删除
kubectl get pvc -n c7n-system
kubectl delete pvc -n c7n-system <mysql's pvc >
然后重新安装 mysql
你这个问题有点奇怪。我微信私信你了
微信号:fghj_lif
那就是清空 c7n-system, 重新安装
for r in `helm list -n c7n-system | grep c7n-system | awk '{ print $1}'`;
do
helm get values $r -n c7n-system > $r.yaml
done
kubectl delete ns c7n-system
又卡在mysql了
Initializing database
2020/9/3 下午5:42:08 2020-09-03T09:42:08.424129Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020/9/3 下午5:42:08 2020-09-03T09:42:08.438386Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2020/9/3 下午5:42:08 2020-09-03T09:42:08.438452Z 0 [ERROR] Aborting
2020/9/3 下午5:42:08
嗯,我是这样操作的,但是delete之后发现nfs目录下还有mysql相关的数据
- 首先检查 nfs服务器的内核版本,需要 4.x 版本。
- 单独的 nfs 服务器升级内核
- 如果是使用kubeadm-ha 脚本安装,并且 nfs-server 位于节点服务器上,在 kubeadm-ha 目录执行如下脚本,并重启服务器即可。
ansible-playbook -i host.ini 00-kernel.yml
- 如果上面的操作依旧无法解决问题,编辑 c7n-mysql-pvc 对应 pv,添加如下的挂载选项 mountOptions
kubectl edit pv <c7n-mysql-pvc 对应 pv 名> -------------------------------------- spec: mountOptions: - hard - intr - nfsvers=4.0 nfs: path: /mnt/data/c7n-system-mysql-pvc-63d3b31b-6231-4e89-84c4-fbab8186e549 server: 172.24.33.204 ...
谢谢,此问题已解决。
我按分步部署文档一步步操作的,mysql服务日志显示root使用密码登录失败,这个是什么原因
2020-11-27T08:40:04.893420Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2020-11-27T08:40:04.912418Z 0 [Note] InnoDB: Buffer pool(s) load completed at 201127 16:40:04
2020-11-27T08:40:04.914484Z 0 [Warning] ‘user’ entry ‘root@localhost’ ignored in --skip-name-resolve mode.
2020-11-27T08:40:04.914543Z 0 [Warning] ‘user’ entry ‘mysql.session@localhost’ ignored in --skip-name-resolve mode.
2020-11-27T08:40:04.914562Z 0 [Warning] ‘user’ entry ‘mysql.sys@localhost’ ignored in --skip-name-resolve mode.
2020-11-27T08:40:04.914604Z 0 [Warning] ‘db’ entry ‘performance_schema mysql.session@localhost’ ignored in --skip-name-resolve mode.
2020-11-27T08:40:04.914615Z 0 [Warning] ‘db’ entry ‘sys mysql.sys@localhost’ ignored in --skip-name-resolve mode.
2020-11-27T08:40:04.914634Z 0 [Warning] ‘proxies_priv’ entry ‘@ root@localhost’ ignored in --skip-name-resolve mode.
2020-11-27T08:40:04.926619Z 0 [Warning] ‘tables_priv’ entry ‘user mysql.session@localhost’ ignored in --skip-name-resolve mode.
2020-11-27T08:40:04.926642Z 0 [Warning] ‘tables_priv’ entry ‘sys_config mysql.sys@localhost’ ignored in --skip-name-resolve mode.
2020-11-27T08:40:05.020042Z 0 [Note] Event Scheduler: Loaded 0 events
2020-11-27T08:40:05.020336Z 0 [Note] mysqld: ready for connections.
Version: ‘5.7.23’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 MySQL Community Server (GPL)
2020-11-27T08:40:14.200953Z 2 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:40:24.199673Z 3 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:40:34.195682Z 4 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:40:44.194516Z 5 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:40:54.197128Z 6 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:40:57.708259Z 7 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:41:04.197442Z 8 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:41:09.642903Z 9 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:41:14.201018Z 10 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:41:24.196813Z 11 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:41:34.197786Z 12 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:41:44.196668Z 13 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:41:54.197154Z 14 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:42:04.202267Z 15 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:42:06.017890Z 16 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:42:14.196944Z 17 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:42:16.016040Z 18 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:42:24.200881Z 19 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:42:26.002414Z 20 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:42:34.199812Z 21 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:42:36.029302Z 22 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:42:44.208696Z 23 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
2020-11-27T08:42:46.022566Z 24 [Note] Access denied for user ‘root’@‘localhost’ (using password: YES)
请问你是怎么解决的
修改nfs配置:/etc/sysconfig/nfs
# TCP port rpc.lockd should listen on.
LOCKD_TCPPORT=32803
# UDP port rpc.lockd should listen on.
#LOCKD_UDPPORT=32769
#
# Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
RPCNFSDARGS="-V 4.2"
# Number of nfs server processes to be started.
# The default is 8.
#RPCNFSDCOUNT=16
我这样改可以,不知道你们试了有没有效果
按照这个解决方案,问题依旧未解决。大佬,能支持下么
有解决吗