Jump to content

Can't Connect to local MYSQL Server Through Socket /var/run/mysqld


giganet

Recommended Posts

  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

That sounds quite normal. Removing a package doesn't delete configuration files, so some directories and config files may still remain.

Have you tested to see if PHP now works? If you make a file called test.php in your www root (or index.php if you like.... whatever really) with the following contents:

 

<?php
  phpinfo();
?>

 

and then point your browser at this page (assuming in the root folder: http://servername/test.php hopefully) what gets displayed?

Where are you seeing this error exactly? Any chance you could get me back on SSH for a minute to check it out?

I dont remember seeing anything like this back when I used Linux, but I have an idea of what might be going on. Do you mean /etc/resolv.conf gets cleared and you have to put the lines back in? Where / how do you change the default gateway device after a reboot?

 

 

Hey Mark

 

OK so even after removal there will be some trace of old programs...

 

PHP is not working, I have had a 'test.php' file onboard for the duration, whether I click on 'test.php' OR 'phpmyadmin' from the index page VIA browser they both still try to download the files

MYSQL is started however??

And in '/etc/mysql' lives 'mysql.sock' && 'mysql.pid'.

 

Apache2 is back to FAIL at 'start' OR 'restart' however I can view 'apache2-default' by 'IP' but not by 'domain'- WiErD

 

APACHE '/etc/apache/error.log' FOR TODAY
mailman@giganetwireless:/var/log/apache$ cat error.log
[Thu Aug 23 07:26:48 2007] [error] [client 72.169.152.210] File does not exist: /var/www/favicon.ico
[Thu Aug 23 07:26:48 2007] [error] [client 72.169.152.210] script not found or unable to stat: /usr/lib/cgi-bin/missing_handler.pl
[Thu Aug 23 07:26:48 2007] [error] [client 72.169.152.210] File does not exist: /var/www/favicon.ico
[Thu Aug 23 07:26:48 2007] [error] [client 72.169.152.210] script not found or unable to stat: /usr/lib/cgi-bin/missing_handler.pl
[Thu Aug 23 10:57:34 2007] [notice] caught SIGTERM, shutting down

APACHE2 '/etc/apache2/error.log' FOR TODAY
mailman@giganetwireless:/var/log/apache2$ cat error.log
[Thu Aug 23 11:13:08 2007] [notice] Apache/2.0.55 (Ubuntu) configured -- resuming normal operations
[Thu Aug 23 11:33:05 2007] [notice] caught SIGTERM, shutting down
[Thu Aug 23 11:33:06 2007] [notice] Apache/2.0.55 (Ubuntu) configured -- resuming normal operations
[Thu Aug 23 11:41:23 2007] [notice] caught SIGTERM, shutting down

 

I ran 'hostname' && 'hostname -f', both show giganetwireless.com

 

Apache 'httpd.conf' settings;

 

 AddType application/x-httpd-php .php
 AddType application/x-httpd-php .inc
 AddType application/x-httpd-phps .phps
 AddType application/x-httpd-php-source .phps

 

#LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

 

'libphp5.so' does exists in '/usr/lib/apache2/modules/'

 

Your SSH access should be up now, it responds slowly now for some reason?

It has been up and down as I have been trying desperately to figure out why 'sudo /etc/init.d/networking restart' commands always fail.

I stopped ShoreWall, then ran 'iptables -F'.

Then I re-built my 'iptables' this time including 'port 3306 mysql', did this all according to https://help.ubuntu.com/community/IptablesHowTo as I did previously with success [even added a new chain 'iptables -N LOGNDROP'].

 

However this time, once I get through the point where you are to edit '/etc/network/interfaces' Configuration on Startup with these lines at in '/etc/network/interfaces' the 'post-down' commands used to work but now cause griping when the network attmepts to start, so I have them commented out presently.

 

mailman@giganetwireless:~$ sudo vi /etc/network/interfaces
# Custom iptables management commands.
# DO:
# Test = iptables-restore /etc/iptables.test.rules
# Saves iptables config on reboot: post-down iptables-save > /etc/iptables.up.rule

#pre-up iptables-restore < /etc/iptables.up.rules
#  post-down iptables-restore < /etc/iptables.down.rules
#  post-down iptables-save > /etc/iptables.up.rules

iface eth2 inet static
address 10.0.0.225
netmask 255.0.0.0
gateway 10.0.0.225

auto eth2

# The primary network interface
iface eth0 inet static
address 72.169.152.211
netmask 255.0.0.0
gateway 72.169.152.209

auto eth0

 

 

After re-boot I notice that the machine loses Internet connectivity.

I use the GUI and access Networking and it always shows 'eth2' as the default gateway and when I view the DNS tab it is most often empty of DNS numbers.

 

Granted in the last couple hours I have managed to get the DNS to stick though without having to edit '/etc/resolv.conf'.

 

As I look over the file 'resolv.conf', which is in a number locations only one showed an IP [10.0.0.1] not even related to my DNS numbers, at either rate all files indicate that they are dynamic and if you make any changes they will be overwritten by the system.

 

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#	 DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

 

After re-booting the machine I am forced to reset the Default Gateway device to 'eth0'.

 

Thanks Mark

 

Regards

Edited by giganet

Share this post


Link to post
Share on other sites

Hey Mark

 

OK so even after removal there will be some trace of old programs...

 

Yep!

 

 AddType application/x-httpd-php .php
 AddType application/x-httpd-php .inc
 AddType application/x-httpd-phps .phps
 AddType application/x-httpd-php-source .phps

 

#LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

 

The # before the LoadModule makes the line a comment. Remove the #.

 

Your SSH access should be up now, it responds slowly now for some reason?

 

I did notice it was running slowly yesterday morning / afternoon! Is it the same as before, because it aint working :)

 

It has been up and down as I have been trying desperately to figure out why 'sudo /etc/init.d/networking restart' commands always fail.

I stopped ShoreWall, then ran 'iptables -F'.

Then I re-built my 'iptables' this time including 'port 3306 mysql', did this all according to https://help.ubuntu.com/community/IptablesHowTo as I did previously with success [even added a new chain 'iptables -N LOGNDROP'].

 

However this time, once I get through the point where you are to edit '/etc/network/interfaces' Configuration on Startup with these lines at in '/etc/network/interfaces' the 'post-down' commands used to work but now cause griping when the network attmepts to start, so I have them commented out presently.

 

Griping at startup?

 

Granted in the last couple hours I have managed to get the DNS to stick though without having to edit '/etc/resolv.conf'.

 

As I look over the file 'resolv.conf', which is in a number locations only one showed an IP [10.0.0.1] not even related to my DNS numbers, at either rate all files indicate that they are dynamic and if you make any changes they will be overwritten by the system.

 

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#	 DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

 

After re-booting the machine I am forced to reset the Default Gateway device to 'eth0'.

 

I thought maybe dhclient (or.... some sort of dhcp client) might be running on startup, but I have no idea what resolvconf is. According to the man page it is just a thing to change resolv.conf on certain actions. Doesn't really sound like you will need it. See if you can remove the resolvconf package (the whole OS seemed to be packages to me, so I assume resolvconf is one...).

Share this post


Link to post
Share on other sites

Yep!

The # before the LoadModule makes the line a comment. Remove the #.

I did notice it was running slowly yesterday morning / afternoon! Is it the same as before, because it aint working :)

Griping at startup?

I thought maybe dhclient (or.... some sort of dhcp client) might be running on startup, but I have no idea what resolvconf is. According to the man page it is just a thing to change resolv.conf on certain actions. Doesn't really sound like you will need it. See if you can remove the resolvconf package (the whole OS seemed to be packages to me, so I assume resolvconf is one...).

 

Hey Mark

 

#LoadModule

I went ahead and removed the comment from in-front of LoadModule, I still get error when I run 'sudo /etc/init.d/apache2 restart'

 

mailman@giganetwireless:/usr/lib/apache2/modules$ sudo /etc/init.d/apache2 restart
* Forcing reload of apache 2.0 web server...  (98)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs																																																  [fail]

 

 

* SSH

 

Hmm, I do see now that I am the only one logged on VIA SSH.

I have'nt changed anything regarding your account info.

So you get no response then? I'll have to see if I can fix this!

I just logged in under your '-u -p', the system responds really slowly after yesterday's removal of

packages and then re-installation I notice.

 

 

*Griping

 

Yes, when I un-comment 'pre-up iptables-restore < /etc/iptables.up.rules' in '/etc/network/interfaces' which is supposed to reload my saved iptables values at re-boot.

After uncommenting the line and then 'sudo /etc/init.d/networking restart' I receive the following error:

 

sudo /etc/init.d/networking restart
* Reconfiguring network interfaces...  /etc/network/interfaces:13: misplaced option
ifdown: couldn't read interfaces file "/etc/network/interfaces"
/etc/network/interfaces:13: misplaced option
ifup: couldn't read interfaces file "/etc/network/interfaces"

 

Thank you Mark

 

Regards

Share this post


Link to post
Share on other sites

Hey Mark

 

Well I am getting thouroughly frustrated now...

 

I have been looking at a variety of forums regarding the error I am encountering with Apache2.

 

Wound up 'sudo /etc/init.d/apache2 stop'

then I 'lsof -i :80'

to view all processes running on port 80

and then just ran a 'sudo kill -9 PID' on all processes.

After that I ran 'sudo /etc/init.d/apache2 start' successfully!

 

And even now I can run 'sudo /etc/init.d/apache2 restart' without problem again--- Go figure jeez!~

The only thing I can't manage to get from apache2 is 'sudo /etc/init.d/apache2 status', it just returns to the CL as that function is not available in apache2??

 

My primary concern is to get phpmyadmin and PHP's for that matter to function, have you any ideas?

At that point I can continue on with finishing the setup of of Adding Users and Domains in the MySQL db, not to mention I need to edit a line I pasted and accidentally hit enter on in aliases.

 

But I do want to try my best to move forward and make this thing accessible BTW and my clients especially!

 

EDIT

To get phpmyadmin to use apache2 and not install
apache, you must install apache2 before or at the same time you install
phpmyadmin.

 

Sounds as though I should remove phpmyadmin and then re-install it?

 

I await your wisdom Mark

 

Thank you

 

Regards

Edited by giganet

Share this post


Link to post
Share on other sites

Hey Mark

 

Well I am getting thouroughly frustrated now...

 

I have been looking at a variety of forums regarding the error I am encountering with Apache2.

 

Wound up 'sudo /etc/init.d/apache2 stop'

then I 'lsof -i :80'

to view all processes running on port 80

and then just ran a 'sudo kill -9 PID' on all processes.

After that I ran 'sudo /etc/init.d/apache2 start' successfully!

 

And even now I can run 'sudo /etc/init.d/apache2 restart' without problem again--- Go figure jeez!~

The only thing I can't manage to get from apache2 is 'sudo /etc/init.d/apache2 status', it just returns to the CL as that function is not available in apache2??

 

My primary concern is to get phpmyadmin and PHP's for that matter to function, have you any ideas?

At that point I can continue on with finishing the setup of of Adding Users and Domains in the MySQL db, not to mention I need to edit a line I pasted and accidentally hit enter on in aliases.

 

But I do want to try my best to move forward and make this thing accessible BTW and my clients especially!

 

EDIT

To get phpmyadmin to use apache2 and not install
apache, you must install apache2 before or at the same time you install
phpmyadmin.

 

Sounds as though I should remove phpmyadmin and then re-install it?

 

I await your wisdom Mark

 

Thank you

 

Regards

 

Sorry, been busy today fixing my own network for the first time in forever :lol: Turned out to be some crap d-link firmware. Downgraded from 2.20 to 2.01 and it seems to be working good now :rolleyes:

 

So, apache2 is working now...... does test.php work?

 

`apache2 status` works for me here and gives the following:

 

(root@bone:ttyp0)-(/var/log)# /usr/pkg/etc/rc.d/apache status

apache is running as pid 102 292 293 296 609 664 1045 1073 1132.

 

But ........... I probably wouldn't worry about status not working. Above is the first time I have ever used that argument to the script :lol:

 

 

Remove phpMyAdmin and reinstall it I guess. Seems to be the same [ugly] thing squirrelmail was doing.

Edited by markiemrboo

Share this post


Link to post
Share on other sites

Sorry, been busy today fixing my own network for the first time in forever :lol: Turned out to be some crap d-link firmware. Downgraded from 2.20 to 2.01 and it seems to be working good now :rolleyes:

 

So, apache2 is working now...... does test.php work?

 

`apache2 status` works for me here and gives the following:

But ........... I probably wouldn't worry about status not working. Above is the first time I have ever used that argument to the script :lol:

Remove phpMyAdmin and reinstall it I guess. Seems to be the same [ugly] thing squirrelmail was doing.

 

 

Does PHP Work?

No, still the same results.

Seeme to have everything with 'how / when' apache - php5 > phpmyadmin > apache2 - php5 were installed that can cause phpmyadmin to fail I've read??

 

Remove / Install phpmyadmin

I've performed 'remove - install' two different times.

 

Start from Scratch

I beleive I'm just going to start from scratch and take full control over the OS installation.

Then I can tell the server what it is to install not causing this problem I bleeive???

 

Seems a better option to me?

 

Regards

Share this post


Link to post
Share on other sites

Does PHP Work?

No, still the same results.

Seeme to have everything with 'how / when' apache - php5 > phpmyadmin > apache2 - php5 were installed that can cause phpmyadmin to fail I've read??

 

Remove / Install phpmyadmin

I've performed 'remove - install' two different times.

 

Start from Scratch

I beleive I'm just going to start from scratch and take full control over the OS installation.

Then I can tell the server what it is to install not causing this problem I bleeive???

 

Seems a better option to me?

 

Regards

 

Sorry I wasn't of much use again :lol: I was going to suggest perhaps changing the root password to something non-private for a bit so I might be able to go through and have a go myself, because it's just taking too much time trying to find out whats going wrong. To be honest though I do think starting from scratch and with only bare essentials then installing what you need is the way forward when it comes to a server machine. It's unfortunate that you have had to waste some time on this.

 

I would start off installing Apache and PHP and getting some basic network set up, just enough to be able to access the web server from a remote location and do the test.php thing. I would then install MySQL and get that running, testing access to the server with the `mysql` command line tool. Then try installing phpMyAdmin, which should "just work" at this point.

 

Once that's done, then I would start messing with firewalls and things.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...