FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » MySQL problem after updates
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
MySQL problem after updates [message #882] Wed, 06 March 2002 15:45 Go to next message
fjrohlf is currently offline  fjrohlf   United States
Messages: 82
Registered: February 2002
Karma: 0
Member
This moring I got the following error message when I tried to connect to my forum:

Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /var/www/forumdata/include/db.inc on line 26

It probably is significant that last night updates from RH for Perl and MySQL were installed on my server. I shutdown mysql and then ran safe_mysqld. I was able to login to mysql and verify that the various forum tables were there. I then ran the phpinfo test file and the version info on PHP came up ok on the browser (version 4.0.6). So that seems ok.

Suggestions of what to check next?


Jim
Re: MySQL problem after updates [message #883 is a reply to message #882] Wed, 06 March 2002 15:53 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
fjrohlf wrote on Wed, 06 March 2002 10:45 AM


Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /var/www/forumdata/include/db.inc on line 26



This problems occures because php cannot establish a connection to mysql via a unix socket.

Here is what you can do:

1) Check if /tmp/mysql.sock exists, if it does not try seeing where "mysql.sock" file can be found and once you do change your "Mysql Server" option to reflect the different path.

2) If the file is there, try seeing if you can connect manually to mysql using it:
ex: mysql -S/tmp/mysql.sock -uyour_user_name -pyour_password
If that does not work, check your MySQL settings.

3) If you are able to connect in step #2 check your MySQL permissions.

You can also try changing the "Mysql Server" variable to say "127.0.0.1" and seeing if that would fix your problem.


FUDforum Core Developer
Re: MySQL problem after updates [message #884 is a reply to message #883] Wed, 06 March 2002 15:58 Go to previous messageGo to next message
fjrohlf is currently offline  fjrohlf   United States
Messages: 82
Registered: February 2002
Karma: 0
Member
The mysql.sock file is not there. In fact /tmp is empty. Exactly where do I change the "Mysql Server" option to reflect the different path?

Jim
Re: MySQL problem after updates [message #885 is a reply to message #884] Wed, 06 March 2002 16:00 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
fjrohlf wrote on Wed, 06 March 2002 10:58 AM

The mysql.sock file is not there. In fact /tmp is empty. Exactly where do I change the "Mysql Server" option to reflect the different path?


Changing it to 127.0.0.1 should fix your problem. For better performance you may want to see if you can find the mysql.sock file. Try checking /usr/tmp or /var/tmp directories.
Unix domain sockets are quite a bit faster then their tcp/ip equivalents.


FUDforum Core Developer
Re: MySQL problem after updates [message #886 is a reply to message #885] Wed, 06 March 2002 16:06 Go to previous messageGo to next message
fjrohlf is currently offline  fjrohlf   United States
Messages: 82
Registered: February 2002
Karma: 0
Member
? Do you mean to change the globals.php file entry to
$MYSQL_SERVER = ":127.0.0.1";
I did that and there was no change.

The mysql.sock file is in /var/lib/mysql


Jim
Re: MySQL problem after updates [message #887 is a reply to message #886] Wed, 06 March 2002 16:09 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
fjrohlf wrote on Wed, 06 March 2002 11:06 AM

? Do you mean to change the globals.php file entry to
$MYSQL_SERVER = ":127.0.0.1";
I did that and there was no change.

The mysql.sock file is in /var/lib/mysql


you only need the ":" if you are specifying a Unix Socket, for ip address' or host names you just type them.

Try
$MYSQL_SERVER = ":/var/lib/mysql/mysql.sock";
if that does not work then try:
$MYSQL_SERVER = "127.0.0.1";


FUDforum Core Developer
icon7.gif  Re: MySQL problem after updates [message #888 is a reply to message #887] Wed, 06 March 2002 16:13 Go to previous messageGo to next message
fjrohlf is currently offline  fjrohlf   United States
Messages: 82
Registered: February 2002
Karma: 0
Member
That works. Yea! I am alive again. Wonder what made this change necessary?

Jim
Re: MySQL problem after updates [message #889 is a reply to message #888] Wed, 06 March 2002 16:15 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
fjrohlf wrote on Wed, 06 March 2002 11:13 AM

That works. Yea! I am alive again. Wonder what made this change necessary?


When you re-installed your MySQL no longer stored its Unix domain socket inside /tmp but rather /var/lib/mysql. So, your forum was pointing to a non existant file, hence the error message you recieved.


FUDforum Core Developer
icon7.gif  Re: MySQL problem after updates [message #890 is a reply to message #889] Wed, 06 March 2002 16:17 Go to previous messageGo to next message
fjrohlf is currently offline  fjrohlf   United States
Messages: 82
Registered: February 2002
Karma: 0
Member
ok. Thanks again - especially for such a quick response.

Jim
Re: MySQL problem after updates - problems continue [message #903 is a reply to message #890] Thu, 07 March 2002 14:21 Go to previous messageGo to next message
fjrohlf is currently offline  fjrohlf   United States
Messages: 82
Registered: February 2002
Karma: 0
Member
This morning there were more problems. I could still access and view the messages in the forum but when I clicked on the Control Panel link I got the same error as yesterday. I found there was a second copy of GLOBALS.php in the adm directory so I made the same change there and that fixed that problem. (Why are there two copies rather than just a link?)

The current problem is that I cannot post a message. When click preview, spell-check, or submit it takes a long time and then just displays "a page be displayed" screen for http://morph.bio.sunysb.edu/forum/post.php. Something else must have been broken by the perl update. What do you suggest I check next?


Jim
Re: MySQL problem after updates [message #904 is a reply to message #903] Thu, 07 March 2002 14:26 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Hmm... when you've upgraded the computer did you do any backups & restores?

Backups often resolve symlink so when you decompress them the symlinks become actual files.

Since you mentioned having a GLOBALS.php in the adm/ directory you probably have a GLOBALS.php FILE inside the forum's main web directory to. In reality this should be a SYMLINK to the GLOBALS.php that can be found inside your include/ directory.
Make sure that is the case.


FUDforum Core Developer
icon7.gif  Re: MySQL problem after updates [message #905 is a reply to message #904] Thu, 07 March 2002 15:55 Go to previous message
fjrohlf is currently offline  fjrohlf   United States
Messages: 82
Registered: February 2002
Karma: 0
Member
No, I did not do a backup and restore.

There is a GLOBALS.php in the forumdata/include directory.

In the forum/adm it is a link.

In the main forum directory is a GLOBALS.php file. I think what happened was that when you suggested the change the other day, I downloaded it to my Windows computer, edited the file and then uploaded. That broke the link. I guess I should restore the link in the forum directory. The file in the forumdata/include is the master copy?

ok, I just changed the file in the forum directory to a symbolic link to the one in the /includes directory. I am not sure why but it now works.

Thanks again for your prompt help.


Jim
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: fudforum in zip format
Next Topic: help removing files....
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Dec 05 02:33:36 GMT 2024

Total time taken to generate the page: 0.02653 seconds