Make sure socket connections work correctly on Ubuntu.

pull/63/head
Jeff Geerling 9 years ago
parent 710c52c671
commit 8299775d52
  1. 9
      .travis.yml
  2. 9
      tasks/configure.yml

@ -40,7 +40,14 @@ script:
- "sudo ls -lah /var/log"
- "sudo cat /var/log/mysql/error.log"
# Check to make sure we can connect to MySQL.
# Check to make sure we can connect to MySQL via Unix socket.
- >
mysql -u root -proot -e 'show databases;'
| grep -q 'performance_schema'
&& (echo 'MySQL running normally' && exit 0)
|| (echo 'MySQL not running' && exit 1)
# Check to make sure we can connect to MySQL via TCP.
- >
mysql -u root -proot -h 127.0.0.1 -e 'show databases;'
| grep -q 'performance_schema'

@ -10,3 +10,12 @@
- name: Ensure MySQL is started and enabled on boot.
service: "name={{ mysql_daemon }} state=started enabled={{ mysql_enabled_on_startup }}"
- name: Ensure MySQL socket file has correct permissions.
file:
path: "{{ item }}"
mode: 0755
notify: restart mysql
with_items:
- "{{ mysql_datadir }}"
- "{{ mysql_socket }}"