fail to enable mysqld service but after reboot the service is running on centos 7

After I installed, I run systemctl enable mysqld.service. Then, the output is:

Failed to execute operation: Too many levels of symbolic links

After this error, I reboot my service, and I check the status of mysqld.service. systemctl status mysqld.service -l

The output is

● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Tue 2017-05-16 13:41:06 UTC; 8min ago
  Process: 1930 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 767 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 743 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 813 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mariadb.service
           └─813 /usr/sbin/mysqld

May 16 13:41:05 hostname mysqld[813]: 2017-05-16 13:41:05 140294373226752 [Note] InnoDB: Highest supported file format is Barracuda.
May 16 13:41:06 hostname mysqld[813]: 2017-05-16 13:41:06 140294373226752 [Note] InnoDB: 128 rollback segment(s) are active.
May 16 13:41:06 hostname mysqld[813]: 2017-05-16 13:41:06 140294373226752 [Note] InnoDB: Waiting for purge to start
May 16 13:41:06 hostname mysqld[813]: 2017-05-16 13:41:06 140294373226752 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 1616859
May 16 13:41:06 hostname mysqld[813]: 2017-05-16 13:41:06 140293647075072 [Note] InnoDB: Dumping buffer pool(s) not yet started
May 16 13:41:06 hostname mysqld[813]: 2017-05-16 13:41:06 140294373226752 [Note] Plugin 'FEEDBACK' is disabled.
May 16 13:41:06 hostname mysqld[813]: 2017-05-16 13:41:06 140294373226752 [Note] Server socket created on IP: '::'.
May 16 13:41:06 hostname mysqld[813]: 2017-05-16 13:41:06 140294373226752 [Note] /usr/sbin/mysqld: ready for connections.
May 16 13:41:06 hostname mysqld[813]: Version: '10.1.23-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
May 16 13:41:06 hostname systemd[1]: Started MariaDB database server.

Is anyway to solve the problem?

Thanks!


Remove the mysqld.service symbolic link in /etc/systemd/system and enable the mysqld.service again:

rm /etc/systemd/system/mysqld.service
systemctl enable mysqld.service