LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-04-2006, 01:19 PM   #1
sharathg786
Member
 
Registered: Sep 2005
Location: India
Distribution: Slackware, Back|track, Fedora, ubuntu
Posts: 167

Rep: Reputation: 30
Angry mysql daemon fail to start on slackware 10.2


hi, i'm trying to run mysql on slackware 10.2, but whenever i want to start mysqld, i get the following error:

Code:
 Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysql/mysql.pid
061004 23:38:28  mysqld ended
i start it as root using this command:
# /etc/rc.d/rc.mysqld start

i found a similar thread which said to make sure there is an entry in the /etc/passwd file with 'mysql' as a user which is already there in my system, but still it i get the same error.
 
Old 10-04-2006, 03:53 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,037

Rep: Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756
Did you, as root, run
mysql_install_db --user=mysql
 
Old 10-04-2006, 08:20 PM   #3
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
And if you did run mysql_install_db without the user=mysql option, you need to chown the ownership of the /var/lib/mysql to the mysql user.

chown -R mysql.mysql /var/lib/mysql
 
Old 10-05-2006, 04:00 AM   #4
sharathg786
Member
 
Registered: Sep 2005
Location: India
Distribution: Slackware, Back|track, Fedora, ubuntu
Posts: 167

Original Poster
Rep: Reputation: 30
thanx for your replies, but now there's another problem

the daemon is starting
# /usr/bin/mysqld_safe &

but when i run mysql as root i get the following error:

Code:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
i tried to set for mysql root user by giving this command:
# /usr/bin/mysqladmin -u root password 'new-password'

now when i gave the new passwd using this command, it shows:
Enter password:
should i enter root passwd of the system or the one i just gave?(i may sound stupid but i've never used mysql before), anyway i tried both but it showed:
Code:
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
however i can run mysql under a normal user, but when i tried to create a database, it showed this:

Code:
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'sharath1'
i think the problem is there is no permission for any user to run mysql server in my system, how do i change it?
 
Old 10-05-2006, 07:19 AM   #5
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,037

Rep: Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756
You need to take a look at the MySQL manual: http://dev.mysql.com/doc/refman/4.1/en/index.html, specifically http://dev.mysql.com/doc/refman/4.1/...rivileges.html and http://dev.mysql.com/doc/refman/4.1/...ing-users.html
 
Old 10-05-2006, 01:59 PM   #6
sharathg786
Member
 
Registered: Sep 2005
Location: India
Distribution: Slackware, Back|track, Fedora, ubuntu
Posts: 167

Original Poster
Rep: Reputation: 30
i read those manuals you mentioned, according to that after i start mysqld_safe the next step is to set the root password, i used this command :

Code:
mysqladmin -u root password "newpwd"
but it showed me this:

Code:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
as a normal user i can run mysql, but when creating a database it shows:

Code:
 ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'sharath'
 
Old 10-05-2006, 02:53 PM   #7
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,037

Rep: Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756
You know, it might just be easier to start over (you won't hurt anything doing this).

Log in as root, cd /var/lib, rm -r mysql (that blows away your existing data base), mkdir mysql (although this isn't strictly necessary...).

Then run mysql_install_db --user=mysql (that recreates all the structure).

Then follow the instructions in the manual pages to the letter and you'll probably be good to go.

By the way, rather than mysqladmin get into the mysql data base with
mysql mysql
it's a little easier sometimes; also, pay close attention to spaces in commands you use (in fact, you can copy-paste many of the examples in the manual page, obviously changing the passwords to the ones you want to use).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 - Timeout error occurred trying to start MySQL Daemon. stuartornum Linux - Software 3 02-26-2006 12:54 PM
"mysqld ended" when trying to start mysql daemon guarriman Linux - General 1 01-19-2005 07:35 AM
MySQL in Slackware 10 , how to start ? ? ? caovankhanhvn Programming 2 08-13-2004 11:51 AM
can't start mysql daemon IceGrill Linux - Software 3 07-29-2003 07:16 PM


All times are GMT -5. The time now is 11:16 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration