You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
**context** I am trying to install mysql for openstack but I got a problem with mysql. Here are my tasks: <pre> --- # Tasks for the base controller node
- name: Install the base packages apt: pkg={{ item }} state=present with_items: - ntp - mysql-server - python-mysqldb - rabbitmq-server
- name: install mysql config file that binds to management network interface template: src: my.cnf.j2 dest: /etc/mysql/my.cnf owner: root group: root mode: 0644
- name: restart mysql service: name=mysql state=restarted
- name: update mysql root password for all root accounts mysql_user: name: root host: localhost password: "{{ mysql_root_password }}"
- name: copy user my.cnf file with root passwd credentials template: src=.my.cnf.j2 dest=/root/.my.cnf owner=root group=root mode=0600
- name: delete anonymous mysql user mysql_user: name="" state=absent
- name: remove mysql test database mysql_db: name=test state=absent </pre>
**Expected** When mysql is restarted, I just expect it to shutdown and start smoothly. Like that, openstack modules can connect to their database and work.
**What I get** Mysql is not restarted correctly and I can't connect to it. <pre> mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) </pre>
In fact the mysql stopped state doesn't work, reslting in this error:
<pre> InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. 130210 21:17:53 InnoDB: Unable to open the first data file InnoDB: Error in opening ./ibdata1 130210 21:17:53 InnoDB: Operating system error number 11 in a file operation. </pre>
It only do it when I use ansible. If I do : <pre> sudo service mysql restart </pre> there is no problem. If I don't restart mysql I don't get any problem in logs.
Brian Coca
unread,
Jun 8, 2015, 11:16:58 AM6/8/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
check your mysql data directory in the config, it is either pointing
at an invalid directory or the directory it is pointing at does not
have appropriate permissions for the user that runs mysql.