August 11, 2022 at 9:37 am
Hello guys,
I'm trying to import my csv with a cmdlet into my MYSQL DB. Bit I have issues with connecting to my db cause there is no options to use a user and password.
The MYSQL server is running localy on the same machine.
This is my code:
Write-SqlTableData -DatabaseName DashboardData -TableName akustik -Serverinstance $env:COMPUTERNAME -SchemaName dashboard -InputData $data -Passthru
and it throws this error:
Write-SqlTableData : Fehler beim Herstellen einer Verbindung mit dem Server "VERWALTUNG-MA".
In Zeile:1 Zeichen:1
+ Write-SqlTableData -DatabaseName dashboard -TableName akustik -Server ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (VERWALTUNG-MA:String) [Write-SqlTableData], ConnectionFailureException
+ FullyQualifiedErrorId : ConnectionToServerFailed,Microsoft.SqlServer.Management.PowerShell.WriteSqlTableData
Would be glad if someone could help me cause i havnt much experience with powershell.
Thanks in advance.
Greetings LittleStudent
August 11, 2022 at 9:52 am
Hello and welcome to the forum.
As this is purely a SQL Server forum, you may find that you would get more help by posting in a MySQL forum instead.
August 11, 2022 at 11:50 am
Write-SqlTableData is for Microsoft SQL Server only. You cannot run that function against MySQL
As Phil said a dedicated MySQL forum would be best here and maybe looking at the module MySQLCmdlets.
August 11, 2022 at 6:05 pm
My recommendation would be to start at the following URL...
https://duckduckgo.com/?q=import+csv+into+mysql+workbench
--Jeff Moden
Change is inevitable... Change for the better is not.
August 15, 2022 at 7:09 am
Okay thank you very much guys. Meanwhile i resolved it by myself.
Thank you very much for your fast respponse guys :).
Greeting LittleStudent
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy