I have a Powershell script that currently loads some data from a CSV into a MySQL 5.1.73 server located on a local Linux box (It works great). I am editing this code to now load the data into a Google CloudSQL 5.7.14 database.
I have enabled the 'local_infile on' flag on the CloudSQL database instance and when I attempt to run the code I get the error:
Exception calling "Fill" with "2" argument(s): "The used command is not allowed with this MySQL version"
When I SSH into the CloudSQL instance using the syntax:
mysql --local-infile=1 -u root -h XX.XX.XX.XX -p
and attempt to load the CSV everything works fine. If I do not use the:
--local-infile=1
flag I will get a similar error.
My question is, how do I initiate the connection from Powershell to essentially include the same '--local-infile=1' flag, if that is even possible?
My current connection string looks like:
$constring="server=XX.XX.XX.XX;uid=USERNAME;pwd=PASSWORD;database=DATABASE;Pooling=False;"
I have scoured the internet for the last few hours and tried a few flags in an attempt to guess it and I have failed.
Thanks for the help.