# dbf install python2
# dnf install ansible
# nano /etc/ansible/hosts
hosts > [localhost]
127.0.0.1
# dnf install -y openssh-server
# ssh-keygen -t rsa -b 4096
# systemctl restart sshd.service
# ssh-copy-id 'ip-address'
# ifconfig
# dnf update
# cd /etc/ansible/
# ansible-playbook -i hosts setup_server.yml
- Stop mysql:
# systemctl stop mysqld
- Set the mySQL environment option
# systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
- Start mysql usig the options you just set
# systemctl start mysqld
- Login as root
# mysql -u root
- Update the root user password with these mysql commands
password
your set a password
mysql> UPDATE mysql.user SET authentication_string = PASSWORD('password') WHERE User = 'root' AND Host = 'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit;
- Stop mysql
# systemctl stop mysqld
- Unset the mySQL envitroment option so it starts normally next time
# systemctl unset-environment MYSQLD_OPTS
- Start mysql normally:
# systemctl start mysqld
- Try to login using your new password:
# mysql -u root -p
- Set ALTER root user & password
password
your set a password
mysql> SET GLOBAL validate_password_policy=LOW;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';
mysql> quit;
# cd /etc/ansible/
# ansible-playbook -i hosts setup_wordpress.yml