Discovery pattern extension for MySQL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 05:46 AM
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:
Then I need the following commandline to connect to MySQL:
And I got the error:
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:
Database administrator checked the strings on their side and it works fine for them:
- RDP to the Midserver
- Launch a putty session and connect to the discovered server (used same ssh private key as the one entered in ServiceNow credentials)
- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2022 07:58 AM
Hi @Sofia1994,
Some guesses from me:
- At the Linux Server there is a "limit" for large responses. Like when you send a command and the response will be more than 255 lines (or so) it will ask "Are you sure you want to display all (Y/N)?" Discovery is not able to get further then. (There is a setting on several OS to disable this question for certain users)
- Is the Linux user really root? Or just allowed to execute certain commands "as root". This can cause Problems at commands with "su" at the beginning.
If this answer helps you please mark it as Helpful/Solution.
Thanks & Regards - Manuel
If my answer helped you, please mark it as Helpful/Solution.
Thanks & many Regards - Manuel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2025 01:16 AM
did you manage to get the custom pattern in place for mysql db.. i have a similar requirement