Your credentials do not have read permissions when saving datasource

I met the problem with MySQL driver connecting to TiDB. The connection test is fine.

And the MySQL user's permission is

Hi @zhangyangyu!

Hmm definitely odd.

Do you have the “Skip TLS certificate validation” option checked/unchecked? Could you try toggling it, saving it and seeing if that makes any difference?

@victoria Thanks for your reply. I don't have the "Skip TLS certificate validation" option checked. As you could see, the "test connection" action passed, so I think the connection phase has no problem. And when I try to reproduce today, it's interesting that "Create resource" doesn't pop any error any more even if my settings are wrong, for example, wrong username. Do you make any changes?

Got it, thanks for checking. Could you try checking it, saving the resource, unchecking it, then saving the resource once more?

I don't believe we made any changes on our end! That's definitely strange though. Once you create resource and then "Test Connection", does it throw the error as expected?

Also, I looked into the original error a bit more and from our codebase, we through this error when there's a permissions issue with the database user you are using for this connection. We run SHOW GRANTS FOR CURRENT_USER; to check for at least SELECT/read permissions on at least one table. I see you have all the permissions from your show grants screenshot, which is good!

Would you mind sharing a screenshot of your full resource set up page? Feel free to redact any secrets!

Currently, I can't reproduce the error :frowning: "Create Resource" and "Test Connection" both succeed. Let's see whether it will show again in future.

That’s great news! Definitely let me know if it pops up again, and thanks for the update :slightly_smiling_face: