LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-02-2009, 12:52 PM   #1
Foress_89
LQ Newbie
 
Registered: Sep 2005
Posts: 12

Rep: Reputation: 0
mysql daemon won't start on boot


The last message I get when I boot my computer is this
Code:
Hangover login: STOPPING server from pid file /var/run/mysql/mysql.pid 090102 13:25:54 mysqld ended
I actually have to press any key on keyboard to get to the login message. I just installed the full 12.2 dvd and selected mysqld to start on boot. I'd like to fix it, but just so I know how would I just stop it from trying to start?
 
Old 01-02-2009, 12:57 PM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by Foress_89 View Post
just so I know how would I just stop it from trying to start?
Remove execute permission form /etc/rc.d/rc.mysqld.
 
Old 01-02-2009, 01:00 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
chmod -x /etc/rc.d/rc.mysqld

typed as root will prevent mysql to start at boot.
 
Old 01-02-2009, 01:11 PM   #4
Foress_89
LQ Newbie
 
Registered: Sep 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Didier Spaier View Post
chmod -x /etc/rc.d/rc.mysqld

typed as root will prevent mysql to start at boot.
Ok ok i understand that +x gives permission -x removes... but now is it trying to start it and telling it it can't? Anyway it removes the error, but what if I want to use mysql?
 
Old 01-02-2009, 01:21 PM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by Foress_89 View Post
but what if I want to use mysql?
Simply restore the execute permission. This is actually the main mechanism used by Slackware to control init processes, BSD style.

If you decide to use mysql you will also need to initialize the database and create a user for it so you will not get the startup failures as in your first post. See the distribution docs, very easy, or just post back here and we will point you to it.
 
Old 01-02-2009, 01:21 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
As root:
sh /etc/rc.d/rc.mysqld start

The file don't need to be executable for that.

When you are done, don't forget to type:
sh /etc/rc.d/rc.mysqld stop

as the MySQL daemon won't be automatically stopped when you shutdown or reboot your system, if the file is not executable.

Last edited by Didier Spaier; 01-02-2009 at 01:41 PM. Reason: Post was not enough accurate
 
Old 01-02-2009, 01:39 PM   #7
apolinsky
Member
 
Registered: Oct 2004
Location: Brooklyn
Distribution: Slackware 15;
Posts: 440

Rep: Reputation: 46
I'm afraid the above answers are a bit wrong. By default Slackware does not create the initial tables needed to start mysql. If you read the contents of the rc.mysqld script, they will tell you what has to be done to create the initial tables.
 
Old 01-02-2009, 02:41 PM   #8
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by apolinsky View Post
I'm afraid the above answers are a bit wrong. By default Slackware does not create the initial tables needed to start mysql. If you read the contents of the rc.mysqld script, they will tell you what has to be done to create the initial tables.
Well, no... I think if you follow the thread the questions asked were answered, and we pointed out...

Quote:
If you decide to use mysql you will also need to initialize the database and create a user for it so you will not get the startup failures as in your first post. See the distribution docs, very easy, or just post back here and we will point you to it.
... so what is wrong?
 
Old 01-02-2009, 08:54 PM   #9
Foress_89
LQ Newbie
 
Registered: Sep 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Ok so it's just that mysql isn't properly configured to run right now, that all I needed to know, I'll try to find out what I have to do... But I didn't know mysql needed some tables to run, in what database? Anyway I'll search but if you have an awnser don't hesitate.

Thanks.
 
Old 01-02-2009, 09:33 PM   #10
Foress_89
LQ Newbie
 
Registered: Sep 2005
Posts: 12

Original Poster
Rep: Reputation: 0
got it. Thanks guys.
 
Old 01-02-2009, 09:45 PM   #11
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by Foress_89 View Post
Ok so it's just that mysql isn't properly configured to run right now...
Yes, Slackware has everything installed, but you still need to initialize it. That is very easy. The main documentation to get you going is in /etc/rc.d/rc.mysqld itself...

Code:
# Before you can run MySQL, you must have a database.  To install an initial
# database, do this as root:
#
#   mysql_install_db --user=mysql
#
# Note that the mysql user must exist in /etc/passwd, and the created files
# will be owned by this dedicated user.  This is important, or else mysql
# (which runs as user "mysql") will not be able to write to the database
# later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').
The mysql user should exist, but if not you can create it with...

useradd -s /bin/false -c 'system user for mysql 5' mysql

If you want to know more see /usr/doc/mysql-5.0.51b/Docs/INSTALL-BINARY (this from SW 12.1, adjust for 12.1). That is from the mysql distribution itself, but it will tell you what is actually happening with the mysql_install_db script.

After you have run mysql_install_db you can start and stop mysql server with...

/etc/rc.d/rc.mysqld start
/etc/rc.d/rc.mysqld stop

...and set it to be executable to automatically start at boot.

Good luck!

[EDIT]You beat me to it! Glad you got it working![/EDIT]

Last edited by astrogeek; 01-03-2009 at 12:54 PM. Reason: typo correction
 
Old 01-03-2009, 09:14 AM   #12
Foress_89
LQ Newbie
 
Registered: Sep 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Yeah I actually ran just mysql_install_db then it wasn't working I had to chown in to the mysql user to make it work.. but now it does. Thanks for your help and your links are very useful.
 
Old 01-03-2009, 12:53 PM   #13
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Excellent!

Glad you got it going and thanks for letting us know - enjoy!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting MySQL OLD Error : imeout error occurred trying to start MySQL Daemon Fr33B5D Linux - Software 9 10-28-2006 06:23 AM
mysql daemon fail to start on slackware 10.2 sharathg786 Linux - Server 6 10-05-2006 02:53 PM
MySQL - Timeout error occurred trying to start MySQL Daemon. stuartornum Linux - Software 3 02-26-2006 12:54 PM
can't start mysql daemon IceGrill Linux - Software 3 07-29-2003 07:16 PM
Getting a daemon to start at boot cmfarley19 Linux - General 5 12-14-2002 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration