DevelopersPL / otshosting-provisioning

Ansible playbook to provision OTS Hosting on Ubuntu 20.04
https://github.com/DevelopersPL/otshosting-provisioning/wiki
MIT License
33 stars 29 forks source link

MySQL Problem #25

Open Hestril opened 2 years ago

Hestril commented 2 years ago

Hello, I have problem that never happened before, new installed Ubuntu 20.04.


TASK [Set MySQL otsmanager password (localhost)] *******************************
[WARNING]: Module did not set no_log for update_password
fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, u\"Access denied for user 'root'@'localhost'\")"}
DSpeichert commented 2 years ago

This relies on unix_socket authentication for root, which is the default. I'm not sure why it doesn't work for you.

Hestril commented 2 years ago

I think the problem is with Ubuntu newest update, cuz I have same error on second hosting provider.

xemekk commented 2 years ago

I also had this problem, here is the solution for everyone struggling with this:

enter to database cmd mysql type this command: update mysql.user set plugin = ''; re-run last command: ansible-pull -i localhost, -U https://github.com/DevelopersPL/otshosting-provisioning.git -d /srv/otshosting-provisioning --purge -t default

gesior commented 2 years ago

Someone reported me same error on VPS bought on https://serverdiscounter.com/virtual-server/ and @xemekk solution worked.

Anyway. I ran it on Docker without xemekk solution and it works. I don't know what can be wrong. Outdated Ubuntu repositories configured by default or what? I will try to get list of repositories from guy who had that problem.

To run provisioning inside docker with Ubuntu 20.04:

docker run -it --privileged jrei/systemd-ubuntu:20.04 bash

Inside docker:

apt update && apt install -y sudo && apt -y upgrade
apt install -y -q python-simplejson git-core ansible && ansible-pull -i localhost, -U https://github.com/DevelopersPL/otshosting-provisioning.git -d /srv/otshosting-provisioning --purge -t default

Installed MariaDB version:

root@723707890a60:/# mysql --version
mysql  Ver 15.1 Distrib 10.3.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2