k8s部署mysql

kubectl apply -f mysql-configmap.yaml
kubectl apply -f deployment-service.yaml
kubectl get pods
kubectl exec -it mysql-7c9698f765-xxl6d -- /bin/bash
use mysql;
select user, host from user;
update user set host = '%' where user = 'root';
flush privileges;
exit;
mysql -uroot -p -h 127.0.0.1 -P 30306

posted @ 2021-09-16 13:43  仲夏冬蕴Mm  阅读(162)  评论(0编辑  收藏  举报