LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   mysqld error : 'mysql ended' (https://www.linuxquestions.org/questions/slackware-14/mysqld-error-%27mysql-ended%27-342648/)

anindyanuri 07-12-2005 08:42 PM

mysqld error : 'mysql ended'
 
I am getting this error at the time of booting of my machine and even if I want to run my mysql server by command prompt,

Error : Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysql/mysql.pid
mysql ended

Why this error?

Regards
Anindyanuri

gbonvehi 07-12-2005 09:11 PM

Did you created the databases as stated in /etc/rc.d/rc.mysqld ?

cyberhawk 07-13-2005 03:05 AM

first of all ii'm guesing you installed slackware and enabled mysql server.

what needs to be done after that is to run $>mysql_install_db from the prompt
this will create the required user databases and put them in the right places.

after that you need to edit the /etc/rc.d/rc.mysqld file and look for the command that runs mysqld and add --user=root to it.

it won't allow the mysql server to start unless a valid user is starting it. root always works and if you create other administrators they can also start up the server.

hope this helps

gbonvehi 07-13-2005 03:33 AM

cyberhawk, it's not good to run mysql daemon with root privileges. That's why there's a user called mysql and the daemon defaults to run with it.
If you read the instructions on /etc/rc.d/rc.mysqld it will instruct you on how to create the databases with the correct privlege (owned by mysql user).

anindyanuri 07-13-2005 09:11 AM

Quote:

Originally posted by gbonvehi
Did you created the databases as stated in /etc/rc.d/rc.mysqld ?
Nope, I could not.
I am not able to enter into the environment.
/etc/rc.d/rc.mysqld also gives the same error, so I am not able to enter into mysql to make any database.
Just reinstalled Slackware but strange...........a complete reinstall also giving the same problem.

Seeking your help.

Regards
Anindyanuri

anindyanuri 07-13-2005 09:15 AM

Quote:

Originally posted by cyberhawk
first of all ii'm guesing you installed slackware and enabled mysql server.

what needs to be done after that is to run $>mysql_install_db from the prompt
this will create the required user databases and put them in the right places.

after that you need to edit the /etc/rc.d/rc.mysqld file and look for the command that runs mysqld and add --user=root to it.

it won't allow the mysql server to start unless a valid user is starting it. root always works and if you create other administrators they can also start up the server.

hope this helps

The problem is that I am not able to enable mysql server.

/etc/rc.d/rc.mysqld is producing an error which is same as my thread and quitting.

How to proceed?

Regards
Anindyanuri

piete 07-13-2005 10:05 AM

You misunderstand.

Go back and read the MySQL manual (for your convience, it is located here: http://dev.mysql.com/doc/mysql/en/index.html ) or, as gbonvehi suggested, read the contents of /etc/rc.d/rc.mysqld (~$ less /etc/rc.d/rc.mysqld).

To paraphrase:

You must run a script *BEFORE* starting MySQL for the first time to instantiate some fixed databases (the mysql database itself, for example).

Once that script has been run (and run correctly), then AND ONLY THEN, will you be able to type: ~$ /etc/rc.d/rc.mysqld start

Please read the documentation provided with MySQL, all the information is in there.

- Piete.

anindyanuri 07-13-2005 12:22 PM

Thank you for this wonderful clear picture. I am right now following your thread.

Tell you the result later.

Thank you once again my friend.

Regards
Anindyanuri

tweter 11-25-2005 11:14 PM

Big Thanks to the replys in here gave me direction on where to start looking to get mysql working

made the mistake of running mysql_install_db as root and needed to 'chown -R mysql.mysql /var/lib/mysql' that seemed to be the only thing stopping me

good thing it told me that in the comments of /etc/rc.d/rc.mysql

Tweter


All times are GMT -5. The time now is 10:30 PM.