LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-10-2005, 01:28 PM   #16
shultzc
LQ Newbie
 
Registered: Feb 2004
Location: Portland, Oregon
Distribution: Debian, FreeBSD, Solaris, Mac OS X
Posts: 22

Rep: Reputation: 15

Do _not_ recompile from source. On Debian you always want to use the APT package if one is available... APT resolves dependencies and allows for clean upgrades. You don't want to have to deal with incompatibilities down the line.

Creating mysqld.sock would not help; it is a socket, not an ordinary file - you have to create it with mknod I believe, but you don't want to go there anyway. It is created by mysqld, it is not why mysqld won't start.

Let's take a hint from the error message. Do a "/etc/init.d/mysql start" as root, then immediately do a "tail /var/log/syslog" (as root) and post the output. This should shed some light on the matter.

-Conrad Shultz
 
Old 06-10-2005, 02:10 PM   #17
redir
Member
 
Registered: May 2004
Location: Virginia USA
Distribution: Debian_Ubuntu_FreeBSD
Posts: 122

Rep: Reputation: 16
/var/lib/mysql should be:

drwxr-xr-x 5 mysql mysql 4096 Jun 8 16:05 mysql

also the msqld.sock file in /var/run/ is created by mysql and that could be a problem who owns that directory? it should be:

drwxr-xr-x 2 mysql root 4096 Jun 8 16:05 mysqld

If mysql does not own the directory then it will not be able to create the sock file. I'm guessing here and I really don't know why apt would have it set up anyother way unless you have been messing around with users and groups.
 
Old 06-11-2005, 12:41 AM   #18
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
thx

First and foremost i would like to thank u all for your interest .....

Now lets move on to the answers
taksideytis:~# ls -l /var/lib/mysql
total 20556
-rw-rw---- 1 mysql mysql 25088 2005-06-09 18:16 ib_arch_log_0000000000
-rw-rw---- 1 mysql mysql 10485760 2005-06-10 09:39 ibdata1
-rw-rw---- 1 mysql mysql 5242880 2005-06-10 09:39 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 2005-06-09 18:16 ib_logfile1
drwxr-xr-x 2 mysql mysql 4096 2005-06-09 18:16 mysql
drwxr-xr-x 2 mysql mysql 4096 2005-06-09 18:16 test
taksideytis:~# ls -ld /var/lib/mysql
drwxrwxrwx 4 mysql mysql 4096 2005-06-10 09:39 /var/lib/mysql



taksideytis:~# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld...failed.
Please take a look at the syslog.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!



taksideytis:~# tail /var/log/syslog
Jun 11 09:31:08 taksideytis mysqld[8207]: 050611 9:31:08 InnoDB: Starting shutdown...
Jun 11 09:31:10 taksideytis mysqld[8207]: 050611 9:31:10 InnoDB: Shutdown completed
Jun 11 09:31:10 taksideytis mysqld[8207]: 050611 9:31:10 /usr/sbin/mysqld: Shutdown Complete
Jun 11 09:31:10 taksideytis mysqld[8207]:
Jun 11 09:31:10 taksideytis mysqld_safe[8225]: ended
Jun 11 09:31:16 taksideytis /etc/init.d/mysql[8280]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jun 11 09:31:16 taksideytis /etc/init.d/mysql[8280]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Jun 11 09:31:16 taksideytis /etc/init.d/mysql[8280]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jun 11 09:31:16 taksideytis /etc/init.d/mysql[8280]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jun 11 09:31:16 taksideytis /etc/init.d/mysql[8280]:



Now...what should i do next?
 
Old 06-11-2005, 10:50 AM   #19
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
Angry ??

help! I have to beat the time....
 
Old 06-11-2005, 11:40 PM   #20
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
okey... i have found sth really important in the /usr/share/doc/mysql

* MYSQL WON'T START OR STOP?:
=============================
You may never ever delete the special mysql user "debian-sys-maint". This user
together with the credentials in /etc/mysql/debian.cnf are used by the
init scripts to stop the server as they would require knowledge of the
mysql root users password else.
So in most of the times you can fix the situation by making sure that
the debian.cnf file contains the right password, e.g. by setting a new
one (remember to do a "flush privileges" then).


This specifice debian user does not exist in my system ( i dont know why) how i must add it to the /etc/passwd?
Help me with this thing... and afterwards everything will go fine
Thx a lot
yioupiii
 
Old 06-13-2005, 07:54 AM   #21
redir
Member
 
Registered: May 2004
Location: Virginia USA
Distribution: Debian_Ubuntu_FreeBSD
Posts: 122

Rep: Reputation: 16
Try running through the steps here:

http://dev.mysql.com/doc/mysql/en/ca...to-server.html

Just remember to add -u root -p to the commands so for example:

mysqladmin -u root -p version
then enter your password for root.

I'm kind of running out of ideas but don't give up I'm sure it's something simple.

EDIT: btw I don't have that user in my etc/passwd file either so I think your barking up the wrong tree there.

Last edited by redir; 06-13-2005 at 07:55 AM.
 
Old 06-13-2005, 08:16 AM   #22
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Rep: Reputation: 30
Don't know whether this will help: http://dev.mysql.com/doc/mysql/en/crashing.html

p.s. for somereason, ps xa | grep mysqld shows 3994 pts/1 R+ 0:00 grep mysqld on my computer, even though I don't have mysql installed yet (I do have postgresql though) :$
 
Old 06-15-2005, 07:16 AM   #23
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Rep: Reputation: 30
I don't know whether you have fixed this yet or not, but I had the same error message as you when I installed mysql last night. After looking through apt-cache search mysql I noticed this package: mysql-server-4.1 which I hadn't installed yet, even though I installed all of the other things like mysql-admin and mysql-common etc. Maybe you also need to install this package to get mysql to work?

apt-get install mysql-server-4.1

also try apt-get install mysql-server
 
Old 06-15-2005, 04:46 PM   #24
shultzc
LQ Newbie
 
Registered: Feb 2004
Location: Portland, Oregon
Distribution: Debian, FreeBSD, Solaris, Mac OS X
Posts: 22

Rep: Reputation: 15
Sorry for the delayed reply... I've had a lot of work.

You do not need to (and certainly should not) install both mysql-server and mysql-server-4.1 (they are different versions; I use the former).

At this point I would say it's time to do a fresh MySQL install, especially since it sounds like a number of files have been modified after installation. I presume that you do not have any databases that need to be saved (since you can't even connect to your server). So, try the following:

1) Become root.
2) To remove all MySQL packates run:
dpkg -l | fgrep mysql | apt-get remove `awk '{print $2}'`
You may have to manually remove packages with truncated names before this batch removal will work.
3) To purge configuration files for all previously removed packages, run:
dpkg -l | egrep ^rc | dpkg -P `awk '{print $2}'`
The same qualification as in (2) applies here. Note that "fgrep" and "egrep" are different.
4) Install the minimal set of packages:
apt-get install mysql-client mysql-server mysql-common
This will also install any unmet dependencies.

Report on the results after you do this; let's see if your problems persist.
 
Old 06-15-2005, 04:51 PM   #25
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Rep: Reputation: 30
I never implied installing both, I meant to write if the 4.1 verion doesn't work try the former. Guess I worded it badly hehe, sorry.
 
Old 06-15-2005, 04:56 PM   #26
shultzc
LQ Newbie
 
Registered: Feb 2004
Location: Portland, Oregon
Distribution: Debian, FreeBSD, Solaris, Mac OS X
Posts: 22

Rep: Reputation: 15
Okay, that makes sense. But as I said I run Debian Sarge with the 4.0 branch of the mysql packages, and have not encountered the problems described. So I am a bit puzzled as to why things are breaking... I really would like to hear what happens when a reinstall is attempted, if for no other reason than to prove that the problem does not lie with post-install modifications (hence the configuration purge step).
 
Old 06-16-2005, 07:48 AM   #27
dereko
Member
 
Registered: May 2004
Location: Ireland
Distribution: Debian
Posts: 56

Rep: Reputation: 15
Quote:
Originally posted by shultzc
Okay, that makes sense. But as I said I run Debian Sarge with the 4.0 branch of the mysql packages, and have not encountered the problems described. So I am a bit puzzled as to why things are breaking... I really would like to hear what happens when a reinstall is attempted, if for no other reason than to prove that the problem does not lie with post-install modifications (hence the configuration purge step).
I'm having the exact same problem.


I removed the msyql packages and purged them as you suggest and then apt-get installed mysql afterwards and the exact same thing happend right as it finished installing.

Code:
# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld...failed.
        Please take a look at the syslog.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
I pretty baffled why this is happening?

I'm starting to think its a permissions error somewhere but :
Code:
# ls -al /var/run/mysqld
total 8
drwxr-xr-x  2 mysql root 4096 2005-06-16 14:46 .
drwxr-xr-x  9 root  root 4096 2005-06-16 14:39 ..
Any ideas?
 
Old 06-16-2005, 07:58 AM   #28
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Rep: Reputation: 30
mySQL is running **fine** for me (I say **fine** because I haven't really used it much yet). This is the out put i get from dpkg -l | fgrep mysql

ii libdbd-mysql-p 2.9006-1 A Perl5 database interface to the MySQL data
ii libmysqlclient 4.0.24-10 mysql database client library
ii libmysqlclient 4.1.11a-4 mysql database client library
ii mysql-client-4 4.1.11a-4 mysql database client binaries
ii mysql-common-4 4.1.11a-4 mysql database common files (e.g. /etc/mysql
ii mysql-server-4 4.1.11a-4 mysql database server binaries
ii php4-mysql 4.3.10-15 MySQL module for php4

I believe the ones you need are mysql-client mysql-common and mysql-server (and php4-mysql if you need php support for mysql). Make sure these are installed, because I got the message about the lock file because I had not installed mysql-server.

Also, the debian-sys-maint is a user in the mysql table mysql.user DON'T run mysql_install_db script, otherwise this account will be wiped! (I did this because I screwed up my root password and was locked out).

Also shultzc, do you know why I have libmysqlclient 4.0.24-10 listed twice?
 
Old 06-16-2005, 08:46 AM   #29
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
Did you comment the line beginning by skip-networking in my.cnf file in /etc or /etc/mysql ?
 
Old 06-16-2005, 08:50 AM   #30
dereko
Member
 
Registered: May 2004
Location: Ireland
Distribution: Debian
Posts: 56

Rep: Reputation: 15
no but how is that relevant?
 
  


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
Debian Review - Debian was made for KDE vxc69 Debian 23 05-28-2007 07:56 AM
phpserver+mysqlserver+postgresql+cms+webhosting sharp81 Linux - Networking 2 11-28-2005 04:58 AM
phpserver and mysqlserver sharp81 SUSE / openSUSE 4 11-21-2005 04:18 AM
What's the difference between debian and other debian-based distro like knoppix? Akhran Debian 11 08-28-2005 06:07 PM
Progeny Debian Upgrade to Debian Unstable? mrmdls Debian 1 09-25-2003 07:57 AM

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

All times are GMT -5. The time now is 07:26 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