Discovery pattern extension for MySQL

Sofia1994
Tera Contributor

Hello all, I need a help with extended pattern "My SQL server On Windows and Linux".

 

I created an application credentials for MySQL database and used them in pattern:

Sofia1994_0-1669210326508.png

Then I need the following commandline to connect to MySQL:

Sofia1994_1-1669210380029.png

And I got the error: 

Error MySQL.png

I checked that username is right in error message.

 

If I tried this: "mysql -u" + "$$username$$" + " -p" + "$$password$$" + "--skip-column-names -e \"SHOW DATABASES;\""

I got another error:

Error MySQL 2.png

Database administrator checked the strings on their side and it works fine for them:

  1. RDP to the Midserver
  2. Launch a putty session and connect to the discovered server (used same ssh private key as the one entered in ServiceNow credentials)
  3. Execute the query from command line : mysql –u username –ppassword ….

And he got the list of database. 

 

Can you please help me why this error can be? Maybe we need additional rights or something else. 

10 REPLIES 10

rajesh9885
Mega Guru

did you manage to get the custom pattern in place for mysql db.. i have a similar requirement