[stable-2.5] Detect the socket path after starting the service. Fixes…
diff --git a/test/integration/targets/setup_mysql_db/tasks/main.yml b/test/integration/targets/setup_mysql_db/tasks/main.yml
index 1bec93e73c9626..8a667d9e0f4445 100644
--- a/test/integration/targets/setup_mysql_db/tasks/main.yml
+++ b/test/integration/targets/setup_mysql_db/tasks/main.yml
@@ -73,3 +73,12 @@
 
 - name: start mysql_db service if not running
   service: name={{ mysql_service }} state=started
+
+- name: Detect socket path
+  shell: >
+          echo "show variables like 'socket'\G" | mysql | grep 'Value: ' | sed 's/[ ]\+Value: //'
+  register: _socket_path
+
+- name: Set socket path
+  set_fact:
+    mysql_socket: '{{ _socket_path["stdout"] }}'

… #47582

(cherry picked from commit 10e129e)

Co-authored-by: Matt Martz <matt@sivel.net>

##### ISSUE TYPE
<!--- Pick one below and delete the rest -->
- Bugfix Pull Request


##### COMPONENT NAME
mysql integration tests

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
2.5.x
```
