daily pastebin goal
60%
SHARE
TWEET

Untitled

a guest Apr 27th, 2016 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. msg: unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials
  2.    
  3. - name: Set root user password
  4.   mysql_user: name=root
  5.               host="{{ item }}"
  6.               password="{{ mysql_root_password }}"
  7.               check_implicit_admin=yes
  8.               login_user="{{ mysql_user }}"
  9.               login_password="{{ mysql_root_password }}"
  10.               state=present
  11.    
  12. - name: Set root user password
  13.   mysql_user: name=root
  14.               host="{{ item }}"
  15.               password="{{ mysql_root_password }}"
  16.               check_implicit_admin=yes
  17.               login_user="{{ mysql_user }}"
  18.               login_password="{{ mysql_old_root_password }}"
  19.               state=present
  20.    
  21. mysql_old_root_password: productionpw
  22. mysql_root_password: newproductionpw
  23.    
  24. - name: Set root user password
  25.   # If .my.cnf already exists, this will cause an mysql-root-password update.
  26.   mysql_user:
  27.     name: root
  28.     password: "{{ mysql_root_password}}"
  29.     check_implicit_admin: true
  30.  
  31. - name: Create .my.cnf
  32.   template:
  33.    src: "client.my.cnf.j2"
  34.    dest: "/root/.my.cnf"
  35.    owner: root
  36.    group: root
  37.    mode: 0600
  38.    
  39. [client]
  40. user=root
  41. password={{ mysql_root_password }}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top