开启日志记录初始化表DataSource连接有问题
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
- [ ] I have searched the [issues](https://github.com/codingapi/tx-lcn/issues) of this repository and believe that this is not a duplicate.
### 1. Bug Description
tx-lcn.logger.enabled=true 时DataSource会变成本地IP。username@本地IP 。mysql版本8.0.7
感觉是 HikariDataSource getConnection的问题。但没仔细看我先关掉这个配置了
### 2. Environment:
- JDK version:
- OS:
- TX-LCN version:5.0.2
- Others:
tx-lcn.logger.enabled=true
tx-lcn.logger.driver-class-name=com.mysql.cj.jdbc.Driver
tx-lcn.logger.jdbc-url=jdbc:mysql://192.168.0.10:3308/tx-manager?useSSL=false&characterEncoding=utf8&serverTimezone=UTC&allowPublicKeyRetrieval=true
tx-lcn.logger.username=username
tx-lcn.logger.password=password
### 3. Exception Stacktrace
java.sql.SQLException: CREATE command denied to user 'username'@'192.168.0.226' for table 't_logger' Query: CREATE TABLE IF NOT EXISTS `t_logger` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`group_id` varchar(64) NOT NULL ,
`unit_id` varchar(32) NOT NULL ,
`tag` varchar(50) NOT NULL ,
`content` varchar(1024) NOT NULL ,
`create_time` varchar(30) NOT NULL,
`app_name` varchar(128) NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) Parameters: []
at org.apache.commons.dbutils.AbstractQueryRunner.rethrow(AbstractQueryRunner.java:527) ~[commons-dbutils-1.7.jar:1.7]
at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:531) ~[commons-dbutils-1.7.jar:1.7]
at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:497) ~[commons-dbutils-1.7.jar:1.7]
at com.codingapi.txlcn.logger.db.LogDbHelper.update(LogDbHelper.java:55) ~[classes/:na]
at com.codingapi.txlcn.logger.helper.MysqlLoggerHelper.init(MysqlLoggerHelper.java:70) [classes/:na]
at com.codingapi.txlcn.common.runner.TxLcnApplicationRunner.run(TxLcnApplicationRunner.java:54) [classes/:na]
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:809) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:799) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:341) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at com.codingapi.txlcn.tm.TMApplication.main(TMApplication.java:35) [classes/:na]
```
Paste your Exception Stacktrace here!
```
### 4. Tour Idea
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.