Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 9th November 2006, 10:00
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default mysqld.sock missing

Hi folks,

ubuntu-6.06.1-LAMP-server-amd64

After running;
$ sudo apt-get -install mysql-server mysql-client.

mySQL did not start, complaining "mysqld.sock" missing.

On googling I found following postings;
http://ubuntuforums.org/showthread.php?t=111292
http://ubuntuforums.org/showthread.php?t=140036

$ cat /etc/mysql/my.cnf | grep .sock
Code:
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
socket          = /var/run/mysqld/mysqld.sock
socket          = /var/run/mysqld/mysqld.sock
socket          = /var/run/mysqld/mysqld.sock
It was there.

$ sudo mysqld
Code:
Password:
061109 15:41:52  InnoDB: Started; log sequence number 0 43655
061109 15:41:52 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
061109 15:41:52 [ERROR] Do you already have another mysqld server running on port: 3306 ?
061109 15:41:52 [ERROR] Aborting

061109 15:41:52  InnoDB: Starting shutdown...
061109 15:41:54  InnoDB: Shutdown completed; log sequence number 0 43655
061109 15:41:54 [Note] mysqld: Shutdown complete
$ sudo netstat -tap | grep mysql
Password:
No printout.

I can't figure out a solution. Please help. TIA


B.R.
satimis
Reply With Quote
Sponsored Links
  #2  
Old 10th November 2006, 16:02
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by satimis
$ cat /etc/mysql/my.cnf | grep .sock
Code:
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
socket          = /var/run/mysqld/mysqld.sock
socket          = /var/run/mysqld/mysqld.sock
socket          = /var/run/mysqld/mysqld.sock
Why do you have the same line three times in your configuration? Remove two of them and try again.

What's in /etc/mysql/debian.cnf?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 10th November 2006, 16:34
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Hi falko,

It was quite strange that my problem gone after reboot the PC. I did not touch anything. Now mySQL is running.

$ sudo netstat -tap | grep mysql
Code:
tcp        0      0 localhost:mysql         *:*                     LISTEN     4
086/mysqld
Quote:
Why do you have the same line three times in your configuration? Remove two of them and try again.
$ cat /etc/mysql/my.cnf
Code:
....
[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock
....
[mysqld_safe]
socket          = /var/run/mysqld/mysqld.sock
nice            = 0
....
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
skip-external-locking
....
Quote:
What's in /etc/mysql/debian.cnf?
It is an empty file.


Now I'm facing another problem on continue my test.

$ sudo mysqladmin -u root password rootsql
Code:
Password:
It went through without complaint

$ sudo mysqladmin -u root -h localhost password rootsql
Code:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
satimis@ubuntu:~$ sudo mysqladmin -u root -h localhost password rootsql
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
It complained, even using another password. Whether localhost is not allowed using password? Tks

Furthermore to login as user

$ mysql
Code:
ERROR 1045 (28000): Access denied for user 'satimis'@'localhost' (using password: NO)
$ sudo mysql
Password: rootsql
Sorry, try again
Password: satimis' password
Code:
ERROR 1045 (28000): Access denies for user 'root@localhost' (using password:NO)
Failed to login

Could you please shed me some light. TIA

B.R.
satimis
Reply With Quote
  #4  
Old 11th November 2006, 17:01
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by satimis
$ cat /etc/mysql/my.cnf
Code:
....
[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock
....
[mysqld_safe]
socket          = /var/run/mysqld/mysqld.sock
nice            = 0
....
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
skip-external-locking
....
Ok, you have
Code:
socket          = /var/run/mysqld/mysqld.sock
in three different sections, this is ok.


Quote:
Originally Posted by satimis
$ sudo mysqladmin -u root password rootsql
Code:
Password:
It went through without complaint

$ sudo mysqladmin -u root -h localhost password rootsql
Code:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
satimis@ubuntu:~$ sudo mysqladmin -u root -h localhost password rootsql
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
When you run
Code:
sudo mysqladmin -u root password rootsql
you have already set a password for the user root on localhost, so there's no need to run
Code:
sudo mysqladmin -u root -h localhost password rootsql
You're getting "Access denied" because you have set a password before, and to change it you must provide your current password. Have a look at
Code:
man mysqladmin
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 11th November 2006, 23:50
sjau sjau is online now
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,126
Thanks: 4
Thanked 43 Times in 40 Posts
Default

do you have in your my.cnf config old_passwords = 1?

I kinda had the same problems. I added the dotdeb debs for running php5 and php4 and there was a newer mysql server package... but that one had problems with old_passwords and "log_expire". It did not see those two as options... when I commented them then I had problems with the pwd...

So if you added the dotdeb debs then I recommend:

(1) Remove all of MySQL
(2) Remove the dotdeb debs
(3) run: apt-get update
(4) install all of mysql again...

I need the old password thingy for my confixx setup...
Reply With Quote
  #6  
Old 12th November 2006, 12:15
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Hi sjau,

Quote:
do you have in your my.cnf config old_passwords = 1?
Yes.

$ cat /etc/mysql/my.cnf | grep old_passwords
Code:
old_passwords   = 1
Quote:
So if you added the dotdeb debs then I recommend:
Sorry I don't follow. IIRC I did not add "dotdeb debs" deliberately. What is "dotdeb debs"? Tks.


It came to my notice that "I can't restart/force-reload mysql". I must reboot PC to get mysql started automatically.

$ sudo /etc/init.d/mysql restart
Code:
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
.
.
...failed or took more than 6s.
        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!

$ sudo /etc/init.d/mysql force-reload
Code:
Reloading MySQL database server: mysqld/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!
$ ls /var/run//mysqld/ | grep mysqld.sock
No printout.

$ cat /etc/mysql/my.cnf | grep sock
Code:
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
socket          = /var/run/mysqld/mysqld.sock
socket          = /var/run/mysqld/mysqld.sock
socket          = /var/run/mysqld/mysqld.sock
They were there.

Tks.


B.R.
satimis
Reply With Quote
  #7  
Old 12th November 2006, 12:17
sjau sjau is online now
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,126
Thanks: 4
Thanked 43 Times in 40 Posts
Default

what is in your /etc/apt/sources.list file?
Reply With Quote
  #8  
Old 12th November 2006, 12:22
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Hi falko,

Quote:
Ok, you have
Code:
socket          = /var/run/mysqld/mysqld.sock
in three different sections, this is ok.
Please refer to my reply to "sjau" on post #6. Tks.

I'll come back to the rest of your suggestion after solving the above problem, missing "mysqld.sock".

B.R.
satimis
Reply With Quote
  #9  
Old 12th November 2006, 12:26
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by sjau
what is in your /etc/apt/sources.list file?
$ cat /etc/apt/sources.list
Code:
# deb cdrom:[Ubuntu-Server 6.06.1 _Dapper Drake_ - Release amd64 (20060807.1)]/ dapper main restricted
deb cdrom:[Ubuntu-Server 6.06.1 _Dapper Drake_ - Release amd64 (20060807.1)]/ dapper main restricted

deb http://us.archive.ubuntu.com/ubuntu/ dapper main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ dapper-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
- snip -

deb http://us.archive.ubuntu.com/ubuntu/ dapper universe
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper universe

- snip -
## or updates from the Ubuntu security team.
# deb http://us.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu dapper-security main restricted
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted
# deb http://security.ubuntu.com/ubuntu dapper-security universe
# deb-src http://security.ubuntu.com/ubuntu dapper-security universe

# deb http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
Tks.

B.R.
satimis
Reply With Quote
  #10  
Old 12th November 2006, 14:10
sjau sjau is online now
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,126
Thanks: 4
Thanked 43 Times in 40 Posts
 
Default

Oh, you use ubuntu... well forget what I said above
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
missing .htpasswd tonysch Installation/Configuration 5 16th January 2009 12:25
required modules missing etag1949 Installation/Configuration 2 2nd June 2006 14:13
Help....package missing sbovisjb1 Installation/Configuration 3 31st March 2006 11:14
Help Needed Please!!! DanMB Installation/Configuration 15 18th March 2006 23:16
Files missing? crypticedge General 1 4th January 2006 09:44


All times are GMT +2. The time now is 19:37.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.