环境ID:cloud-1gstair580b1996c
报错信息如下:{"@filepath":"/var/log/eks-log-agent/default_fos-004-55c45f59f4-2cf2q_b199f927-576f-11ec-bec1-3ee7460d7062/containers/fos-004/stdout/0.log","logTag":"F","container_name":"fos-004","log":"java.sql.SQLException: Access denied for user 'fos'@'10.0.64.12' (using password: YES)","stream":"stdout","tcb_type":"CloudBaseRun"}
数据库中用户已经指定了可访问的host是 %。
你好,报错是数据库密码不对。麻烦确认下代码里数据库密码是写死的还是引用的环境变量?
"envParams": {
"MYSQL_ADDRESS": "10.0.224.11",
"MYSQL_USERNAME": "fos",
"MySQL_PASSWORD": "xxxxxxxxxx"
spring.datasource.username=${MYSQL_USERNAME:root}
spring.datasource.password=${MySQL_PASSWORD:xxxxxxxxxx}