| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-04-2006, 01:19 PM
|
#1
|
|
Member
Registered: Sep 2005
Location: India
Distribution: Slackware, Back|track, Fedora, ubuntu
Posts: 167
Rep:
|
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.
|
|
|
|
10-04-2006, 03:53 PM
|
#2
|
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 2,446
|
Did you, as root, run
mysql_install_db --user=mysql
|
|
|
|
10-04-2006, 08:20 PM
|
#3
|
|
Guru
Registered: Jan 2001
Posts: 24,128
Rep: 
|
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
|
|
|
|
10-05-2006, 04:00 AM
|
#4
|
|
Member
Registered: Sep 2005
Location: India
Distribution: Slackware, Back|track, Fedora, ubuntu
Posts: 167
Original Poster
Rep:
|
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?
|
|
|
|
10-05-2006, 07:19 AM
|
#5
|
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 2,446
|
|
|
|
|
10-05-2006, 01:59 PM
|
#6
|
|
Member
Registered: Sep 2005
Location: India
Distribution: Slackware, Back|track, Fedora, ubuntu
Posts: 167
Original Poster
Rep:
|
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'
|
|
|
|
10-05-2006, 02:53 PM
|
#7
|
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 2,446
|
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).
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:16 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|