Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 30th April 2006, 10:40
symmetry symmetry is offline
Junior Member
 
Join Date: Apr 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default mysql connect problem

Hello,

when I try to login via phpmyadmin, I get the following error:

Quote:
#2002 - Der Server antwortet nicht. (evtl. ist auch der Socket des lokalen MySQL-Servers socket nicht korrekt konfiguriert)
and when I try to start the database:

Quote:
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!
syslog
Quote:
less /var/log/syslog
/var/log/syslog: No such file or directory
can someone help me?
Thanks a lot
Reply With Quote
Sponsored Links
  #2  
Old 30th April 2006, 11:04
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,216 Times in 4,089 Posts
Default

Which linux distribution do you use?

Did you install the mysql package that comes with your linux distribution?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 30th April 2006, 11:21
symmetry symmetry is offline
Junior Member
 
Join Date: Apr 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have a Debian Sarge installation.
It was already installed when I got the root server. They made a Lamp installation.

and when I want do remove mysql he says the following:

Quote:
apt-get --purge remove mysql
Reading Package Lists... Done
Building Dependency Tree... Done
Package mysql is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reply With Quote
  #4  
Old 30th April 2006, 14:20
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

It seems as if MySQL isn't installed. Install it now.
It's strange that /var/log/syslog doesn't exist on your Debian system...
__________________
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 30th April 2006, 21:00
symmetry symmetry is offline
Junior Member
 
Join Date: Apr 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes it's very strange

but I am able to start mysql, he gives me an error... so it must be installed.
Reply With Quote
  #6  
Old 1st May 2006, 12:49
symmetry symmetry is offline
Junior Member
 
Join Date: Apr 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

syslog works again

here the error that mysql causes:

Quote:
May 1 14:54:55 localhost /etc/init.d/mysql[13283]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
May 1 14:54:55 localhost /etc/init.d/mysql[13283]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
May 1 14:54:55 localhost /etc/init.d/mysql[13283]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
May 1 14:54:55 localhost /etc/init.d/mysql[13283]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
May 1 14:54:55 localhost /etc/init.d/mysql[13283]:
Reply With Quote
  #7  
Old 1st May 2006, 14:53
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

Please try this:
Code:
apt-get install mysql-server mysql-client libmysqlclient12-dev
__________________
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
  #8  
Old 1st May 2006, 19:48
symmetry symmetry is offline
Junior Member
 
Join Date: Apr 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
apt-get install mysql-server mysql-client libmys
qlclient12-dev
Reading Package Lists... Done
Building Dependency Tree... Done
mysql-server is already the newest version.
mysql-client is already the newest version.
The following extra packages will be installed:
zlib1g-dev
The following NEW packages will be installed:
libmysqlclient12-dev zlib1g-dev
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 3409kB of archives.
After unpacking 9064kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://85.10.192.16 sarge/main zlib1g-dev 1:1.2.2-4.sarge.2 [488kB]
Get:2 http://85.10.192.16 sarge/main libmysqlclient12-dev 4.0.24-10sarge1 [2921k
B]
Fetched 3409kB in 0s (5424kB/s)
Selecting previously deselected package zlib1g-dev.
(Reading database ... 33552 files and directories currently installed.)
Unpacking zlib1g-dev (from .../zlib1g-dev_1%3a1.2.2-4.sarge.2_i386.deb) ...
Selecting previously deselected package libmysqlclient12-dev.
Unpacking libmysqlclient12-dev (from .../libmysqlclient12-dev_4.0.24-10sarge1_i3
86.deb) ...
Setting up zlib1g-dev (1.2.2-4.sarge.2) ...
Setting up libmysqlclient12-dev (4.0.24-10sarge1) ...
But I still get the same error
Reply With Quote
  #9  
Old 1st May 2006, 20:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

What's in /etc/mysql/my.cnf? What's the output of
Code:
netstat -tap
and
Code:
ps aux|grep mysql
?
__________________
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
  #10  
Old 2nd May 2006, 07:20
symmetry symmetry is offline
Junior Member
 
Join Date: Apr 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

/etc/mysql/my.cnf:
Quote:
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "/var/lib/mysql/my.cnf" to set server-specific options or
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/se...variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[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
#
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
#
# * Query Cache Configuration
#
query_cache_limit = 1048576
query_cache_size = 16777216
query_cache_type = 1
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log = /var/log/mysql.log
#log = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement
#
# Here you can see queries with especially long duration
#log-slow-queries = /var/log/mysql/mysql-slow.log
#
# The following can be used as easy to replay backup logs or for replication.
#server-id = 1
log-bin = /var/log/mysql/mysql-bin.log
# See /etc/mysql/debian-log-rotate.conf for the number of files kept.
max_binlog_size = 104857600
#binlog-do-db = include_database_name
#binlog-ignore-db = include_database_name
#
# * BerkeleyDB
#
# The use of BerkeleyDB is now discouraged and support for it will probably
# cease in the next versions.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Feature
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# If you want to enable SSL support (recommended) read the manual or my
# HOWTO in /usr/share/doc/mysql-server/SSL-MINI-HOWTO.txt.gz
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer = 16M

netstat -tap:
Quote:

Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
tcp 0 0 *:sunrpc *:* LISTEN 1
906/portmap
tcp 0 0 *:10000 *:* LISTEN 2
659/perl
tcp 0 0 *:www *:* LISTEN 2
593/apache
tcp 0 0 *:auth *:* LISTEN 2
327/inetd
tcp 0 0 localhost.locald:domain *:* LISTEN 2
273/named
tcp 0 0 xxxx.ne:domain *:* LISTEN 2
273/named
tcp 0 0 localhost.localdoma:953 *:* LISTEN 2
273/named
tcp 0 0 *:634 *:* LISTEN 2
572/rpc.statd
tcp6 0 0 *op3 *:* LISTEN 2
318/couriertcpd
tcp6 0 0 *:ssh *:* LISTEN 2
565/sshd
tcp6 0 0 ip6-localhost:953 *:* LISTEN 2
273/named
tcp6 0 356 xxxx.net:ssh dslb-085-027-112-0:3224 ESTABLISHED4


Quote:

root 2306 0.0 0.0 1752 384 ? S May01 0:00 /usr/sbin/courierlogger -pid=/var/run/courier/authdaemon/pid -start /usr/lib/courier/authlib/authdaemond.mysql
root 2307 0.0 0.0 2428 652 ? S May01 0:00 /usr/lib/courier/authlib/authdaemond.mysql
root 2312 0.0 0.0 2428 324 ? S May01 0:00 /usr/lib/courier/authlib/authdaemond.mysql
root 2313 0.0 0.0 2428 324 ? S May01 0:00 /usr/lib/courier/authlib/authdaemond.mysql
root 2314 0.0 0.0 2428 324 ? S May01 0:00 /usr/lib/courier/authlib/authdaemond.mysql
root 2315 0.0 0.0 2428 324 ? S May01 0:00 /usr/lib/courier/authlib/authdaemond.mysql
root 2316 0.0 0.0 2428 324 ? S May01 0:00 /usr/lib/courier/authlib/authdaemond.mysql
root 4069 0.0 0.0 1912 584 pts/0 R+ 09:27 0:00 grep mysql

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
postfix - MySQL connection problem epo Installation/Configuration 7 4th August 2006 20:49
Email seemingly not working... Duplex Installation/Configuration 11 19th April 2006 14:48
Perfect Xen 3.0 setup for Debian gurneyzap HOWTO-Related Questions 4 26th March 2006 11:30
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 16:04
Problem installing ISPConfig, then with MySQL... ctroyp Installation/Configuration 7 26th September 2005 16:37


All times are GMT +2. The time now is 01:15.


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