No mysqld or mysql.server after mariadb-server install

Solution 1:

Should anyone stumble across this, i found the solution here:

Repost below

To start MariaDB on Fedora 20, execute the following command:

systemctl start mariadb.service

To autostart MariaDB on Fedora 20, execute the following command:

systemctl enable mariadb.service

After you started MariaDB (do this only once), execute the following command:


Solution 2:

When you run:

yum install mysql

command by default it installs MariaDB not MySQL.

So try the following command:

yum list installed | grep mariadb

if mariadb-server is missing try this following command:

yum install mariadb-server

it installs the server package then start the service:

systemctl start mariadb


service mariadb start

My issue was solved in this way.

Solution 3:

The service name is mariadb so you can start it using:

service mariadb start

Stop it using:

service mariadb stop

And restart it using:

service mariadb restart

Solution 4:

See if mysqld is under /usr/libexec/ directory. At least with CentOS 6.5 the usual MySQL installs the server itself there.

Also see the output from systemctl list-units to see the name for you MariaDB server.

Solution 5:

I had a similar problem trying to start the mariadb service

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

I figured the issue was in non-matching yum packages - some were installed from the special mariadb repo and others from the centos official repo. Thus I had to drop the custom yum repo entry, delete MariaDB packages and install mariadb-server anew, then the service would start without problem.