LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2010, 01:00 AM   #1
Tueleep86
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
Couldn't start mysql services on Debian Lenny


hi,
i'm new to Debian os and currently want to install php5 apache2 and mysql 5.1. But ive got problem to start the mysql services.The error on command prompt as belows:
PHP Code:
debian:/usr/local/mysql# mysqld_safe --user=mysql
101011 22:49:39 mysqld_safe Logging to '/var/lib/mysql/debian.err'.
touchcannot touch `/var/lib/mysql/debian.err': No such file or directory
chown: cannot access 
`/var/lib/mysql/debian.err': No such file or directory
101011 22:49:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/bin/mysqld_safe: line 96: /var/lib/mysql/debian.err: No such file or directory
/usr/bin/mysqld_safe: line 133: /var/lib/mysql/debian.err: No such file or directory
101011 22:49:39 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
/usr/bin/mysqld_safe: line 96: /var/lib/mysql/debian.err: No such file or directory
debian:/usr/local/mysql# mysql -u root
ERROR 2002 (HY000): Can'
t connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
debian:/usr/local/mysql
I really appreciate if anyone could help me..
thanks
 
Old 10-12-2010, 01:03 AM   #2
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,159
Blog Entries: 4

Rep: Reputation: 149Reputation: 149
Did you give password to root user in mysql?

If not try logging in using only

Quote:
mysql

If you have given the password and remember the same do this:

Quote:
mysql -u root -p
and give the root password you set for using mysql
 
Old 10-12-2010, 01:19 AM   #3
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
Post your configuration file - /etc/my.cnf?
 
Old 10-12-2010, 01:54 AM   #4
Tueleep86
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Original Poster
Rep: Reputation: 0
dEar prayag_pjs,

Quote:
mysql or mysql -u root -p
none working

debian:/usr/local/mysql# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
debian:/usr/local/mysql# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
debian:/usr/local/mysql#

Dear quanta,

Here my my.cnf file


[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]
#
# * Basic Settings
#
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
#


Guys, thank you for quick reply
 
Old 10-12-2010, 01:57 AM   #5
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,159
Blog Entries: 4

Rep: Reputation: 149Reputation: 149
Try restarting mysqld service;it seems to be stopped.

And hope you remember the password.
 
Old 10-12-2010, 02:01 AM   #6
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
restart your mysql service try to connect mysql.

Regards,
 
Old 10-12-2010, 02:25 AM   #7
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
ls -ld /var/lib/mysql?
tail -f /var/log/mysqld.log?
 
  


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
LXer: Apache And MySQL Monitoring With Bijk On Debian Lenny LXer Syndicated Linux News 0 06-28-2010 05:30 PM
Balazar on debian lenny will not start Elixer Linux - Games 6 05-02-2010 02:32 PM
LXer: Virtual Hosting With vsftpd And MySQL On Debian Lenny LXer Syndicated Linux News 0 03-10-2010 10:41 AM
HPLIP toolbox won't start in Debian Etch, Lenny fof3 Linux - Software 8 01-05-2009 02:02 AM
how to auto start services at startup in debian? legolin Debian 3 12-28-2003 10:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:11 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
Open Source Consulting | Domain Registration