473,809 Members | 2,708 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Something Broken When I Went To 5.0.19...

Maybe this is something simple, maybe I just don't see it...

I recently did a test upgrade from MySQL 4 to 5.0.19, and most
everything seems to be working great. I also upgraded my PHP to 5.1.2
(and it's possible that the problem is in the PHP upgrade, not the
MySQL upgrade... but I need a place to start). Most everything seems
to be working fine in my testing, except a PHP-based MySQL-backed forum
software I use (http://www.phpbb.com) on a couple of my hosted sites.

When the code tries to connect to the new database service, it produces
the following error:

-------------------------
Warning: mysql_connect() [function.mysql-connect]: Can't connect to
local MySQL server through socket '/tmp/mysql.sock' (13) in
/mnt/webusers/myerscreek/forum/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link
resource in /mnt/webusers/myerscreek/forum/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link
resource in /mnt/webusers/myerscreek/forum/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database
-------------------------

I'm guessing the second two warnings are products of whatever went
wrong in the first warning. The file /tmp/mysql.sock is there and is a
symlink to /var/run/mysql/mysql.sock (which is the same .sock that is
symlinked from the MySQL data directory).

The forum for that software claims that an upgrade to MySQL 5 should be
smooth, and when asked about this error they claim not to support it.
Can anyone here possibly shed some light on this for me? Maybe at
least point me in the right direction? I'd really appreciate it,
thanks.
Regards,
David P. Donahue
dd******@ccs.ne u.edu
http://www.cyber0ne.com

Mar 28 '06 #1
3 1395
On Tue, 28 Mar 2006 10:01:50 -0800, <47*********@gm ail.com> wrote:
I recently did a test upgrade from MySQL 4 to 5.0.19, and most
everything seems to be working great. I also upgraded my PHP to 5.1.2
(and it's possible that the problem is in the PHP upgrade, not the
MySQL upgrade... but I need a place to start). Most everything seems
to be working fine in my testing, except a PHP-based MySQL-backed forum
-------------------------
Warning: mysql_connect() [function.mysql-connect]: Can't connect to
local MySQL server through socket '/tmp/mysql.sock' (13)


I assume you've tested that the MySQL daemon is actually running.

IIRC, PHP has linked into it an old MySQL client. If you're trying to
connect to MySQL using 'localhost', it's probably using the socket file
optimization instead of using TCP/IP. So the 4.0 client and the 5.0
server may have their socket files configured to different locations.

You can try to change your phpbb configuration to connect using the
hostname, instead of 'localhost'. That should force it to use TCP/IP
instead of the socket.

There are also problems using PHP to connec to MySQL 4.1+ because the
password encoding used by MySQL changed relative the old client. See
http://dev.mysql.com/doc/refman/5.0/en/old-client.html for more on the PHP
client issues with MySQL.

Regards,
Bill K.
Mar 28 '06 #2
> I assume you've tested that the MySQL daemon is actually
running.
Roger that. Other applications connect to it just fine.
IIRC, PHP has linked into it an old MySQL client. If you're
trying to connect to MySQL using 'localhost', it's probably
using the socket file optimization instead of using TCP/IP.
So the 4.0 client and the 5.0 server may have their socket
files configured to different locations.
Man, I had socket files and symlinks to socket files and symlinks to
symlinks to socket files. Did some housecleaning on that and made sure
php.ini and my.cnf pointed to the same socket file (per advice from
another forum).
You can try to change your phpbb configuration to connect
using the hostname, instead of 'localhost'. That should
force it to use TCP/IP instead of the socket.
Good call on that one, actually. I know nothing of this "socket file
optimization" (though I imagine this is an opportune time to learn),
but I do know that I would prefer TCP/IP since these various services
will eventually be split to multiple machines as load increases over
time.
There are also problems using PHP to connec to MySQL 4.1+
because the password encoding used by MySQL changed
relative the old client. See
http://dev.mysql.com/doc/refman/5.0/en/old-client.html for more
on the PHP client issues with MySQL.


Not a problem for me at the moment, but definitely something I should
learn. Thanks.

In any event, between you and a response on another forum, everything's
working like a charm now. Thanks a bunch!
Regards,
David P. Donahue
dd******@ccs.ne u.edu
http://www.cyber0ne.com

Mar 29 '06 #3
47*********@gma il.com wrote:
Good call on that one, actually. I know nothing of this "socket file
optimization" (though I imagine this is an opportune time to learn),
Here's a couple of articles to get you started:

http://en.wikipedia.org/wiki/Interprocess_communication
http://www.amk.ca/python/howto/sockets/
In any event, between you and a response on another forum, everything's
working like a charm now. Thanks a bunch!


Terrific! Glad to help.

Regards,
Bill K.
Mar 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
12171
by: Frank de Bot | last post by:
Hi, occasionaly I find in my apache logs that fastcgi had a broken pipe error with php running as fastcgi. the logs are like this: -- > (32)Broken pipe: > FastCGI: comm with server /opt/guide/ppi.searchy.net/cgi-bin/php.fcgi" > aborted: write failed > FastCGI: incomplete
2
3946
by: Dicky Cheng | last post by:
Hi, I am using .net remoting technology. I set up a .net remoting client and server in IIS. When the client calls the server, the server will run a long duration method (30-60seconds). I have a test on it that if the network broken at the time the client have already send the remoting request and waiting for the server, the client side will wait infinitely by default, even if i already set the executionTimeout to 90seconds in...
44
4224
by: Tolga | last post by:
As far as I know, Perl is known as "there are many ways to do something" and Python is known as "there is only one way". Could you please explain this? How is this possible and is it *really* a good concept?
2
1427
by: 47computers | last post by:
Maybe this is something simple, maybe I just don't see it... I recently did a test upgrade from PHP 4 to 5.1.2 on my Slackware 10.0 Linux box, and most everything seems to be working great. I also upgraded my MySQL 4 to 5.0.19 (and it's possible that the problem is in the MySQL upgrade, not the PHP upgrade... but I need a place to start). Most everything seems to be working fine in my testing, except a PHP-based MySQL-backed forum...
24
6140
by: Joe Salmeri | last post by:
I just upgraded from Python 2.4.2 to Python 2.5.1 and have found some unexpected behavior that appears to be a bug in the os.stat module. My OS is Windows XP SP2 + all updates. I have several programs that have worked flawlessly on all previous Python versions for years and they are now producing incorrect results in the code that uses os.stat. Searching through the 2.5.1 release notes I found the following:
25
4685
by: Norman Diamond | last post by:
I think the current version of _vsnwprintf_s is broken, in ordinary Windows. I'm not completely sure yet but it looks like this breakage is worse than previously known Windows CE breakage of StringCchPrintf. For Windows CE breakage of StringCchPrintf, since the %S format died instead of converting ANSI to Unicode, a workaround was to call MultiByteToWideChar and then use the %s format. For ordinary Windows breakage of _vsnwprintf_s,...
8
2007
by: Andy B | last post by:
I have the following code in a default.aspx web form page_load event. There seems to be a problem with line 5 (NewsArticle.Date = line). //create a news article NewsArticle NewsArticle = new NewsArticle(); NewsArticle.Body = "This is a test news article..."; NewsArticle.Title = "Testing XML";
9
1983
by: Lloyd Sheen | last post by:
Title says it all. I have reinstalled this "terrible" version of VS now 4 times and I am having trouble with why MS released this. I do a simple one line addition and it tells me thing are not sync'ed. Well sync them IDE. MS are you there?????? LS
2
1907
by: norseman | last post by:
Tim; Finally got a chance to test your snippet. Thank you for it! I took the liberty of flushing it out a bit. ================ #!/--- # import os import win32com.client
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10379
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9199
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3014
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.