我总是必须在启动时手动启动所有服务器停机并启动。 有人帮我设置启动systemctl启动启动
[root@localhost ~]# systemctl enable mysqld Failed to issue method call: Access denied [root@localhost ~]# systemctl status mysqld mysqld.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead) [root@localhost ~]# systemctl status mysql mysql.service - LSB: start and stop MySQL Loaded: loaded (/etc/rc.d/init.d/mysql) Active: active (running) since Mon 2015-10-26 10:18:16 EDT; 2 days ago CGroup: /system.slice/mysql.service ├─1485 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/trimdb03.pid └─2523 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql -- plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log- error=/var/lib/mysql/mysql.err --pid-file=/... Oct 26 10:18:06 localhost systemd[1]: Starting LSB: start and stop MySQL... Oct 26 10:18:16 localhost mysql[1244]: Starting MySQL......... SUCCESS! Oct 26 10:18:16 localhost systemd[1]: Started LSB: start and stop MySQL. [root@localhost ~]# systemctl enable mysql mysql.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin/chkconfig mysql on The unit files have no [Install] section. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). [root@localhost ~]#
出于某种原因,MySQL使用旧式的初始化脚本,即使在使用systemd的CentOS 7上也是如此。 他们应该已经分配了一个合适的系统单元文件,但是没有select。
启用旧式初始化脚本的正确方法是使用chkconfig ,即:
chkconfig mysql on
如果这仍然失败,那么您需要对您的Oracle支持联系人非常大声和愤怒。