MySQL database connection with MySQL Workbench 8.0 CE using AutoIT

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

MySQL database connection with MySQL Workbench 8.0 CE using AutoIT

L4 Transporter

Hi Guys,

 

I have missed something in my configuration. Most liking miss understood something. I am playing around with MySQL and MySQL Workbench 8.0.

I have read through the link listed below.

 

I was getting a different error until I gave it some time. Going through log files and checking the configuration. This is what I was getting first.

[14/06/2023 | 09:13:49] | :: | PSMSR864E [be40d748-7c59-4a33-b0bd-ec514f214d33] A failure occurred while waiting for the PSMMessageAlert to end. Extra Details: 3. Reason: PSMSR362E [be40d748-7c59-4a33-b0bd-ec514f214d33] An attempt to use the [GetProcessHandle] method was made when process was not initialized

[14/06/2023 | 09:13:49] | :: | PSMSR126E [be40d748-7c59-4a33-b0bd-ec514f214d33] Failure occurred while handling session. PSMSR133E [be40d748-7c59-4a33-b0bd-ec514f214d33] Failed to create process "C:\Program Files (x86)\AutoIt3\AutoIt3.exe". Code: 1260 (Codes: -1, -1)

[14/06/2023 | 09:14:14] | :: | PSMSR864E [4eff3026-3721-4ce2-a901-d9bfea187c88] A failure occurred while waiting for the PSMMessageAlert to end. Extra Details: 3. Reason: PSMSR362E [4eff3026-3721-4ce2-a901-d9bfea187c88] An attempt to use the [GetProcessHandle] method was made when process was not initialized

[14/06/2023 | 09:14:14] | :: | PSMSR126E [4eff3026-3721-4ce2-a901-d9bfea187c88] Failure occurred while handling session. PSMSR133E [4eff3026-3721-4ce2-a901-d9bfea187c88] Failed to create process "C:\Program Files (x86)\AutoIt3\AutoIt3.exe". Code: 1260 (Codes: -1, -1)

This is now what I am getting:

[14/06/2023 | 09:14:14] | :: | PSMRC055 open file for read fail, reason : -1998

[14/06/2023 | 09:14:14] | :: | PSMSR1453E Finalize from recovery service failed. Reason: PSMRC038E Failed to finilize record file (More information: [PSMRC055 open file for read fail, reason : -1998]) (Codes: -1, -1), for record ° àšÙ

[14/06/2023 | 09:14:14] | :: | PSMSRSRU005E [4eff3026-3721-4ce2-a901-d9bfea187c88] Uploader failed because recording file 4eff3026-3721-4ce2-a901-d9bfea187c88.VID.avi doesn't exists.

[14/06/2023 | 09:14:14] | :: | PSMSRSRU003E [4eff3026-3721-4ce2-a901-d9bfea187c88] Failed to upload recording file 4eff3026-3721-4ce2-a901-d9bfea187c88.VID.avi. Error: SRU005E [4eff3026-3721-4ce2-a901-d9bfea187c88] Uploader failed because recording file 4eff3026-3721-4ce2-a901-d9bfea187c88.VID.avi doesn't exists.

[14/06/2023 | 09:28:02] | :: | PSMSR864E [12ebe939-defc-4b10-8436-106200d867b1] A failure occurred while waiting for the PSMMessageAlert to end. Extra Details: 3. Reason: PSMSR362E [12ebe939-defc-4b10-8436-106200d867b1] An attempt to use the [GetProcessHandle] method was made when process was not initialized

[14/06/2023 | 09:28:02] | :: | PSMRC055 open file for read fail, reason : -1998

[14/06/2023 | 09:28:02] | :: | PSMSR126E [12ebe939-defc-4b10-8436-106200d867b1] Failure occurred while handling session. PSMSR133E [12ebe939-defc-4b10-8436-106200d867b1] Failed to create process "C:\Program Files (x86)\AutoIt3\AutoIt3.exe". Code: 1260 (Codes: -1, -1)

[14/06/2023 | 09:28:02] | :: | PSMSR1453E Finalize from recovery service failed. Reason: PSMRC038E Failed to finilize record file (More information: [PSMRC055 open file for read fail, reason : -1998]) (Codes: -1, -1), for record ° àšÙ

[14/06/2023 | 09:28:02] | :: | PSMSRSRU005E [12ebe939-defc-4b10-8436-106200d867b1] Uploader failed because recording file 12ebe939-defc-4b10-8436-106200d867b1.VID.avi doesn't exists.

[14/06/2023 | 09:28:02] | :: | PSMSRSRU003E [12ebe939-defc-4b10-8436-106200d867b1] Failed to upload recording file 12ebe939-defc-4b10-8436-106200d867b1.VID.avi. Error: SRU005E [12ebe939-defc-4b10-8436-106200d867b1] Uploader failed because recording file 12ebe939-defc-4b10-8436-106200d867b1.VID.avi doesn't exists.

 

Not worried about the PSMSRSRU003E

 

This is the error I am looking at:

PSMSR126E [12ebe939-defc-4b10-8436-106200d867b1] Failure occurred while handling session. PSMSR133E [12ebe939-defc-4b10-8436-106200d867b1] Failed to create process "C:\Program Files (x86)\AutoIt3\AutoIt3.exe". Code: 1260 (Codes: -1, -1)

The Path to AutoIt3.exe is correct. C:\Program Files (x86)\AutoIt3\AutoIt3.exe

 

 

https://community.cyberark.com/s/feed/0D550000062mfJNCAY

https://community.cyberark.com/s/question/0D52J000070vOZHSA2/i-have-an-issue-i-can-not-connect-to-my-target-using-https-the-message-is-psmsr308e-selected-component-psmriverbed-does-not-contain-the-target-settings-definitions-in-policy-edfriverbeddomain-account

1 accepted solution

Accepted Solutions

L4 Transporter

The Solution to the MySQL Workbench 8.0 CE integration.

 

The problem with the CyberArk prebuilt integration from the CyberArk MarketPlace is that it is unable to input the password in the password block. After replacing the online 72

FROM: WindowsForms10.EDIT.app.0.1a0e24_r13_ad11

TO: WindowsForms10.EDIT.app.0.34f5582_r6_ad11

 

It was now able to put the password in the password field.

To resolve the auto login part (Clicking on the "OK" box) I had to change line 73.

FROM: WindowsForms10.BUTTON.app.0.1a0e24_r13_ad13

TO: WindowsForms10.BUTTON.app.0.34f5582_r6_ad13

 

That worked to fix the issue with the PSMMySQLDispatcher.exe

 

Do not forget to run the Compile Script to .exe.

 

This will resolve the issue

View solution in original post

15 REPLIES 15

L4 Transporter

  <ConnectionComponent Id="PSM-MYSQLWorkbench" Type="CyberArk.PasswordVault.TransparentConnection.PSM.PSMConnectionComponent, CyberArk.PasswordVault.TransparentConnection.PSM">

   <ComponentParameters />

   <UserParameters>

    <Parameter Name="AllowMappingLocalDrives" Required="Yes" Type="CyberArk.TransparentConnection.BooleanUserParameter, CyberArk.PasswordVault.TransparentConnection" Value="Yes" Visible="Yes" />

   </UserParameters>

   <TargetSettings ClientApp="dummy.exe" ClientDispatcher="&quot;C:\Program Files (x86)\AutoIt3\AutoIt3.exe&quot; &quot;{PSMComponentsFolder}PSMMySQLDispatcher.au3&quot; &quot;{PSMComponentsFolder}&quot;" ClientInvokeType="Dispatcher" Protocol="VNC">

    <ClientSpecific />

    <LockAppWindow MainWindowClass="WindowsForms10.Window.8.app.0.1a0e24_r9_ad1" MainWindowTitle="MySQL Workbench" />

    <Capabilities>

     <Capability Id="KeystrokesAudit" />

     <Capability Id="KeystrokesTextRecorder" />

    </Capabilities>

   </TargetSettings>

  </ConnectionComponent>

 </ConnectionComponents>

L6 Presenter

Check if AutoIt3.exe block by applocker. You can detail on windows event viewer.

 

As best practice, you can compile au3 script to exe extension, and just allow it in applocker hardening.

L3 Networker

Hi @Andrew Price​ ,

Maybe appocker was block it, you can try to change applocker to mode audit and try again

L4 Transporter

Hi,

 

I have found the following document with was useful but out of date:

MySQL Workbench Implementation Guide.pdf

At the location:

https://community.cyberark.com/mplace/s/#a352J000000d902QAA-a392J000001Z3WAQA0

This has led me to the following error.

Field_Content_versions_oct20__068Ht00000QdCbDIAV.pngand

Field_Content_versions_oct20__068Ht00000QdCy3IAF.pngI have added the AutoIT to the applocker thank you @Duong Trung Duong​ and @Heron Sidabutar​

Though this would be taken care of as this is a default application my mistake.

 

I am now working on this error.

L4 Transporter

I have upgraded from 12.2.3 to 12.2.6 as there are some recommendations to replace the

PSMGenericClientDriver.xml

PSMGenericClientDriver.xml

 

This is from the Console log from my lab

20/06/2023 | 15:03:15] | :: | PSMSR864E [3d232c43-23b9-468d-88e7-3162f9d51e87] A failure occurred while waiting for the PSMMessageAlert to end. Extra Details: 3. Reason: PSMSR362E [3d232c43-23b9-468d-88e7-3162f9d51e87] An attempt to use the [GetProcessHandle] method was made when process was not initialized

[20/06/2023 | 15:03:15] | :: | PSMSR126E [3d232c43-23b9-468d-88e7-3162f9d51e87] Failure occurred while handling session. PSMSR133E [3d232c43-23b9-468d-88e7-3162f9d51e87] Failed to create process "C:\Program Files (x86)\AutoIt3\AutoIt3.exe". Code: 1260 (Codes: -1, -1)

[20/06/2023 | 15:03:39] | :: | PSMSR864E [1168cf91-7cfb-46d9-bdc7-bee847e3f2b9] A failure occurred while waiting for the PSMMessageAlert to end. Extra Details: 3. Reason: PSMSR362E [1168cf91-7cfb-46d9-bdc7-bee847e3f2b9] An attempt to use the [GetProcessHandle] method was made when process was not initialized

[20/06/2023 | 15:03:40] | :: | PSMSR126E [1168cf91-7cfb-46d9-bdc7-bee847e3f2b9] Failure occurred while handling session. PSMSR133E [1168cf91-7cfb-46d9-bdc7-bee847e3f2b9] Failed to create process "C:\Program Files (x86)\AutoIt3\AutoIt3.exe". Code: 1260 (Codes: -1, -1)

 

L4 Transporter

Have run the test command:

AutoIt3.exe "C:\Program Files (x86)\CyberArk\PSM\Components\PSMMySQLDispatcher.au3 "C:\Program Files x86)\CyberArk\PSM\Components\" /test

and got the following error basically unable to open up the PSMMySQLDispatcher.au3

 

Command prompt is running as administrator

 

Field_Content_versions_oct20__068Ht00000QdEIGIA3.png

The upgrade caused this as it overwrote the PSMConfigureAppLocker.xml.

It revived the line that I had added

<!-- AutoIt3 -->

<Application Name="AutoIt3" Type="Exe" Path="C:\Program Files (x86)\AutoIt3\AutoIt3.exe" Method="Hash" />

<Application Name="AutoIt3_x64" Type="Exe" Path="C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe" Method="Hash" />

 <!--End of AutoIt3 comment -->

 

<!-- Workbench -->

<Application Name="Workbench " Type="Exe" Path="C:\Program Files\MySQL\MySQL Workbench 8.0 CE\MySQLWorkbench.exe" Method="Hash" />

<!--End of Workbench comment -->

L4 Transporter

I am now back to the error:

PSMMySQLDispatcher.exe is not available.

Field_Content_versions_oct20__068Ht00000QdNclIAF.png

L4 Transporter

I see the following error in the Event viewer

Microsoft.Windows.ShellExperienceHost was prevented from running.

 

This is from the PSMconsole.log

[23/06/2023 | 16:40:06] | :: | PSMSR126E [017236cb-1192-409b-b383-6da49fa630bc] Failure occurred while handling session. PSMSR605E [017236cb-1192-409b-b383-6da49fa630bc] Error occurred while waiting for the dispatcher to communicate (Error details: [PSMSR606E [017236cb-1192-409b-b383-6da49fa630bc] Timeout occurred while waiting for a specific component to end]) (Codes: -1, -1)

 

L4 Transporter

I worked out my ClientDisspather line was incorrect I have now resolve that.

"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "{PSMComponentsFolder}PSMMySQLDispatcher.au3" "{PSMComponentsFolder}"

 

I have now picked up the following error:

PSMGenericClientwrapper error: failed to load DLL C:\Program Files (x86)\CyberArk\Components\\PSMDispatcherUtils.dll

 

Field_Content_versions_oct20__068Ht00000QeP0BIAV.pngThe PSMconsole.log has the same error as above.

29/06/2023 | 15:53:27] | :: | PSMSR583I Vault IP address: 192.168.10.11

[29/06/2023 | 15:53:27] | :: | PSMSR035I Privileged Session Manager version [12.6.5.9] is up

[29/06/2023 | 15:54:08] | :: | PSMSR126E [ee677454-fce2-4744-8493-a36d790d6a40] Failure occurred while handling session. PSMSR605E [ee677454-fce2-4744-8493-a36d790d6a40] Error occurred while waiting for the dispatcher to communicate (Error details: [PSMSR606E [ee677454-fce2-4744-8493-a36d790d6a40] Timeout occurred while waiting for a specific component to end]) (Codes: -1, -1)

[29/06/2023 | 16:21:10] | :: | PSMSR126E [147f9182-9aba-45ad-a71a-86c705dd8597] Failure occurred while handling session. PSMSR605E [147f9182-9aba-45ad-a71a-86c705dd8597] Error occurred while waiting for the dispatcher to communicate (Error details: [PSMSR606E [147f9182-9aba-45ad-a71a-86c705dd8597] Timeout occurred while waiting for a specific component to end]) (Codes: -1, -1)

 

L4 Transporter

I have moved to make use of the MySQL Workbench

https://community.cyberark.com/mplace/s/#a352J000000d902QAA-a392J000001Z3WAQA0

 

You will need to set the AppLocker which is not listed in the document

 

<!-- MySQL Workbench 8.0 CE processes -->

<!-- If relevant, uncomment this part after installing MySQL Workbench 8.0 CE processes -->

<Application Name="Workbench" Type="Exe" Path="C:\Program Files\MySQL\MySQL Workbench 8.0 CE\MySQLWorkbench.exe " Method="Hash" />

<!-- End of MySQL Workbench 8.0 CE processes comment -->

 

It just not adding the password.

L4 Transporter

The Solution to the MySQL Workbench 8.0 CE integration.

 

The problem with the CyberArk prebuilt integration from the CyberArk MarketPlace is that it is unable to input the password in the password block. After replacing the online 72

FROM: WindowsForms10.EDIT.app.0.1a0e24_r13_ad11

TO: WindowsForms10.EDIT.app.0.34f5582_r6_ad11

 

It was now able to put the password in the password field.

To resolve the auto login part (Clicking on the "OK" box) I had to change line 73.

FROM: WindowsForms10.BUTTON.app.0.1a0e24_r13_ad13

TO: WindowsForms10.BUTTON.app.0.34f5582_r6_ad13

 

That worked to fix the issue with the PSMMySQLDispatcher.exe

 

Do not forget to run the Compile Script to .exe.

 

This will resolve the issue

You will need to make use of the tool AutoIT Windows Info to get these details if they change again.

L2 Linker

In my case, below PSMMySQLDispatcher.au3 script is working with MySQL Workbench 8.0.42. PSMMySQLDispatcher.exe is not required in Component folder.

 

++++++++++++++++++

Local $hWnd1 = WinWaitActive("Connect to MySQL Server", "", 10)

WinActivate ($hWnd1)

Send ($TargetPassword,1)

Send ("{ENTER}")

; ControlSetText ("Connect to MySQL Server","","WindowsForms10.EDIT.app.0.1a0e24_r13_ad11",$TargetPassword)

; ControlClick ("Connect to MySQL Server","","WindowsForms10.BUTTON.app.0.1a0e24_r13_ad13")

++++++++++++++++++

  • 1 accepted solution
  • 1505 Views
  • 15 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!