0

I'm aware this is a common issue, but none of the other posts helped me solve our issue (1, 2, 3, 4, 5, 6 ). I installed mariadb using an ansible as part of an openstack installation, and it crashed with the following error:

  • Ansible task:

     name: DB - setting /root/.my.cnf become: true copy: dest: /root/.my.cnf content: | [client] user=root password="{{ DB_root_password }}" socket = /var/run/mysqld/mysqld.sock tags: db_config - name: DB - Configure MariaDB become: true template: src: openstack.cnf dest: /etc/mysql/mariadb.conf.d/openstack.cnf tags: db_config - name: DB - configure keystone access 1/3 become: true template: src: keystone.sql.j2 dest: /root/keystone.sql tags: db_config - name: DB - grant access to Keystone 2/3 become: true shell: mysql -u root < /root/keystone.sql tags: db_config 
  • Error:

"stderr": "ERROR 2002 (HY000): Can't connect to local server through socket '/var/run mysqld/mysqld.sock' (2)"

  • More info:
~# service mariadb status Process: 1039769 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) Process: 1039771 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS) Process: 1039852 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=killed, signal=ILL) Main PID: 1039852 (code=killed, signal=ILL) Mem peak: 5.4M CPU: 606ms Nov 05 14:41:26 controller01 systemd[1]: Failed to start mariadb.service - MariaDB 10.11.3 database server. 
  • I also get the same error (ERROR 2002 (HY000)) when I run the commands mysql or mariadb.
  • I tried manually installing mariadb but the output is the same.
  • I tried mariadb_safe but the socket is not created
5
  • Trixie is in testing. Have you verified it's not a bug? Commented Nov 5, 2024 at 13:56
  • Hi @vidarlo! Yes, and the only known bug relating mariadb and debian trixie is this Commented Nov 5, 2024 at 14:04
  • The only useful bit of information in your post is "Failed to start mariadb.service". Everything else is a symptom of that. Check your log files and learn how to use systemctl to manage services. Commented Nov 5, 2024 at 14:33
  • Hi @symcbean! I have no /var/log/mysql/ nor /var/log/mariadb/ directories, and journalctl returns the same log as systemctl or service do (which I already posted above). Do you have any other advice? Thanks! Commented Nov 5, 2024 at 14:37
  • Check the log paths in the config file / ensure the DBMS will write log where you can read them. Commented Nov 5, 2024 at 14:42

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.