LinuxQuestions.org
Help answer threads with 0 replies.
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-09-2005, 09:26 AM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Rep: Reputation: 45
mysqlserver + debian


Hi have install mysql-server 4.1 using apt-get install mysql-server4.1
The problem is that the /etc/init.d/mysql start returns the following message.
Any ideas?
'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' + debian
 
Old 06-09-2005, 10:12 AM   #2
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,161
Blog Entries: 4

Rep: Reputation: 137Reputation: 137
Did you try running this as root?

I think it's a permissions problem. You cannot start it as a user.
 
Old 06-09-2005, 11:16 AM   #3
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
No i am logged in as root
 
Old 06-09-2005, 12:49 PM   #4
redir
Member
 
Registered: May 2004
Location: Virginia USA
Distribution: Debian_Ubuntu_FreeBSD
Posts: 111

Rep: Reputation: 15
Try going over some of the information here: http://dev.mysql.com/doc/mysql/en/access-denied.html Most likely I would guess you are trying to connect tcp...
 
Old 06-09-2005, 01:14 PM   #5
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Rep: Reputation: 30
Try not to start as root, your beter of using a msql account such as mysqladmin or mysql I kno postgresql wont start as anyone other than postgres, plus running this as root can sometimes run security problems. have you installed the initial mysql databases (does it do this for you in debian, does in mandrake but doesnt in slackware)
 
Old 06-09-2005, 03:50 PM   #6
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
still doesnt work
 
Old 06-09-2005, 04:05 PM   #7
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
HELPPPPP I AM SO CRAZY WITH THE MYSQL>>> DAMN APT-GET
 
Old 06-09-2005, 06:50 PM   #8
redir
Member
 
Registered: May 2004
Location: Virginia USA
Distribution: Debian_Ubuntu_FreeBSD
Posts: 111

Rep: Reputation: 15
No sense in yelling about it its been so long since I ran apt-get install mysql that I forgot exactally what the procedure is but as tomj88 said, have you installed the initial db? I don't remember if apt does that for you so try to run it: /usr/bin/mysql_install_db then follow the instructions.

just know this, once you have this installed it will run forever.
 
Old 06-09-2005, 09:29 PM   #9
shultzc
LQ Newbie
 
Registered: Feb 2004
Location: Portland, Oregon
Distribution: Debian, FreeBSD, Solaris, Mac OS X
Posts: 22

Rep: Reputation: 15
First, apt-get is almost certainly NOT the problem. APT is a wonderful package management suite, and easily beats just about anything out there...

That said, apt-get DOES automatically create the mysql database (which holds permissions information, etc.).

What happens if you run "mysql -u root" (there is no root password initially)? Please report the exact output. Note that you NEED NOT and SHOULD NOT _be_ root when running this... MySQL root and Linux root are entirely unrelated.

Also, try becoming Linux root ("su") and do an "/etc/init.d/mysql restart" to reset the server daemon. Report any anomalous results.

Finally, just to make sure your local routing (yes, networking matters for MySQL) is not broke, do a "ping localhost". If you do not get immediate replies then this is probably the problem.

Conrad Shultz
 
Old 06-10-2005, 12:52 AM   #10
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
thx a lot....At first apt-get creates the mysql user but with the /bin/false as an initial shell.. I haev change that to /bin/bash
I log in as mysql user
and i execute the command mysql -u root
ERROR 2002: Can't Connect to local MySql server through socket '/var/run/mysqld/mysqld.sock'

Let me check sth else
/etc/init.d/mysql as root or mysql user gives the following message

/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket" '/var/run/mysqld/mysqd.sock'
Check that mysqld is running and that the socket '/var/run/mysqld/mysqld.sock' exists

Thx all quys but i cant make it work
HELPPPP

PS ping localhost works fine
 
Old 06-10-2005, 01:24 AM   #11
shultzc
LQ Newbie
 
Registered: Feb 2004
Location: Portland, Oregon
Distribution: Debian, FreeBSD, Solaris, Mac OS X
Posts: 22

Rep: Reputation: 15
The "mysql" user is a system account that SHOULD ABSOLUTELY NOT have a real shell (this is a HUGE security no-no)! As a general rule you should not modify the shell and group assignments created by APT unless you have a specific and well-researched reason. "mysql" is the user that the MySQL server runs _as_.

This is NOT the account that you should use to login to the server... as I said before, you do not need to be logged into any specific account (root or otherwise) to use the MySQL client. The MySQL usernames and passwords are completely independent of the base system's usernames (in /etc/passwd and /etc/shadow).

Running "/etc/init.d/mysql restart" is equivalent to "/etc/init.d/mysql stop; /etc/init.d/mysql start"... so the resultant error may be merely a failed attempt to shutdown an already stopped server. Did you get any subsequent message like "Starting MySQL Server... Done."? If not, do the following in order and report the results for each (note that "|" is a pipe, usually Shift-\):

ps -e | grep mysql
/etc/init.d/mysql start
ps -e | grep mysql

This will definitively tell us if mysql runs at all. Can you also post the output of "dpkg -l | grep mysql"?

Finally, just to give me an idea of your environment, can you post the output of "uname -a" and "cat /etc/issue"?

Yours,
Conrad Shultz

P.S.- I run a half-dozen MySQL servers (with replication and all) on Debian, all installed with apt-get, and have never had a problem, so I think there is probably something really obvious that we are missing, hence all the weird tests...
 
Old 06-10-2005, 09:43 AM   #12
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
thx for your interest

thx a lot...


/etc/init.d/mysql restart
Stoping Mysql.....
Starting Mysql database server: mysqld failed..... (after some period)
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/mysqd.sock'
Check that mysqld is running and that the socket '/var/run/mysqld/mysqld.sock' exists


Also
ps -e | grep mysql returns nothing
dpkg -l | grep mysql gives me the installed packages


uname -a ==>Linux 2.6.9

cat /etc/issue
Debian 3.1

If u need somthing more plz tell it so
Thx a lot
 
Old 06-10-2005, 10:13 AM   #13
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Rep: Reputation: 30
May I suggest bitting the dust and installing it from source?
 
Old 06-10-2005, 10:29 AM   #14
redir
Member
 
Registered: May 2004
Location: Virginia USA
Distribution: Debian_Ubuntu_FreeBSD
Posts: 111

Rep: Reputation: 15
Does "ps ax | grep -i mysql" show anything running?

can you:

telnet localhost 3306

what is the permissions on /var/lib/mysql/*
 
Old 06-10-2005, 12:55 PM   #15
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
it doesnt show anything....
telnet localhost 3306 dont connect
and also /var/lib/mysql has 777 permissions
the mysqld.sock file does not exist i have tried to create it with touch but it didnt help...
damn !
 
  


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
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 09:00 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration