Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 2nd April 2009, 18:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

I think the problem could be caused by the dotdeb.org repository. Can you remove it and try to install the MySQL client again?
__________________
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
The Following User Says Thank You to falko For This Useful Post:
giganet (3rd April 2009)
Sponsored Links
  #12  
Old 3rd April 2009, 01:13
giganet giganet is offline
Senior Member
 
Join Date: Aug 2007
Location: California
Posts: 243
Thanks: 116
Thanked 1 Time in 1 Post
Send a message via AIM to giganet
Lightbulb

Hi Falko

OK after I removed the 'dotdeb' lines from sources.list I ran:

'apt-get update'
'apt-get upgrade'

Then I ran re-installed mysql-client.

After this things did progress forward.
I am now able to 'stop' & 'start' MySQL.

When I try to log onto mysql VIA CLI I receive the following:

Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Likewise if I attempt to log ingo ISPConfig I receive the following:

Code:
 
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 77
 
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 77
 
Warning: Cannot modify header information - headers already sent by (output started at /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php:77) in /home/admispconfig/ispconfig/web/login/login.php on line 62

I ran this command: 'find / -name mysql.sock'

RESULTS:
Code:
/var/lib/mysql/mysql.sock
And this command: 'find / -name mysql'

RESULTS:
Code:
/var/lib/mysql
/var/lib/mysql/mysql
/var/log/mysql
/etc/init.d/mysql
/etc/mysql
/usr/bin/mysql
/usr/include/mysql
/usr/lib/perl5/auto/DBD/mysql
/usr/lib/perl5/DBD/mysql
my.cnf contents

Code:
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.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
thread_cache_size       = 8
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit       = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#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
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id              = 1
log_bin                 = /var/log/mysql/mysql-bin.log
# WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian!
expire_logs_days        = 10
max_binlog_size         = 100M
#binlog_do_db           = include_database_name
#binlog_ignore_db       = include_database_name
#
# * BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
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!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# 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
#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the NDB Data Nodes (ndbd processes)
# not from the NDB Management Nodes (ndb_mgmd processes).
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1
 
#
# * IMPORTANT: Additional settings that can override those from this file!
#
!includedir /etc/mysql/conf.d/

'netstat -tap' Returns:

Code:
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 localhost.localdo:39882 *:*                     LISTEN     4942/hpiod
tcp        0      0 *:54000                 *:*                     LISTEN     22539/sshd
tcp        0      0 *:81                    *:*                     LISTEN     5766/ispconfig_http
tcp        0      0 *:ftp                   *:*                     LISTEN     5615/proftpd: (acce
tcp        0      0 mail.giganetwire:domain *:*                     LISTEN     4906/named
tcp        0      0 giganetwireless.:domain *:*                     LISTEN     4906/named
tcp        0      0 localhost.locald:domain *:*                     LISTEN     4906/named
tcp        0      0 localhost.localdoma:ipp *:*                     LISTEN     4994/cupsd
tcp        0      0 *:smtp                  *:*                     LISTEN     5384/master
tcp        0      0 localhost.localdoma:953 *:*                     LISTEN     4906/named
tcp        0    296 giganetwireless.c:54000 65.197.209.10:59895     ESTABLISHED12329/sshd: leela [
tcp6       0      0 *:imaps                 *:*                     LISTEN     5083/couriertcpd
tcp6       0      0 *:pop3s                 *:*                     LISTEN     5124/couriertcpd
tcp6       0      0 *:pop3                  *:*                     LISTEN     5101/couriertcpd
tcp6       0      0 *:imap2                 *:*                     LISTEN     5060/couriertcpd
tcp6       0      0 *:www                   *:*                     LISTEN     13471/apache2
tcp6       0      0 *:smtp                  *:*                     LISTEN     5384/master
tcp6       0      0 ::1%134723248:953       *:*                     LISTEN     4906/named
tcp6       0      0 *:https                 *:*                     LISTEN     13471/apache2
Shouldn't I see 'mysqld' running?


Thanking you in advance Falko
Best Regards
Reply With Quote
  #13  
Old 3rd April 2009, 13:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

What's the output of
Code:
ps aux | grep mysql
? I guess there's still an old instance running; if it is, try to stop it and start MySQL again.
__________________
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
The Following User Says Thank You to falko For This Useful Post:
giganet (3rd April 2009)
  #14  
Old 3rd April 2009, 17:09
giganet giganet is offline
Senior Member
 
Join Date: Aug 2007
Location: California
Posts: 243
Thanks: 116
Thanked 1 Time in 1 Post
Send a message via AIM to giganet
Default

Hi Falko thanks for the reply


The output of 'ps aux | grep mysql'

Code:
root     30369  0.0  0.0   2876   804 pts/0    S+   07:58   0:00 grep mysql
I tried stopping mysql '/etc/init.d/mysql/stop' the re-started mysql but when I attempt to log into mysql VIA CLI it still returns the same error...

Best Regards
Reply With Quote
  #15  
Old 4th April 2009, 13:28
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

What's in /etc/init.d/mysql? Maybe that script is using another my.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
The Following User Says Thank You to falko For This Useful Post:
giganet (6th April 2009)
  #16  
Old 6th April 2009, 00:56
giganet giganet is offline
Senior Member
 
Join Date: Aug 2007
Location: California
Posts: 243
Thanks: 116
Thanked 1 Time in 1 Post
Send a message via AIM to giganet
Default

Thanks for the reply FalkoI opened /etc/init.d/mysql and the following lines are pointing back to the correct my.cnf within the correct dir.
Code:
SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)CONF=/etc/mysql/my.cnfMYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
Puzzeling situation Best Regards
Reply With Quote
  #17  
Old 6th April 2009, 14:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Can you try to restart MySQL?
Code:
/etc/init.d/mysql restart
Do you see any error messages? What's the output of
Code:
netstat -tap
then?
__________________
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
The Following User Says Thank You to falko For This Useful Post:
giganet (6th April 2009)
  #18  
Old 6th April 2009, 18:08
giganet giganet is offline
Senior Member
 
Join Date: Aug 2007
Location: California
Posts: 243
Thanks: 116
Thanked 1 Time in 1 Post
Send a message via AIM to giganet
Arrow

Hi Falko thanks for the reply...

I ran '/etc/init.d/mysql restart' and no errors are displayed the system just returns to the command line as if all went well.

Here is the output of 'netstat -tap'
Code:
root@giganetwireless:/etc/postfix# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 localhost.localdo:39882 *:*                     LISTEN     4942/hpiod
tcp        0      0 *:54000                 *:*                     LISTEN     22539/sshd
tcp        0      0 *:81                    *:*                     LISTEN     5766/ispconfig_http
tcp        0      0 *:ftp                   *:*                     LISTEN     5615/proftpd: (acce
tcp        0      0 mail.giganetwire:domain *:*                     LISTEN     4906/named
tcp        0      0 giganetwireless.:domain *:*                     LISTEN     4906/named
tcp        0      0 localhost.locald:domain *:*                     LISTEN     4906/named
tcp        0      0 localhost.localdoma:ipp *:*                     LISTEN     4994/cupsd
tcp        0      0 *:smtp                  *:*                     LISTEN     5384/master
tcp        0      0 localhost.localdoma:953 *:*                     LISTEN     4906/named
tcp        0      0 giganetwireless.c:36487 giganetwireless.co:smtp TIME_WAIT  -
tcp        0    148 giganetwireless.c:54000 65.197.209.10:60160     ESTABLISHED1164/sshd: leela [p
tcp6       0      0 *:imaps                 *:*                     LISTEN     5083/couriertcpd
tcp6       0      0 *:pop3s                 *:*                     LISTEN     5124/couriertcpd
tcp6       0      0 *:pop3                  *:*                     LISTEN     5101/couriertcpd
tcp6       0      0 *:imap2                 *:*                     LISTEN     5060/couriertcpd
tcp6       0      0 *:www                   *:*                     LISTEN     13471/apache2
tcp6       0      0 *:smtp                  *:*                     LISTEN     5384/master
tcp6       0      0 ::1%134723248:953       *:*                     LISTEN     4906/named
tcp6       0      0 *:https                 *:*                     LISTEN     13471/apache2
tcp6       0      0 giganetwireless.com:www crawl-15.cuill.co:45102 TIME_WAIT  -

Best Regards
Reply With Quote
  #19  
Old 7th April 2009, 16:52
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Still not running. Are there any MySQL errors in /var/log/syslog when you try to restart 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
The Following User Says Thank You to falko For This Useful Post:
giganet (8th April 2009)
  #20  
Old 8th April 2009, 20:08
giganet giganet is offline
Senior Member
 
Join Date: Aug 2007
Location: California
Posts: 243
Thanks: 116
Thanked 1 Time in 1 Post
Send a message via AIM to giganet
 
Arrow

Hi Falko thank you for the reply...

New Information: I have found that when OSSEC sends notices as below:
Code:
OSSEC HIDS Notification.
2009 Apr 08 21:01:47

Received From: giganetwireless->/var/log/auth.log
Rule: 1002 fired (level 2) -> "Unknown problem somewhere in the system."
Portion of the log(s):

Apr  8 21:01:46 giganetwireless getty[9018]: ttyS1: ioctl: Input/output error



 --END OF NOTIFICATION
I have just found that at the same time OSSEC sends error notices that I am also receiving a system message as follows:
Code:
Warning: service mysqld not running (server: giganetwireless.com)!

Message generated at April 8, 2009, 21:30.
Out of curiosity I took a look at '/var/log/auth.log' a few sample lines below:
Code:
Apr  8 21:39:01 giganetwireless CRON[11616]: (pam_unix) session opened for user root by (uid=0)
Apr  8 21:39:01 giganetwireless CRON[11616]: (pam_unix) session closed for user root
Apr  8 21:40:37 giganetwireless getty[11703]: ttyS1: ioctl: Input/output error
Apr  8 21:40:47 giganetwireless getty[11710]: ttyS1: ioctl: Input/output error

I restarted mysql '/etc/init.d/mysql restart' and then ran 'tail -f /var/log/syslog' and all I see in there are mail type messages nothing petaining to MySQL though.

Best Regards

Last edited by giganet; 9th April 2009 at 06:53. Reason: New Information
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
apache2 won't connect to localhost or 127.0.0.1 anw Server Operation 6 19th March 2009 18:51
postfix bounced email question daveb Server Operation 8 3rd February 2008 20:32
server blocked/stopped by host Ovidiu Technical 11 14th February 2006 10:50
Email - Ueb-Miau mazhar Installation/Configuration 5 21st December 2005 10:01
The Perfect Setup Suse 9.3 - Postfix problems new_bee05 HOWTO-Related Questions 20 25th November 2005 02:30


All times are GMT +2. The time now is 21:39.


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