Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, this seems to be a common problem without a common answer: how do I get mysql to run automatically on startup on Debian? I think I have to start mysqld, so I have tried adding a link to this in etc/rc2.d/ called S20myql. However, that is apparently not working.
They only way I can start MySQL is to log in with SSH and run mysqld (which freezes the computer), close SSH, and login again, then it is running. Thanks very much.
Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
most systems boot to 3 or 5 although i am not that familiar with debian....
If you arent then you need to put your init-script in /etc/rc3.d/ or /etc/rc5.d/
As for ssh locking up, mysql probably is running in daemon mode so you would need to tell it to fork into the background to get your command line back on a manual start. I can't remember exactly but I "think" this is achieved with a && at the end of the line...somebody please correct me if im wrong...
Originally posted by baandar Hi, this seems to be a common problem without a common answer: how do I get mysql to run automatically on startup on Debian? I think I have to start mysqld, so I have tried adding a link to this in etc/rc2.d/ called S20myql. However, that is apparently not working.
They only way I can start MySQL is to log in with SSH and run mysqld (which freezes the computer), close SSH, and login again, then it is running. Thanks very much.
If it is a common problem I have never seen it here. How did you install MYSQL anyways? You should not have to be setting up any links that is already taken care of in the installation and configuration of the packages.
It looks like you are trying creating the correct link you may want to use either update-rc.d mysql defaults or ln -sf /etc/init.d/mysql /etc/rc2.d/S20mysql.
Hi again,
Thanks to you both for you help, level 2 is my default run level. Installing with apt-get I had the option for auto load on boot, but wanting to learn more about linux and being slightly foolish I disabled this option. Will try suggested commands an post again tomorrow.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.