Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command is not allowed with this MariaDB version #2

Open
dhyeem opened this issue Jan 10, 2020 · 1 comment
Open

command is not allowed with this MariaDB version #2

dhyeem opened this issue Jan 10, 2020 · 1 comment

Comments

@dhyeem
Copy link

dhyeem commented Jan 10, 2020

MariaDB Server version: 10.3

the script is running in the same machine,

# Set database information $mySqlhost = "localhost" $dbName = "call_detail_records" $dbUsername = "admin" $dbPassword = "Aa123456" $dbCdrTbl = "cdr" $dbCmrTbl = "cmr"

below is the log file,

`**********************
Windows PowerShell transcript start
Start time: 20200110220633
Username: DZN-PC\DZN
RunAs User: DZN-PC\DZN
Configuration Name:
Machine: DZN-PC (Microsoft Windows NT 10.0.18363.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & 'C:\Users\DZN\Documents\Dev\CUCM-CDR-CMR\CDR-MySQL-Import.ps1'
Process ID: 1488
PSVersion: 5.1.18362.145
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.18362.145
BuildVersion: 10.0.18362.145
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1


Transcript started, output file is C:\Users\DZN\Documents\Dev\CUCM-CDR-CMR\logs\CDR_Import_1_10_2020.log
The used command is not allowed with this MariaDB version
ERROR - Failed to insert file 'C:/Users/DZN/Documents/Dev/CUCM-CDR-CMR/data/2019-01/cdr_StandAloneCluster_01_201901010504_106166'
The connection is already open.
ERROR - Could not connect to database server 'localhost'
PS>TerminatingError(): "System error."

$global:?
False


Windows PowerShell transcript end
End time: 20200110220646


`

i can connect to the DB throw phpmyadmin, and i tryied by power shell its working fine. but the code is throwing an error for db connection issue.

appreciate your support.

Regards,

@michaelc64
Copy link

Hi dhyeem,

Try adding allowLoadLocalInfile=true; to the end of the connection string on line 57. That should make it work. Also confirm on your mysql/mariadb server that local infile is allowed: SHOW VARIABLES LIKE 'local_infile';

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants