teleport
teleport copied to clipboard
MySQL proxy server missing CLIENT_LOCAL_FILES capability
Description
Teleport MySQL proxy server uses hardcoded lists of MySQL cap server_conf.go#L78 where CLIENT_LOCAL_FILES
is missing.
If end server support one of the disabled capability the end user is not able to execute some commands.
What happened:
After connecting to database with mysql ... --local-infile=1
cap where the server supports local_infile
mysql> SHOW GLOBAL VARIABLES LIKE 'local_infile';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile | ON |
+---------------+-------+
And executing the LOAD DATA LOCAL INFILE
query:
mysql> LOAD DATA LOCAL INFILE '/tmp/loaddata7.dat' into table t1 fields terminated by ',' (a,b) set c=a+b;
One of following error is returned (depending on MySQL version) :
-
ERROR 3948 (42000): Loading local data is disabled; this must be enabled on both the client and server sides
-
ERROR 1148 (42000): The used command is not allowed with this MySQL version
What you expected to happen:
MySQL server caps should be set properly allowing a user to execute LOAD DATA LOCAL INFILE
command the requires CLIENT_LOCAL_FILES
MySQL capability.
I've verified this issue occurs using mysql v8 & teleport v9.0.1.
Any update on this issue ? will this be fixed in upcoming release?