We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
How to launch mysql at startup ?
How to launch mysql at startup ?
My MySQL/Percona server don't want to start at boot.
I always have to launch it manually with a :
If I do a :
I have this result :
But after a reboot, mysql is stopped :
What's wrong ?
I always have to launch it manually with a :
Code: Select all
systemctl start mysql
Code: Select all
systemctl enable mysql
Code: Select all
Synchronizing state for mysql.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d mysql defaults
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
Executing /usr/sbin/update-rc.d mysql enable
Code: Select all
~ systemctl status mysql -l
● mysql.service - LSB: Start and stop the mysql (Percona Server) daemon
Loaded: loaded (/etc/init.d/mysql)
Active: failed (Result: timeout) since mer. 2015-12-30 13:31:59 CET; 1min 16s ago
Process: 1402 ExecStart=/etc/init.d/mysql start (code=killed, signal=TERM)
déc. 30 13:26:59 danya.domain.net systemd[1]: Starting LSB: Start and stop the mysql (Percona Server) daemon...
déc. 30 13:31:59 danya.domain.net systemd[1]: mysql.service start operation timed out. Terminating.
déc. 30 13:31:59 danya.domain.net systemd[1]: Failed to start LSB: Start and stop the mysql (Percona Server) daemon.
déc. 30 13:31:59 danya.domain.net systemd[1]: Unit mysql.service entered failed state.
déc. 30 13:32:00 danya.domain.net mysql[1402]: Starting MySQL (Percona Server) database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Re: How to launch mysql at startup ?
Try the below command -
Code: Select all
sudo update-rc.d mysql defaults
Re: How to launch mysql at startup ?
I tried, but after reboot mysql is not running correctly (but something changed) :
For information, a "systemctl start mysql" doesn't works.
I had to make a "systemctl restart mysql" to launch correctly mysql after reboot.
The process looks sleeping...~ systemctl status mysql -l
● mysql.service - LSB: Start and stop the mysql (Percona Server) daemon
Loaded: loaded (/etc/init.d/mysql)
Active: activating (start) since sam. 2016-01-02 21:55:06 CET; 2m57s ago
Control: 1407 (mysql)
CGroup: /system.slice/mysql.service
├─1407 /bin/bash /etc/init.d/mysql start
└─2836 sleep 1
janv. 02 21:55:06 subdomain.domain.net systemd[1]: Starting LSB: Start and stop the mysql (Percona Server) daemon...
For information, a "systemctl start mysql" doesn't works.
I had to make a "systemctl restart mysql" to launch correctly mysql after reboot.
Re: How to launch mysql at startup ?
No idea ?
Re: How to launch mysql at startup ?
After installing the MySQL server package, you can check to see whether mysqld is enabled or not, this way:
Code: Select all
$ systemctl is-enabled mysqld
Re: How to launch mysql at startup ?
or~ systemctl is-enabled mysqld
Failed to get unit file state for mysqld.service: No such file or directory
But is was started manually :~ systemctl is-enabled mysql.service
Failed to get unit file state for mysql.service: No such file or directory
~ systemctl status mysql.service
● mysql.service - LSB: Start and stop the mysql (Percona Server) daemon
Loaded: loaded (/etc/init.d/mysql)
Active: active (running) since sam. 2016-01-02 22:05:04 CET; 5 days ago
CGroup: /system.slice/mysql.service
├─6942 /bin/sh /usr/bin/mysqld_safe
└─7372 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
janv. 02 22:05:04 danya.server.net mysql[6906]: Starting MySQL (Percona Server) database server: mysqld.
janv. 02 22:05:04 danya.server.net mysql[6906]: Checking for corrupt, not cleanly closed and upgrade needing tables..
janv. 02 22:05:04 danya.server.net systemd[1]: Started LSB: Start and stop the mysql (Percona Server) daemon.
janv. 02 22:05:04 danya.server.net /etc/mysql/debian-start[7434]: Upgrading MySQL tables if necessary.
janv. 02 22:05:04 danya.server.net /etc/mysql/debian-start[7437]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
janv. 02 22:05:04 danya.server.net /etc/mysql/debian-start[7437]: Looking for 'mysql' as: /usr/bin/mysql
janv. 02 22:05:04 danya.server.net /etc/mysql/debian-start[7437]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
janv. 02 22:05:04 danya.server.net /etc/mysql/debian-start[7437]: This installation of MySQL is already upgraded to 5.5.46-37.6, use --force if you still need to run mysql_upgrade
janv. 02 22:05:04 danya.server.net /etc/mysql/debian-start[7456]: Checking for insecure root accounts.
janv. 02 22:05:04 danya.server.net /etc/mysql/debian-start[7462]: Triggering myisam-recover for all MyISAM tables
Re: How to launch mysql at startup ?
Strange behavior, I heard about Percona startup troubles, but this is terrible situation.Spheerys wrote: But is was started manually
Seriosly, don't really know, what we can do for you. ;(
Re: How to launch mysql at startup ?
Thanks for the answer.
I will check forward for this problem :)
I will check forward for this problem :)