Reputation: 1
I am running "Vagrant up --provision", it seems to be ok but at the end, I got an error shown below. Please help me to solve this problem as I tried many times with VPN and without VPN but getting error "Failed to start MariaDB 10.3.31 database server."
default: An error occurred while setting the password for the MariaDB administrative
default: user. This may have happened because the account already has a password, or
default: because of a communication problem with the MariaDB server.
default: You should check the account's password after the package installation.
default: Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for
default: more information.
default: Job for mariadb.service failed because the control process exited with error code.
default: See "systemctl status mariadb.service" and "journalctl -xe" for details.
default: invoke-rc.d: initscript mysql, action "start" failed.
default: ● mariadb.service - MariaDB 10.3.31 database server
default: Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
default: Drop-In: /etc/systemd/system/mariadb.service.d
default: └─migrated-from-my.cnf-settings.conf
default: Active: failed (Result: exit-code) since Sun 2021-11-07 17:38:01 UTC; 12ms ago
default: Docs: man:mysqld(8)
default: https://mariadb.com/kb/en/library/systemd/
default: Process: 6548 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
default: Process: 6404 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)
default: Process: 6398 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
default: Process: 6387 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
default: Main PID: 6548 (code=exited, status=1/FAILURE)
default:
default: Nov 07 17:38:01 vvv mysqld[6548]: 2021-11-07 17:38:01 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
default: Nov 07 17:38:01 vvv mysqld[6548]: 2021-11-07 17:38:01 0 [Note] Crash recovery finished.
default: Nov 07 17:38:01 vvv mysqld[6548]: 2021-11-07 17:38:01 6 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1017: Can't find file: './mysql/' (errno: 2 "No such file or directory")
default: Nov 07 17:38:01 vvv mysqld[6548]: 2021-11-07 17:38:01 0 [Note] InnoDB: Buffer pool(s) load completed at 211107 17:38:01
default: Nov 07 17:38:01 vvv mysqld[6548]: 2021-11-07 17:38:01 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
default: Nov 07 17:38:01 vvv mysqld[6548]: 2021-11-07 17:38:01 0 [Note] Server socket created on IP: '127.0.0.1'.
default: Nov 07 17:38:01 vvv mysqld[6548]: 2021-11-07 17:38:01 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
default: Nov 07 17:38:01 vvv systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
default: Nov 07 17:38:01 vvv systemd[1]: mariadb.service: Failed with result 'exit-code'.
default: Nov 07 17:38:01 vvv systemd[1]: Failed to start MariaDB 10.3.31 database server.
default: dpkg: error processing package mariadb-server-10.3 (--configure):
default: installed mariadb-server-10.3 package post-installation script subprocess returned error exit status 1
default: dpkg: dependency problems prevent configuration of mariadb-server:
default: mariadb-server depends on mariadb-server-10.3 (>= 1:10.3.31+maria~bionic); however:
default: Package mariadb-server-10.3 is not configured yet.
default:
default: dpkg: error processing package mariadb-server (--configure):
default: dependency problems - leaving unconfigured
default: No apport report written because the error message indicates its a followup error from a previous failure.
default: E: Sub-process /usr/bin/dpkg returned an error code (1)
default: Installing apt-get packages returned a failure code, cleaning up apt caches then exiting
default: Main packages check and install failed, halting provision
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.```
Upvotes: 0
Views: 313
Reputation: 230
Try to set the database username and password in the .env
file of your project. Something like this:
Then execute this command: vagrant reload --provision
.
I am using HeidiSQL that lets me see and edit data and structures from my VM running one of the database systems MariaDB, MySQL etc.
Hope this answer helps you.
Upvotes: 0