After installing mysql on opensuse, you need to change it to the automatic start mode. As a result, an error is reported when chkconfig -- level 35 mysqld on is used. The usage of chkconfig and chkconfig in Red Hat series on suse is somewhat different. See help chkconfig -- help (or man chkconfig ):
Usage:
Chkconfig-A | -- allservices (together with-l: show all services)
Chkconfig-t | -- terse [names] (shows the links)
Chkconfig-e | -- edit [names] (configure services)
Chkconfig-s | -- set [name state]... (configure services)
Chkconfig-l | -- list [-- deps] [names] (shows the links)
Chkconfig-c | -- check name [state] (check state)
Chkconfig-a | -- add [names] (runs insserv)
Chkconfig-d | -- del [names] (runs insserv-r)
Chkconfig-h | -- help (print usage)
Chkconfig-f | -- force... (call insserv with-f)
Chkconfig [name] same as chkconfig-t
Chkconfig name state... same as chkconfig-s name state
Chkconfig -- root = <root>... use <root> as the root file system
It can be seen that changing the startup level is no longer a -- level parameter, but a-s parameter. If you want to start mysqld in 35, you can chkconfig-s mysqld 35.
Note: After chkconfig-s mysqld on is started, the default configuration mode of mysqld startup is loaded. If it is started by 2345 by default, it is started by 2345. By default, you can change the name of the corresponding service, such as mysqld. Vi/etc/init. d/mysqld, find
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $ local_fs $ network $ remote_fs
# Shocould-Start: ypbind nscd ldap ntpd xntpd
# Required-Stop: $ local_fs $ network $ remote_fs
# Default-Start: 2 3 4 5 (Default Start mode)
# Default-Stop: 0 1 6 (Default disable Mode)
# Short-Description: start and stop MySQL
# Description: MySQL is a very fast and reliable SQL database engine.
### END INIT INFO
Modify the startup mode.
If you want to change the startup mode of a service, you only need to enable the option interface that needs to be enabled. For example, if mysqld is currently running in 2345 mode and you want to disable Mode 4, you only need to enter the following command:
Chkconfig-s mysqld 235
An error may be reported due to some dependencies. You can use-f to enable it forcibly.
For details, see man.