Re: what is this? -- errno=2006 errmsg=Server gone

2006-04-17 Thread Martin Olsson



This is software I use:

D:\MDmysql --version
mysql  Ver 14.7 Distrib 4.1.12, for Win32 (ia32)

C:\Apache\Apache2\binApache.exe -v
Server version: Apache/2.0.54
Server built:   Apr 16 2005 14:25:31

C:\Apache\Apache2\binver
Microsoft Windows 2000 [Version 5.00.2195]


Exactly which parameters can I tweak to fix this error (i.e. errno=2006 
errmsg=Server gone)?? At this stage _any_ help/hint/guess would be 
really appreciated.




regards,
martin

Dilipkumar wrote:

Hi,

If this is related to mysql please let us know what version you are 
using (Mysql) and which OS.


This error can be fixed tunning your vaiables for mysql.

Martin Olsson wrote:


Hi,

I'm still struggling with the errno=2006 err=server is gone. I 
thought I could provide some more info if that makes the problem any 
more clear:


Basically, I'm uploading a file to a database. With no modifications 
to the form or the handler script it works on _some_ images and breaks 
on some. It's not a image size issue, I can happily upload some images 
larger than 2mb and it breaks on a 57kb image. Further I have examples 
of gif/jpg/png that works so it's not a file format issue either. The 
server runs locally (just as apache) and there is just one of them (no 
master/slave and/or replication stuff). I'm running everything on a 
win2k system with all service packs. I certainly wasn't shutting the 
server down at the moment and this error is 100% reprod on the 
specific files that break it.


---

Joerg Bruehe; you pointed out that: this message is issued if the 
client gets an error reported while sending a command to the server. 
How can I determine if this is in fact the case? And in particular, 
how can I get my hands on the exact error sent?


In general, is there any types of logging I can check and/or enable to 
further dig into the cause of this problem?



regards,
martin


Martin Olsson wrote:


Hi,

I get this weird error message:

ErrNo: 2006
Error: MySQL server has gone away.

What does it mean? I couldn't find anything useful on google and the 
error message isn't exactly verbose.. :)





regards,
martin








--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: what is this? -- errno=2006 errmsg=Server gone

2006-04-16 Thread Martin Olsson

Hi,

I'm still struggling with the errno=2006 err=server is gone. I thought 
I could provide some more info if that makes the problem any more clear:


Basically, I'm uploading a file to a database. With no modifications to 
the form or the handler script it works on _some_ images and breaks on 
some. It's not a image size issue, I can happily upload some images 
larger than 2mb and it breaks on a 57kb image. Further I have examples 
of gif/jpg/png that works so it's not a file format issue either. The 
server runs locally (just as apache) and there is just one of them (no 
master/slave and/or replication stuff). I'm running everything on a 
win2k system with all service packs. I certainly wasn't shutting the 
server down at the moment and this error is 100% reprod on the specific 
files that break it.


---

Joerg Bruehe; you pointed out that: this message is issued if the 
client gets an error reported while sending a command to the server. 
How can I determine if this is in fact the case? And in particular, how 
can I get my hands on the exact error sent?


In general, is there any types of logging I can check and/or enable to 
further dig into the cause of this problem?



regards,
martin


Martin Olsson wrote:

Hi,

I get this weird error message:

ErrNo: 2006
Error: MySQL server has gone away.

What does it mean? I couldn't find anything useful on google and the 
error message isn't exactly verbose.. :)





regards,
martin



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



what is this? -- errno=2006 errmsg=Server gone

2006-04-08 Thread Martin Olsson

Hi,

I get this weird error message:

ErrNo: 2006
Error: MySQL server has gone away.

What does it mean? I couldn't find anything useful on google and the 
error message isn't exactly verbose.. :)





regards,
martin

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



'ODBC'@'localhost' instead of 'root'@'invalid_hostname.com' ?!??

2005-08-21 Thread Martin Olsson

Hi,

I'm using PHP/MySQL to development a web-based application. I just 
upgraded both PHP and MySQL and I noticed that some of my MySQL calls 
are now broken and I don't see any easy way to fix them.


My script calls mysql_connect() and does very careful error checking. 
It's important that I can tell apart invalid hostname errors from say 
incorrect username/password errors. Previously, I did this by checking 
mysql_errno(), where 2003 would mean bad hostname and 1045 would 
indicate bad username/password.


In the latest PHP/MySQL bundle I downloaded this functionality changed 
though. In this new version, whenever I feed it with a invalid hostname 
it will fallback to localhost (where I actually have a database running) 
and then it will subsequently report a 1045 instead of a 2003.


Oddly enough, the exact error message (mysql_error) I get attached to 
this 1045 says; mysql_error()==


Access denied for user 'ODBC'@'localhost' (using password: NO)

Now, what is this about? I sure did not feed it with a username 'ODBC'. 
I do use Windows 2005 but how could ODBC possibly be related to this? (I 
assume ODBC means that [Microsoft?] database connection thing, I'm not 
sure exactly what is it; i've never used it). For the record, the actual 
username I specified in the call with the invalid hostname was root.


---

So, the question is how can I tell these errors apart?

Why is mysql_error() reporting back that it tried to connect to 
localhost as user ODBC when I asked it to connect to an invalid 
hostname as user root ?!?!




sincerly,
martin

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Circumventing the max_allowed_packet limit?

2005-01-28 Thread Martin Olsson
Hi MySQL ppl,
I recently ran into some problems with uploading large files through a 
HTML form and then putting these files into a MySQL BLOB field. I read 
about the server parameter max_allowed_packet which turned out to be the 
problem.

My script is going to be redistributed to it needs to run smoothly on 
many different servers. Therefore I'm now looking into ways of avoiding 
this problem, and I also want to avoid forcing the script users to 
reconfigure his MySQL server.

Now, my questions are:
Q1. Can I divide my query into several packets and thus insert the large 
BLOB without exceeding the max_allowed_packet limit?

Q2. I doodled around a little bit with the SET command and I was able to 
change the session version of the max_allowed_packet server parameter. 
The insert query still failed though, even if I did successfully execute 
the SET max_allowed_packet=16MB query and also double checked it with an 
extra select afterwards; and it had indeed changed. See the code below. 
The question is, is this is viable method? Is the local/session version 
of this variable just ignored by the server?


My code (for Q2):
$result = mysql_query(SELECT @@local.max_allowed_packet AS 
max_allowed_packet;);
$row = mysql_fetch_assoc($result);
echo max_allowed_packet= . $row['max_allowed_packet'] . \n;

$result = mysql_query(SET @@local.max_allowed_packet=1600;);
if (!$result) {
echo It did not work.  . mysql_errno() . :  . mysql_error() . \n;
}
$result = mysql_query(SELECT @@local.max_allowed_packet AS 
max_allowed_packet;);
$row = mysql_fetch_assoc($result);
echo max_allowed_packet= . $row['max_allowed_packet'] . \n;


mvh
martin
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Checking max_allowed_packet from PHP during runtime?

2005-01-26 Thread Martin Olsson
Hi MySQL gurus,
I'm using the LAMP stack and I'm currently creating a script that allows 
file uploading through a HTML form. The script itself is to be 
redistributed so I do not really know anything about the systems it runs 
on, except maybe that it's LAMP. I keep getting errors because I upload 
to large files, ie the files are larger than the MySQL servers 
max_allowed_packet parameter. I would like to check this value during 
runtime and take proper action. So;

How can I check the value of MySQLs max_allowed_packet parameter from a 
PHP script during runtime?

I tried this before:
?php
 connectToDatabase();
 $result = mysql_query(SHOW VARIABLES);
 $row = mysql_fetch_assoc($result);
 echo VALUE= . $row['max_allowed_packet'];
?
But this does not work, as SHOW VARIABLES seems to be console only; not 
a valid query.

How can I proceed?
regards,
martin
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Can I make empty MySQL use less disk space?

2004-06-13 Thread Martin Olsson
Hi,

I just noticed that the MySQL (win32) program which empty databases take 
up about 70Mb on my harddrive. I'm deploying MySQL as a part of a 
greater application (which is much smaller), is there any way I can 
reduce this size somewhat? I mean like, the examples, directory isnt 
really necessary is it? So which files can I exclude?


mvh.
/m
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Default accounts and custom installtion directory

2004-06-06 Thread Martin Olsson
Hi,
First, if I install MySQL on a win32 system which are the default 
account and from which hosts can those be accesses? Which of these 
accounts am I encouraged to remove or change the password of? I know 
that the root/ accounts needs to be changed but what else is there?

Secondly, if I move like to move the entire C:\mysql directory to some 
other disk, can I do so without re-installing? If I need to change to 
registry setting and/or .ini configuration file, what key/files are these?

Sincerly,
/m
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]