By jkaywallace
I recently restarted a server that I’ve inherited (and therefore didn’t set up). Before the restart the webpages were accessing their SQL databases just fine — through MariaDB to a remote server. On the restart, they can no longer access their databases and the problem seems to be that MySQL/MariaDB isn’t running.
‘yum systemctl start mariadb’ brings up the error “Failed to start mariadb.service: Unit not found.” Strangely enough, I can still access the mysql shell with ‘mysql -u <user> -p’ and commands in the shell seem to work just fine — but my webpages can’t access the databases.
When I try to uninstall and reinstall I get the error:
maraidb101u-common conflicts with 1:mariadb-libs-5.5.56-2el7.x86_64 maraidb101u-config conflicts with 1:mariadb-libs-5.5.56-2el7.x86_64 maraidb101u-libs conflicts with 1:mariadb-libs-5.5.56-2el7.x86_64
I can’t make a backup with mysqldump either, so I’m trying to tread carefully. Does anyone have any idea of what can be done to troubleshoot this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @jkaywallace,
I tried to recreate the error which you are seeing but systemctl start mariadb worked for me without any error.
[root@mariadbcentos7-s-1vcpu-1gb-nyc1-01 ~]# systemctl start mariadb
[root@mariadbcentos7-s-1vcpu-1gb-nyc1-01 ~]# systemctl status mariadb
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2021-10-26 13:27:34 UTC; 4min 59s ago
Process: 1606 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
Process: 1523 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 1605 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─1605 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─1770 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock
You can check the below tutorial to guide you with Mariadb installation and backup :
https://www.digitalocean.com/community/tutorials/how-to-install-mariadb-on-centos-7
I hope this helps!
Regards, Rajkishore
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.