LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Couldn't start mysql services on Debian Lenny (http://www.linuxquestions.org/questions/linux-newbie-8/couldnt-start-mysql-services-on-debian-lenny-837539/)

Tueleep86 10-12-2010 01:00 AM

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

prayag_pjs 10-12-2010 01:03 AM

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

quanta 10-12-2010 01:19 AM

Post your configuration file - /etc/my.cnf?

Tueleep86 10-12-2010 01:54 AM

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 :)

prayag_pjs 10-12-2010 01:57 AM

Try restarting mysqld service;it seems to be stopped.

And hope you remember the password.

sem007 10-12-2010 02:01 AM

restart your mysql service try to connect mysql.

Regards,

quanta 10-12-2010 02:25 AM

ls -ld /var/lib/mysql?
tail -f /var/log/mysqld.log?


All times are GMT -5. The time now is 05:47 AM.