web-dev-qa-db-ja.com

mysqldサービスを有効にできませんが、再起動後、サービスはCentOS 7で実行されます

インストール後、systemctl enable mysqld.serviceを実行します。次に、出力は次のとおりです。

Failed to execute operation: Too many levels of symbolic links

このエラーの後、サービスを再起動し、mysqld.serviceのステータスを確認します。 systemctl status mysqld.service -l

出力は

● 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.

とにかく問題を解決しますか?

ありがとう!

6
Tony

mysqld.service/etc/systemd/systemシンボリックリンクを削除し、mysqld.serviceを再度有効にします。

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