Re: Last established connection timestamp by a specific user

2017-10-10 Thread Singer Wang
Unfortunately not with the standard configuration.

You're best bet going forward would be to look at
MySQL Enterprise Audit -
https://www.mysql.com/products/enterprise/audit.html


On Tue, Oct 10, 2017 at 3:54 PM, Gone, Sajan <sg...@lb.com> wrote:

> Hi,
>
>We have a MySQL instance which is currently running on version
> `5.7.11-enterprise-commercial-advanced-log`.  On this instance I am
> trying to figure out the most recent timestamp at which a specific user has
> established a connection to this instance (or) performed any DML operations
> which might have changed the status of the database.
>
> Is there any way I can get such information from the 
> information_schema/performance_schema
> tables (or) from any of the mysql logs?
>
> Thank You,
> Sajan Gone
> Database Administrator.
>
> 
>
> Notice: This communication may contain privileged and/or confidential
> information. If you are not the intended recipient, please notify the
> sender by email, and immediately delete the message and any attachments
> without copying or disclosing them. LB may, for any reason, intercept,
> access, use, and disclose any information that is communicated by or
> through, or which is stored on, its networks, applications, services, and
> devices.
>


Last established connection timestamp by a specific user

2017-10-10 Thread Gone, Sajan
Hi,

   We have a MySQL instance which is currently running on version 
`5.7.11-enterprise-commercial-advanced-log`.  On this instance I am trying to 
figure out the most recent timestamp at which a specific user has established a 
connection to this instance (or) performed any DML operations which might have 
changed the status of the database.

Is there any way I can get such information from the 
information_schema/performance_schema tables (or) from any of the mysql logs?

Thank You,
Sajan Gone
Database Administrator.



Notice: This communication may contain privileged and/or confidential 
information. If you are not the intended recipient, please notify the sender by 
email, and immediately delete the message and any attachments without copying 
or disclosing them. LB may, for any reason, intercept, access, use, and 
disclose any information that is communicated by or through, or which is stored 
on, its networks, applications, services, and devices.


Re: Lost Connection Upon Loading Dump

2016-04-21 Thread Peter Brawley

On 4/21/2016 10:51, Stephen R Guglielmo wrote:

Hello,

I have a empty db that I'm trying to load a .sql file (created via
mysqldump) into. The dump has 791611 lines and is 807 MB. Loading the
dump is consistently failing at line 1763. Line 1763 is an INSERT
statement. The line is 95610 characters long.

The error is:
ERROR 2013 (HY000) at line 1763: Lost connection to MySQL server during query

About 40 tables are restored correctly from the dump prior to it
failing at this line.

Based on advice from posts I've found on the internet, I've added the
follow settings to my.cnf
net_read_timeout=60
# 16 MB
max_allowed_packet=16777216

I added these to both the [mysqld] and [mysqld_safe] sections to be
sure. I restarted mysqld, but still get the same error upon loading
the dump.

I'm not seeing anything in my error log (do I need to enable more
verbose error logging?).

MySQL Ver 14.12 Distrib 5.0.95, for redhat-linux-gnu (x86_64) using readline 5.1

I would appreciate any advice on figuring this out.


Slow: change the mysqldump params to turn off multiple inserts per
statement, and run the dump again.

Faster: grow the mysqldump net_buffer_length setting, and the mysqld setting of 
the same name, to accommodate the largest multiple insert. You may also have to 
grow max_allowed_packet.

PB

-




Thanks,
Steve




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



Lost Connection Upon Loading Dump

2016-04-21 Thread Stephen R Guglielmo
Hello,

I have a empty db that I'm trying to load a .sql file (created via
mysqldump) into. The dump has 791611 lines and is 807 MB. Loading the
dump is consistently failing at line 1763. Line 1763 is an INSERT
statement. The line is 95610 characters long.

The error is:
ERROR 2013 (HY000) at line 1763: Lost connection to MySQL server during query

About 40 tables are restored correctly from the dump prior to it
failing at this line.

Based on advice from posts I've found on the internet, I've added the
follow settings to my.cnf
net_read_timeout=60
# 16 MB
max_allowed_packet=16777216

I added these to both the [mysqld] and [mysqld_safe] sections to be
sure. I restarted mysqld, but still get the same error upon loading
the dump.

I'm not seeing anything in my error log (do I need to enable more
verbose error logging?).

MySQL Ver 14.12 Distrib 5.0.95, for redhat-linux-gnu (x86_64) using readline 5.1

I would appreciate any advice on figuring this out.

Thanks,
Steve

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



Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2014-01-08 Thread Manuel Arostegui
2014/1/7 h...@tbbs.net

  2014/01/06 17:07 +0100, Reindl Harald 
 what about look in the servers logfiles
 most likely max_allowed_packet laughable low
 
 Is this then, too, likly when the server and the client are the same
 machine?

 I left this out, that it only then happens when the client has been idle,
 and right afterwards the client repeats the request and all goes well. The
 message is no more than an irritatind break between request and fulfillment.

 Hello,

That happens when you're trying to re-use an existing connection which
wasn't properly closed and as you said, it's been idle. When you repeat the
operation, the thread is created again and thus everything goes normal.

Review the following variables

wait_timeout
net_write_timeout
net_read_timeout


Manu


Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2014-01-07 Thread hsv
 2014/01/06 17:07 +0100, Reindl Harald 
what about look in the servers logfiles
most likely max_allowed_packet laughable low 

Is this then, too, likly when the server and the client are the same machine?

I left this out, that it only then happens when the client has been idle, and 
right afterwards the client repeats the request and all goes well. The message 
is no more than an irritatind break between request and fulfillment.


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



ERROR 2013 (HY000): Lost connection to MySQL server during query

2014-01-06 Thread hsv
Now that I installed 5.6.14 on our Vista machine, when using mysql I often 
see that error-message, which under 5.5.8 I never saw. What is going on?


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



Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2014-01-06 Thread Reindl Harald


Am 06.01.2014 15:36, schrieb h...@tbbs.net:
 Now that I installed 5.6.14 on our Vista machine, when using mysql I often 
 see that error-message, which under 5.5.8 I never saw. What is going on?

what about look in the servers logfiles
most likely max_allowed_packet laughable low



signature.asc
Description: OpenPGP digital signature


Lost connection to MySQL server - need help.

2013-10-12 Thread Jørn Dahl-Stamnes
Hello,

I got a strange problem related to a production server. It has been working OK 
for months, but yesterday it start to fail. There are several batch scripts 
using the database in addition to a web application using it.

The php scripts running in batch mode began to get:

mysql_connect(): Lost connection to MySQL server at 'reading initial 
communication packet', system error: 111

I stopped the server and restarted it and everything seems to work OK for 
hours but when the load start to increase, the errors begin to appear again.

Today I noticed that after I starte phpMyAdmin and selected one of the 
databases, phpMyAdmin was hanging and the batch scripts began to fail again. 
Seems like the server does not handle much load anymore.


What's strange is the memory usage. The server is a quad core cpu with 48 Gb 
memory, where 28 Gb is allocated to innodb (we mostly use innodb). But when 
using top command, I noticed this:

VIRT: 33.9g
RES: 9.4g
SWAP: 23g

at this time over 11G memory is free. vm.swappiness is set to 0. I find it 
strange that the server is not able to use physical memory but use swap 
instead. The amount of cpu time used for swapping is rather high during sql 
queries. The amount of RESident memory may increase slowly over time but very 
slowly (it can take hours before it increase to 20+ Gb).

[PS: I also got a MySQL server running at a dedicated host at home, where the 
it seem to use the memory as I except it to use:

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  SWAP DATA COMMAND
 1462 mysql 20   0 30.0g  27g 3900 S  0.3 87.3   2633:14 844m  29g mysqld
]


I would like to have some suggestions what I can do to solve this problem.
I have google'd it but found nothing that seem to solve my case.

Server:
  OS: Debian 6
  MySQL: 5.1.61-0+squeeze1

my.cnf:
#
# The MySQL database server configuration file.
#

[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].
[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 = /database/mysql
tmpdir  = /tmp
language= /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address= 127.0.0.1
## All applications use 127.0.0.1 when connectiong to the db.

#
# * Fine Tuning
#
#key_buffer = 16M
max_allowed_packet  = 64M
thread_stack= 192K
#thread_cache_size   = 8

# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#
# * Query Cache Configuration
#
query_cache_limit   = 1M

#
# 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
expire_logs_days= 10
max_binlog_size = 100M
#binlog_do_db   = include_database_name
#binlog_ignore_db   = include_database_name
#
# * 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!

thread_cache_size = 192
table_cache = 768
## key_buffer = 64M
## sort_buffer_size = 256K
## read_buffer_size = 256K
## read_rnd_buffer_size = 256K
tmp_table_size=32M
max_heap_table_size=32M
query_cache_size=128M
query_cache_type=2

innodb_open_files=1000
innodb_buffer_pool_size = 28G
innodb_additional_mem_pool_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_support_xa = 0
innodb_lock_wait_timeout = 50
## innodb_flush_method=O_DIRECT
innodb_log_files_in_group = 2
## innodb_log_file_size = 128M
innodb_log_buffer_size = 8M
innodb_thread_concurrency = 14
innodb_file_per_table

max_connections = 100
binlog_cache_size   = 1M
sort_buffer_size= 16M
join_buffer_size= 16M
ft_min_word_len = 1
ft_max_word_len = 84
ft_stopword_file= ''
default_table_type  = InnoDB
key_buffer  = 2G
read_buffer_size= 2M
read_rnd_buffer_size= 16M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size   = 10G
myisam_max_extra_sort_file_size = 10G
myisam_repair_threads   = 1
myisam_recover

[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab

Re: Lost connection to MySQL server - need help.

2013-10-12 Thread nixofortune

You might want to comment

bind-address= 127.0.0.1

in your my.cnf and restart mysql server.



On 12/10/13 10:49, Jørn Dahl-Stamnes wrote:

Hello,

I got a strange problem related to a production server. It has been working OK
for months, but yesterday it start to fail. There are several batch scripts
using the database in addition to a web application using it.

The php scripts running in batch mode began to get:

mysql_connect(): Lost connection to MySQL server at 'reading initial
communication packet', system error: 111

I stopped the server and restarted it and everything seems to work OK for
hours but when the load start to increase, the errors begin to appear again.

Today I noticed that after I starte phpMyAdmin and selected one of the
databases, phpMyAdmin was hanging and the batch scripts began to fail again.
Seems like the server does not handle much load anymore.


What's strange is the memory usage. The server is a quad core cpu with 48 Gb
memory, where 28 Gb is allocated to innodb (we mostly use innodb). But when
using top command, I noticed this:

VIRT: 33.9g
RES: 9.4g
SWAP: 23g

at this time over 11G memory is free. vm.swappiness is set to 0. I find it
strange that the server is not able to use physical memory but use swap
instead. The amount of cpu time used for swapping is rather high during sql
queries. The amount of RESident memory may increase slowly over time but very
slowly (it can take hours before it increase to 20+ Gb).

[PS: I also got a MySQL server running at a dedicated host at home, where the
it seem to use the memory as I except it to use:

   PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  SWAP DATA COMMAND
  1462 mysql 20   0 30.0g  27g 3900 S  0.3 87.3   2633:14 844m  29g mysqld
]


I would like to have some suggestions what I can do to solve this problem.
I have google'd it but found nothing that seem to solve my case.

Server:
   OS: Debian 6
   MySQL: 5.1.61-0+squeeze1

my.cnf:
#
# The MySQL database server configuration file.
#

[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].
[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 = /database/mysql
tmpdir  = /tmp
language= /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address= 127.0.0.1
## All applications use 127.0.0.1 when connectiong to the db.

#
# * Fine Tuning
#
#key_buffer = 16M
max_allowed_packet  = 64M
thread_stack= 192K
#thread_cache_size   = 8

# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#
# * Query Cache Configuration
#
query_cache_limit   = 1M

#
# 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
expire_logs_days= 10
max_binlog_size = 100M
#binlog_do_db   = include_database_name
#binlog_ignore_db   = include_database_name
#
# * 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!

thread_cache_size = 192
table_cache = 768
## key_buffer = 64M
## sort_buffer_size = 256K
## read_buffer_size = 256K
## read_rnd_buffer_size = 256K
tmp_table_size=32M
max_heap_table_size=32M
query_cache_size=128M
query_cache_type=2

innodb_open_files=1000
innodb_buffer_pool_size = 28G
innodb_additional_mem_pool_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_support_xa = 0
innodb_lock_wait_timeout = 50
## innodb_flush_method=O_DIRECT
innodb_log_files_in_group = 2
## innodb_log_file_size = 128M
innodb_log_buffer_size = 8M
innodb_thread_concurrency = 14
innodb_file_per_table

max_connections = 100
binlog_cache_size   = 1M
sort_buffer_size= 16M
join_buffer_size= 16M
ft_min_word_len = 1
ft_max_word_len = 84
ft_stopword_file= ''
default_table_type  = InnoDB
key_buffer  = 2G
read_buffer_size= 2M
read_rnd_buffer_size= 16M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size   = 10G
myisam_max_extra_sort_file_size = 10G
myisam_repair_threads

Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Jørn Dahl-Stamnes
 11:53:33 cebycny mysqld: Connection ID (thread ID): 92
Oct 12 11:53:33 cebycny mysqld: Status: NOT_KILLED
Oct 12 11:53:33 cebycny mysqld:
Oct 12 11:53:33 cebycny mysqld: The manual page at 
http://dev.mysql.com/doc/mysql/en/crashing.html contains
Oct 12 11:53:33 cebycny mysqld: information that should help you find out what 
is causing the crash.
Oct 12 11:53:33 cebycny mysqld_safe: Number of processes running now: 0
Oct 12 11:53:33 cebycny mysqld_safe: mysqld restarted

-- 
Jørn Dahl-Stamnes
homepage: http://photo.dahl-stamnes.net/

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



Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Andrew Moore
:33 cebycny mysqld:
 Oct 12 11:53:33 cebycny mysqld: Trying to get some variables.
 Oct 12 11:53:33 cebycny mysqld: Some pointers may be invalid and cause the
 dump to abort.
 Oct 12 11:53:33 cebycny mysqld: Query (7f7f1c0dcbc0): SHOW CREATE TABLE
 `calculation`
 Oct 12 11:53:33 cebycny mysqld: Connection ID (thread ID): 92
 Oct 12 11:53:33 cebycny mysqld: Status: NOT_KILLED
 Oct 12 11:53:33 cebycny mysqld:
 Oct 12 11:53:33 cebycny mysqld: The manual page at
 http://dev.mysql.com/doc/mysql/en/crashing.html contains
 Oct 12 11:53:33 cebycny mysqld: information that should help you find out
 what
 is causing the crash.
 Oct 12 11:53:33 cebycny mysqld_safe: Number of processes running now: 0
 Oct 12 11:53:33 cebycny mysqld_safe: mysqld restarted

 --
 Jørn Dahl-Stamnes
 homepage: http://photo.dahl-stamnes.net/

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




Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Jørn Dahl-Stamnes
On Saturday 12 October 2013 13:07, Andrew Moore wrote:
 Could be a crash related to innodb data dictionary being out of sync. Could
 be a bug.

Seems like a bug yes. However, we had a strange situation yesterday when we 
had several processes in the state copying to tmp table (if i remember the 
exact phrase). After witing 2 seconds, I restarted the server. It seemed 
to work OK until the backup started.

Perhaps we should restore the database that I suspect cause this, in order to 
rebuild the complete database.

-- 
Jørn Dahl-Stamnes
homepage: http://photo.dahl-stamnes.net/

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



Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Reindl Harald


Am 12.10.2013 17:02, schrieb Jørn Dahl-Stamnes:
 On Saturday 12 October 2013 13:07, Andrew Moore wrote:
 Could be a crash related to innodb data dictionary being out of sync. Could
 be a bug.
 
 Seems like a bug yes. However, we had a strange situation yesterday when we 
 had several processes in the state copying to tmp table (if i remember the 
 exact phrase). After witing 2 seconds, I restarted the server. It seemed 
 to work OK until the backup started

so someone did optimize table on a large table
you do yourself not a favour restarting the server in such a moment



signature.asc
Description: OpenPGP digital signature


Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Jørn Dahl-Stamnes
On Saturday 12 October 2013 17:36, Reindl Harald wrote:
 so someone did optimize table on a large table
 you do yourself not a favour restarting the server in such a moment

7 hours before the server was shut down, we did a alter table to add a primary 
key to a table that is read-only from the web application.

-- 
Jørn Dahl-Stamnes
homepage: http://photo.dahl-stamnes.net/

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



Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Reindl Harald


Am 12.10.2013 19:45, schrieb Jørn Dahl-Stamnes:
 On Saturday 12 October 2013 17:36, Reindl Harald wrote:
 so someone did optimize table on a large table
 you do yourself not a favour restarting the server in such a moment
 
 7 hours before the server was shut down, we did a alter table to add a 
 primary 
 key to a table that is read-only from the web application.

which means the table is most likely completly copied
in a temp file and depending on the table size this
takes time - you killed the alter table i guess



signature.asc
Description: OpenPGP digital signature


Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Chris McKeever
We had a similar issue a bit back - and although it sounds similar - based
on your followups it probably isnt, but will just toss this out there
anyhows.  We were experiencing connection timeouts when load would ramp up.
 Doing some digging we learned that our firewall between the servers
bandwidth would get consumed by a large wordpress load - and this in
essence backed up the rest of the requests until they timed out.

We fixed that load issue which reduced the data passing through and have
expereinced a significant performance boost in our app let alone reduction
of these timeout issues




On Sat, Oct 12, 2013 at 12:56 PM, Reindl Harald h.rei...@thelounge.netwrote:



 Am 12.10.2013 19:45, schrieb Jørn Dahl-Stamnes:
  On Saturday 12 October 2013 17:36, Reindl Harald wrote:
  so someone did optimize table on a large table
  you do yourself not a favour restarting the server in such a moment
 
  7 hours before the server was shut down, we did a alter table to add a
 primary
  key to a table that is read-only from the web application.

 which means the table is most likely completly copied
 in a temp file and depending on the table size this
 takes time - you killed the alter table i guess




Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Reindl Harald
sounds like a scheduler issue

did you try deadline?
http://en.wikipedia.org/wiki/Deadline_scheduler

on Linux systems pass elevator=deadline as kernel param

Am 12.10.2013 20:58, schrieb Chris McKeever:
 We had a similar issue a bit back - and although it sounds similar - based
 on your followups it probably isnt, but will just toss this out there
 anyhows.  We were experiencing connection timeouts when load would ramp up.
  Doing some digging we learned that our firewall between the servers
 bandwidth would get consumed by a large wordpress load - and this in
 essence backed up the rest of the requests until they timed out.
 
 We fixed that load issue which reduced the data passing through and have
 expereinced a significant performance boost in our app let alone reduction
 of these timeout issues
 
 On Sat, Oct 12, 2013 at 12:56 PM, Reindl Harald h.rei...@thelounge.netwrote:
 


 Am 12.10.2013 19:45, schrieb Jørn Dahl-Stamnes:
 On Saturday 12 October 2013 17:36, Reindl Harald wrote:
 so someone did optimize table on a large table
 you do yourself not a favour restarting the server in such a moment

 7 hours before the server was shut down, we did a alter table to add a
 primary
 key to a table that is read-only from the web application.

 which means the table is most likely completly copied
 in a temp file and depending on the table size this
 takes time - you killed the alter table i guess




signature.asc
Description: OpenPGP digital signature


connection issue

2013-08-09 Thread Ed L.


This mysql newbie is having trouble connecting to a mysqld instance, 
hoping someone can offer a clue on troubleshooting.


I have 2 mysql 5.0.45 installations on one RHEL server.  One live mysqld 
is setup in what appears to be a relatively standard installation, port 
3306, user 'mysql', etc.  I've set up the other mysqld to run tests on a 
non-standard port 5045, user 'testsql', different data root, config, 
logs, etc.


When I attempt to connect to the mysqld running on port 5045 from the 
command-line mysql client on the same host as follows ...


# mysql -P 5045

... it seems I'm actually connecting to the live server on 3306 because 
'show databases' shows the live databases.  How can I troubleshoot this 
best?


Thanks.



Re: connection issue

2013-08-09 Thread Claudio Nanni

Hi,


# mysql -P 5045


Add -h127.0.0.1

# mysql -P5045 -h127.0.0.1

Cheers

--
Claudio


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



Re: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread spameden
2013/3/24 Reindl Harald h.rei...@thelounge.net



 Am 24.03.2013 05:20, schrieb spameden:
  2013/3/19 Rick James rja...@yahoo-inc.com:
  you never have hosted a large site
  Check my email address before saying that.
 
  :D

 as said, big company does not have only geniusses


I do not judge only on 1 parameter, Rick has been constantly helping here
and I'm pretty sure he has more knowledge on MySQL than you.



  20 may be low, but 100 is rather high.
  Never use apache2 it has so many problems under load..

 if you are too supid to configure it yes


Ever heard about Slow HTTP DoS attack?



  The best combo is php5-fpm+nginx.
  Handles loads of users at once if well tuned

 Apache 2.4 handles the load of 600 parallel executed
 php-scripts from our own CMS-system


Nginx serves static content way better than apache2 (did few benchmarks
already).

nginx+php5-fpm handles better load than apache2-prefork+mod_php

you can google benchmarks if you dont trust me

also nginx eats much less memory than apache2

php5-fpm can be tuned as well to suit your needs if you have lots of
dynamic content


 maybe you guys should learn what a opcode-cache is and
 how to compile and optimize software (binaries and config)

 o'rly?


Re: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Reindl Harald


Am 02.04.2013 16:09, schrieb spameden:
 2013/3/24 Reindl Harald h.rei...@thelounge.net 
 mailto:h.rei...@thelounge.net

 Am 24.03.2013 05:20, schrieb spameden:
  2013/3/19 Rick James rja...@yahoo-inc.com 
 mailto:rja...@yahoo-inc.com:
  you never have hosted a large site
  Check my email address before saying that.
 
  :D
 
 as said, big company does not have only geniusses

 I do not judge only on 1 parameter, Rick has been constantly helping here and 
 I'm pretty sure he has more knowledge
 on MySQL than you.

but the MySQL knowledge alone is not enough in context of a webserver
not to say irrelevant

  20 may be low, but 100 is rather high.
  Never use apache2 it has so many problems under load..
 
 if you are too supid to configure it yes
 
 Ever heard about Slow HTTP DoS attack?

my config says yes as i heard about many things because it is my daily job

0 0 LOGtcp  --  eth0   *  !local-network/24  
0.0.0.0/0multiport dports
80,443 tcpflags: 0x17/0x02 #conn src/32  50 limit: avg 100/hour burst 5 LOG 
flags 0 level 7 prefix Firewall
Slowloris: 
0 0 DROP   tcp  --  eth0   *  !local-network/24  
0.0.0.0/0multiport dports
80,443 tcpflags: 0x17/0x02 #conn src/32  50



signature.asc
Description: OpenPGP digital signature


Re: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Reindl Harald


Am 02.04.2013 22:56, schrieb Rick James:
 I hear that nginx is very fast for a certain class of web serving.  

yes

 But what happens if a web page needs to do a SELECT?  

what should happen?

 Is nginx single-threaded, thereby sitting idle waiting for the SELECT? 

why should it do that?

 And, should you run 8 nginx web servers on an 8-core box?

why should you do that?

http://en.wikipedia.org/wiki/Nginx
nginx uses an asynchronous event-driven approach to handling requests

 -Original Message-
 From: spameden [mailto:spame...@gmail.com]
 Sent: Tuesday, April 02, 2013 7:10 AM
 To: Reindl Harald
 Cc: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.

 2013/3/24 Reindl Harald h.rei...@thelounge.net



 Am 24.03.2013 05:20, schrieb spameden:
 2013/3/19 Rick James rja...@yahoo-inc.com:
 you never have hosted a large site
 Check my email address before saying that.

 :D

 as said, big company does not have only geniusses


 I do not judge only on 1 parameter, Rick has been constantly helping
 here and I'm pretty sure he has more knowledge on MySQL than you.



 20 may be low, but 100 is rather high.
 Never use apache2 it has so many problems under load..

 if you are too supid to configure it yes


 Ever heard about Slow HTTP DoS attack?



 The best combo is php5-fpm+nginx.
 Handles loads of users at once if well tuned

 Apache 2.4 handles the load of 600 parallel executed php-scripts from
 our own CMS-system


 Nginx serves static content way better than apache2 (did few benchmarks
 already).

 nginx+php5-fpm handles better load than apache2-prefork+mod_php

 you can google benchmarks if you dont trust me

 also nginx eats much less memory than apache2

 php5-fpm can be tuned as well to suit your needs if you have lots of
 dynamic content


 maybe you guys should learn what a opcode-cache is and how to compile
 and optimize software (binaries and config)

 o'rly?



signature.asc
Description: OpenPGP digital signature


RE: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Rick James
(Thanks for the comment, spameden.)
Well, I was going to drop the thread, but he baited me.  I _do_ know something 
about web serving...

Should I recount the number of times I have traced a database meltdown back to 
MaxClients being too big?  They are _ugly_ meltdowns -- hundreds of 
point-queries stumbling over themselves, flooding the slowlog with queries that 
should never take more than milliseconds.  More and more db requests come in, 
non finishing, thereby stalling the web server threads, etc.

Another point to make -- once a web server (Apache or...) has saturated the CPU 
(or other shared resource), there is really no advantage, only disadvantage, in 
starting more web pages.  The will simply contend for the saturated resource, 
thereby slowing down _all_ threads.  It is better (at this point) to queue up 
(or drop) further requests, thereby giving the CPU a chance to actually finish 
something.

Yet another point...  If
   [ SUM(MaxClients) over the web servers you have ] 
   [ SUM(max_connections) over the Slaves ],
then you are threatening to have mysql refuse connections; this probably leads 
to broken web pages, maybe even 404s or 500s.  Granted, you have (at least) 3 
choices: decrease MaxClients, increase max_connections, or add more Slaves.  If 
mysql has most of max_connections _actively_ running querieds, then it is 
probably stumbling badly, so I vote against increasing that.  Adding a Slave 
cannot be done 'instantly'.  That leaves decreasing MaxClients, which is quick 
and easy.  Furthermore, the SE (in one of the meltdowns) killed Apache; this 
led to a prompt clear up of all the issues -- poor web response, mysql melting 
down, etc.

Sometimes less is better!

 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Tuesday, April 02, 2013 8:29 AM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.
 
 
 
 Am 02.04.2013 16:09, schrieb spameden:
  2013/3/24 Reindl Harald h.rei...@thelounge.net
  mailto:h.rei...@thelounge.net
 
  Am 24.03.2013 05:20, schrieb spameden:
   2013/3/19 Rick James rja...@yahoo-inc.com
 mailto:rja...@yahoo-inc.com:
   you never have hosted a large site
   Check my email address before saying that.
  
   :D
 
  as said, big company does not have only geniusses
 
  I do not judge only on 1 parameter, Rick has been constantly helping
  here and I'm pretty sure he has more knowledge on MySQL than you.
 
 but the MySQL knowledge alone is not enough in context of a webserver
 not to say irrelevant
 
   20 may be low, but 100 is rather high.
   Never use apache2 it has so many problems under load..
 
  if you are too supid to configure it yes
 
  Ever heard about Slow HTTP DoS attack?
 
 my config says yes as i heard about many things because it is my daily
 job
 
 0 0 LOGtcp  --  eth0   *  !local-network/24
 0.0.0.0/0multiport dports
 80,443 tcpflags: 0x17/0x02 #conn src/32  50 limit: avg 100/hour burst
 5 LOG flags 0 level 7 prefix Firewall
 Slowloris: 
 0 0 DROP   tcp  --  eth0   *  !local-network/24
 0.0.0.0/0multiport dports
 80,443 tcpflags: 0x17/0x02 #conn src/32  50


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



Re: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Reindl Harald


Am 02.04.2013 23:15, schrieb Rick James:
 SELECT is not performed in the same thread as nginx; it is performed in 
 another process, or even (in big web setups) in a different host.  Therefore, 
 nginx would be in some form of wait state, thereby not really using the CPU.

tell me something new

 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Tuesday, April 02, 2013 2:00 PM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.



 Am 02.04.2013 22:56, schrieb Rick James:
 I hear that nginx is very fast for a certain class of web serving.

 yes

 But what happens if a web page needs to do a SELECT?

 what should happen?

 Is nginx single-threaded, thereby sitting idle waiting for the
 SELECT?

 why should it do that?

 And, should you run 8 nginx web servers on an 8-core box?

 why should you do that?

 http://en.wikipedia.org/wiki/Nginx
 nginx uses an asynchronous event-driven approach to handling requests

 -Original Message-
 From: spameden [mailto:spame...@gmail.com]
 Sent: Tuesday, April 02, 2013 7:10 AM
 To: Reindl Harald
 Cc: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.

 2013/3/24 Reindl Harald h.rei...@thelounge.net



 Am 24.03.2013 05:20, schrieb spameden:
 2013/3/19 Rick James rja...@yahoo-inc.com:
 you never have hosted a large site
 Check my email address before saying that.

 :D

 as said, big company does not have only geniusses


 I do not judge only on 1 parameter, Rick has been constantly helping
 here and I'm pretty sure he has more knowledge on MySQL than you.



 20 may be low, but 100 is rather high.
 Never use apache2 it has so many problems under load..

 if you are too supid to configure it yes


 Ever heard about Slow HTTP DoS attack?



 The best combo is php5-fpm+nginx.
 Handles loads of users at once if well tuned

 Apache 2.4 handles the load of 600 parallel executed php-scripts
 from our own CMS-system


 Nginx serves static content way better than apache2 (did few
 benchmarks already).

 nginx+php5-fpm handles better load than apache2-prefork+mod_php

 you can google benchmarks if you dont trust me

 also nginx eats much less memory than apache2

 php5-fpm can be tuned as well to suit your needs if you have lots of
 dynamic content


 maybe you guys should learn what a opcode-cache is and how to
 compile and optimize software (binaries and config)

 o'rly?



signature.asc
Description: OpenPGP digital signature


RE: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Rick James
SELECT is not performed in the same thread as nginx; it is performed in another 
process, or even (in big web setups) in a different host.  Therefore, nginx 
would be in some form of wait state, thereby not really using the CPU.

 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Tuesday, April 02, 2013 2:00 PM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.
 
 
 
 Am 02.04.2013 22:56, schrieb Rick James:
  I hear that nginx is very fast for a certain class of web serving.
 
 yes
 
  But what happens if a web page needs to do a SELECT?
 
 what should happen?
 
  Is nginx single-threaded, thereby sitting idle waiting for the
 SELECT?
 
 why should it do that?
 
  And, should you run 8 nginx web servers on an 8-core box?
 
 why should you do that?
 
 http://en.wikipedia.org/wiki/Nginx
 nginx uses an asynchronous event-driven approach to handling requests
 
  -Original Message-
  From: spameden [mailto:spame...@gmail.com]
  Sent: Tuesday, April 02, 2013 7:10 AM
  To: Reindl Harald
  Cc: mysql@lists.mysql.com
  Subject: Re: How to change max simultaneous connection parameter in
  mysql.
 
  2013/3/24 Reindl Harald h.rei...@thelounge.net
 
 
 
  Am 24.03.2013 05:20, schrieb spameden:
  2013/3/19 Rick James rja...@yahoo-inc.com:
  you never have hosted a large site
  Check my email address before saying that.
 
  :D
 
  as said, big company does not have only geniusses
 
 
  I do not judge only on 1 parameter, Rick has been constantly helping
  here and I'm pretty sure he has more knowledge on MySQL than you.
 
 
 
  20 may be low, but 100 is rather high.
  Never use apache2 it has so many problems under load..
 
  if you are too supid to configure it yes
 
 
  Ever heard about Slow HTTP DoS attack?
 
 
 
  The best combo is php5-fpm+nginx.
  Handles loads of users at once if well tuned
 
  Apache 2.4 handles the load of 600 parallel executed php-scripts
  from our own CMS-system
 
 
  Nginx serves static content way better than apache2 (did few
  benchmarks already).
 
  nginx+php5-fpm handles better load than apache2-prefork+mod_php
 
  you can google benchmarks if you dont trust me
 
  also nginx eats much less memory than apache2
 
  php5-fpm can be tuned as well to suit your needs if you have lots of
  dynamic content
 
 
  maybe you guys should learn what a opcode-cache is and how to
  compile and optimize software (binaries and config)
 
  o'rly?


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



RE: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Rick James
I hear that nginx is very fast for a certain class of web serving.  But what 
happens if a web page needs to do a SELECT?  Is nginx single-threaded, thereby 
sitting idle waiting for the SELECT?  And, should you run 8 nginx web servers 
on an 8-core box?

 -Original Message-
 From: spameden [mailto:spame...@gmail.com]
 Sent: Tuesday, April 02, 2013 7:10 AM
 To: Reindl Harald
 Cc: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.
 
 2013/3/24 Reindl Harald h.rei...@thelounge.net
 
 
 
  Am 24.03.2013 05:20, schrieb spameden:
   2013/3/19 Rick James rja...@yahoo-inc.com:
   you never have hosted a large site
   Check my email address before saying that.
  
   :D
 
  as said, big company does not have only geniusses
 
 
 I do not judge only on 1 parameter, Rick has been constantly helping
 here and I'm pretty sure he has more knowledge on MySQL than you.
 
 
 
   20 may be low, but 100 is rather high.
   Never use apache2 it has so many problems under load..
 
  if you are too supid to configure it yes
 
 
 Ever heard about Slow HTTP DoS attack?
 
 
 
   The best combo is php5-fpm+nginx.
   Handles loads of users at once if well tuned
 
  Apache 2.4 handles the load of 600 parallel executed php-scripts from
  our own CMS-system
 
 
 Nginx serves static content way better than apache2 (did few benchmarks
 already).
 
 nginx+php5-fpm handles better load than apache2-prefork+mod_php
 
 you can google benchmarks if you dont trust me
 
 also nginx eats much less memory than apache2
 
 php5-fpm can be tuned as well to suit your needs if you have lots of
 dynamic content
 
 
  maybe you guys should learn what a opcode-cache is and how to compile
  and optimize software (binaries and config)
 
  o'rly?

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



Re: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread spameden
2013/4/3 Rick James rja...@yahoo-inc.com

 SELECT is not performed in the same thread as nginx; it is performed in
 another process, or even (in big web setups) in a different host.
  Therefore, nginx would be in some form of wait state, thereby not really
 using the CPU.


ofc select is not performed in nginx thread, nginx acts as a proxying
server and just passes the request to the backend

it's entirely depends on your backend how fast it's gonna process certain
SELECT and ofc depends on what kind of database you've got

if backend takes too long to respond nginx just shows 502 error with
timeout from backend (by default: 30s).

good practice is to have multiple backends behind load balancer, so under
huge load no single request would be lost.



  -Original Message-
  From: Reindl Harald [mailto:h.rei...@thelounge.net]
  Sent: Tuesday, April 02, 2013 2:00 PM
  To: mysql@lists.mysql.com
  Subject: Re: How to change max simultaneous connection parameter in
  mysql.
 
 
 
  Am 02.04.2013 22:56, schrieb Rick James:
   I hear that nginx is very fast for a certain class of web serving.
 
  yes
 
   But what happens if a web page needs to do a SELECT?
 
  what should happen?
 
   Is nginx single-threaded, thereby sitting idle waiting for the
  SELECT?


nginx is multi threaded and it supports SMP architecture, there is main
process which controls everything and nginx configuration can be reloaded
with zero downtime.

I saw multiple test where under load (simple DDoS simulation attack like
there where 40k bots hitting the site at once) nginx+php5-fpm dropped much
less requests than apache2 + mod_php.

apache2 is so bad at eating memory and system resources.


 
  why should it do that?
 
   And, should you run 8 nginx web servers on an 8-core box?


no, you just tune

worker_processes 8;


  why should you do that?
 
  http://en.wikipedia.org/wiki/Nginx
  nginx uses an asynchronous event-driven approach to handling requests
 
   -Original Message-
   From: spameden [mailto:spame...@gmail.com]
   Sent: Tuesday, April 02, 2013 7:10 AM
   To: Reindl Harald
   Cc: mysql@lists.mysql.com
   Subject: Re: How to change max simultaneous connection parameter in
   mysql.
  
   2013/3/24 Reindl Harald h.rei...@thelounge.net
  
  
  
   Am 24.03.2013 05:20, schrieb spameden:
   2013/3/19 Rick James rja...@yahoo-inc.com:
   you never have hosted a large site
   Check my email address before saying that.
  
   :D
  
   as said, big company does not have only geniusses
  
  
   I do not judge only on 1 parameter, Rick has been constantly helping
   here and I'm pretty sure he has more knowledge on MySQL than you.
  
  
  
   20 may be low, but 100 is rather high.
   Never use apache2 it has so many problems under load..
  
   if you are too supid to configure it yes
  
  
   Ever heard about Slow HTTP DoS attack?
  
  
  
   The best combo is php5-fpm+nginx.
   Handles loads of users at once if well tuned
  
   Apache 2.4 handles the load of 600 parallel executed php-scripts
   from our own CMS-system
  
  
   Nginx serves static content way better than apache2 (did few
   benchmarks already).
  
   nginx+php5-fpm handles better load than apache2-prefork+mod_php
  
   you can google benchmarks if you dont trust me
  
   also nginx eats much less memory than apache2
  
   php5-fpm can be tuned as well to suit your needs if you have lots of
   dynamic content
  
  
   maybe you guys should learn what a opcode-cache is and how to
   compile and optimize software (binaries and config)
  
   o'rly?


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




Re: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Reindl Harald


Am 02.04.2013 23:14, schrieb Rick James:
 (Thanks for the comment, spameden.)
 Well, I was going to drop the thread, but he baited me.  I _do_ know 
 something about web serving...

maybe

 Should I recount the number of times I have traced a database meltdown back 
 to MaxClients being too big?  They are _ugly_ meltdowns -- hundreds of 
 point-queries stumbling over themselves, flooding the slowlog with queries 
 that should never take more than milliseconds.  More and more db requests 
 come in, non finishing, thereby stalling the web server threads, etc.

been there, done that
it is a matter of the application design to avoid deadlocks in such cases

 Another point to make -- once a web server (Apache or...) has saturated the 
 CPU (or other shared resource), there is really no advantage, only 
 disadvantage, in starting more web pages.  The will simply contend for the 
 saturated resource, thereby slowing down _all_ threads.  It is better (at 
 this point) to queue up (or drop) further requests, thereby giving the CPU a 
 chance to actually finish something.

but with 20-100 requests a webserver these days is NOT saturated
MaxClients 20 is laughable

i had a high trafic site with MaxClients set to 500, driven with our CMS-system
teh CPU load was at 80% and the page got damned slow because you have to wait
before your images could be loaded

after raise MacClients to 600 it ran smooth, the CPU was around 85%
again: 20-100 MaxClients is laughable and only suiteable for a
dedicated, low-powered machine hosting only one domain

 Yet another point...  If
[ SUM(MaxClients) over the web servers you have ] 
[ SUM(max_connections) over the Slaves ],
 then you are threatening to have mysql refuse connections

no, my db-layer is traing again for some times and the chance to get a free slot
because other workers are serving images is proven in practice damned high


 
 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Tuesday, April 02, 2013 8:29 AM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.



 Am 02.04.2013 16:09, schrieb spameden:
 2013/3/24 Reindl Harald h.rei...@thelounge.net
 mailto:h.rei...@thelounge.net

 Am 24.03.2013 05:20, schrieb spameden:
  2013/3/19 Rick James rja...@yahoo-inc.com
 mailto:rja...@yahoo-inc.com:
  you never have hosted a large site
  Check my email address before saying that.
 
  :D

 as said, big company does not have only geniusses

 I do not judge only on 1 parameter, Rick has been constantly helping
 here and I'm pretty sure he has more knowledge on MySQL than you.

 but the MySQL knowledge alone is not enough in context of a webserver
 not to say irrelevant

  20 may be low, but 100 is rather high.
  Never use apache2 it has so many problems under load..

 if you are too supid to configure it yes

 Ever heard about Slow HTTP DoS attack?

 my config says yes as i heard about many things because it is my daily
 job

 0 0 LOGtcp  --  eth0   *  !local-network/24
 0.0.0.0/0multiport dports
 80,443 tcpflags: 0x17/0x02 #conn src/32  50 limit: avg 100/hour burst
 5 LOG flags 0 level 7 prefix Firewall
 Slowloris: 
 0 0 DROP   tcp  --  eth0   *  !local-network/24
 0.0.0.0/0multiport dports
 80,443 tcpflags: 0x17/0x02 #conn src/32  50



signature.asc
Description: OpenPGP digital signature


Re: How to change max simultaneous connection parameter in mysql.

2013-03-24 Thread Reindl Harald


Am 24.03.2013 05:20, schrieb spameden:
 2013/3/19 Rick James rja...@yahoo-inc.com:
 you never have hosted a large site
 Check my email address before saying that.
 
 :D

as said, big company does not have only geniusses

 20 may be low, but 100 is rather high.
 Never use apache2 it has so many problems under load..

if you are too supid to configure it yes

 The best combo is php5-fpm+nginx.
 Handles loads of users at once if well tuned

Apache 2.4 handles the load of 600 parallel executed
php-scripts from our own CMS-system

maybe you guys should learn what a opcode-cache is and
how to compile and optimize software (binaries and config)



signature.asc
Description: OpenPGP digital signature


Re: How to change max simultaneous connection parameter in mysql.

2013-03-24 Thread Manuel Arostegui
2013/3/24 Reindl Harald h.rei...@thelounge.net



 Am 24.03.2013 05:20, schrieb spameden:
  2013/3/19 Rick James rja...@yahoo-inc.com:
  you never have hosted a large site
  Check my email address before saying that.
 
  :D

 as said, big company does not have only geniusses

  20 may be low, but 100 is rather high.
  Never use apache2 it has so many problems under load..

 if you are too supid to configure it yes

  The best combo is php5-fpm+nginx.
  Handles loads of users at once if well tuned

 Apache 2.4 handles the load of 600 parallel executed
 php-scripts from our own CMS-system

 maybe you guys should learn what a opcode-cache is and
 how to compile and optimize software (binaries and config)


And maybe you should learn some good manners.


Re: How to change max simultaneous connection parameter in mysql.

2013-03-23 Thread spameden
2013/3/19 Rick James rja...@yahoo-inc.com:
 you never have hosted a large site
 Check my email address before saying that.

:D


 20 may be low, but 100 is rather high.

Never use apache2 it has so many problems under load..

The best combo is php5-fpm+nginx.

Handles loads of users at once if well tuned.


 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Monday, March 18, 2013 1:36 PM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.



 Am 18.03.2013 21:01, schrieb Rick James:
  20 is plenty if your pages run fast enough

 it is not
 you never have hosted a large site

  Excess clients after MaxClients are queued in Apache

 so what - it doe snot help you
 been there, done that

 if you have some hundret USERS at the same time any every of them is
 requesting the same page with a lot of images you are simply DEAD with
 a limit of
 20 in your configuration

  If the 20 are consuming resources (eg cpu/disk) it is better to queue
  the excess than to have everybody stumbling over each other.

 if your server can not serve more than 20 simultaionous requests you
 are not doing any serious things

 sorry, 20 can be done with any crappy notebook these days

  In MySQL, the excess clients beyond max_connections are give an
 error.
 
  -Original Message-
  From: Reindl Harald [mailto:h.rei...@thelounge.net]
  Sent: Monday, March 18, 2013 12:15 PM
  To: mysql@lists.mysql.com
  Subject: Re: How to change max simultaneous connection parameter in
  mysql.
 
 
 
  Am 18.03.2013 19:26, schrieb Rick James:
  If you are running Apache with MaxClients set too high, that can
  cause the problem.
 
  too high is relative
 
  That Apache setting should be something like 20.  (Other web
 servers
  have similar settings.)
 
  20 is a laughable value as long you are not hosting only sites with
  no users at all
 
  i have seen MaxClients 500 be critical while the hardware was not
  overloaded and we had THOUSANDS of users which liked to get the
  website with all it's images, no way with stupid settings of 20
 which
  means only ONE USER at the same time can fetch a single page with
  images and stylesheets


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


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



Re: How to change max simultaneous connection parameter in mysql.

2013-03-19 Thread Reindl Harald


Am 19.03.2013 01:18, schrieb Rick James:
 you never have hosted a large site
 Check my email address before saying that.

yahoo - so what

this is a large enough copmany that i am still sure you
never was allowed to touch a webserver for production

 20 may be low, but 100 is rather high

you do relly not understand it

* i had a project with a large amoutn of parallel users
* the MaxClients was up to 400
* the page-loading was UNACCEPTABLE slow
* after raise up the limit to 600 it got acceptable
* yes the hardware was able to satisfy the requests
* yes you need a LOT of memory and CPU

so please get rid of your i386 and stop to explain me the world

 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Monday, March 18, 2013 1:36 PM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.



 Am 18.03.2013 21:01, schrieb Rick James:
 20 is plenty if your pages run fast enough

 it is not
 you never have hosted a large site

 Excess clients after MaxClients are queued in Apache

 so what - it doe snot help you
 been there, done that

 if you have some hundret USERS at the same time any every of them is
 requesting the same page with a lot of images you are simply DEAD with
 a limit of
 20 in your configuration

 If the 20 are consuming resources (eg cpu/disk) it is better to queue
 the excess than to have everybody stumbling over each other.

 if your server can not serve more than 20 simultaionous requests you
 are not doing any serious things

 sorry, 20 can be done with any crappy notebook these days

 In MySQL, the excess clients beyond max_connections are give an
 error.

 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Monday, March 18, 2013 12:15 PM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.



 Am 18.03.2013 19:26, schrieb Rick James:
 If you are running Apache with MaxClients set too high, that can
 cause the problem.

 too high is relative

 That Apache setting should be something like 20.  (Other web
 servers
 have similar settings.)

 20 is a laughable value as long you are not hosting only sites with
 no users at all

 i have seen MaxClients 500 be critical while the hardware was not
 overloaded and we had THOUSANDS of users which liked to get the
 website with all it's images, no way with stupid settings of 20
 which
 means only ONE USER at the same time can fetch a single page with
 images and stylesheets



signature.asc
Description: OpenPGP digital signature


Re: How to change max simultaneous connection parameter in mysql.

2013-03-18 Thread Reindl Harald


Am 18.03.2013 19:26, schrieb Rick James:
 If you are running Apache with MaxClients set too high, that can cause the 
 problem.  

too high is relative

 That Apache setting should be something like 20.  (Other web servers have 
 similar settings.)

20 is a laughable value as long you are not hosting only
sites with no users at all

i have seen MaxClients 500 be critical while the hardware
was not overloaded and we had THOUSANDS of users which liked
to get the website with all it's images, no way with stupid
settings of 20 which means only ONE USER at the same time
can fetch a single page with images and stylesheets




signature.asc
Description: OpenPGP digital signature


RE: How to change max simultaneous connection parameter in mysql.

2013-03-18 Thread Rick James
20 is plenty if your pages run fast enough.
Excess clients after MaxClients are queued in Apache.  If the 20 are consuming 
resources (eg cpu/disk) it is better to queue the excess than to have everybody 
stumbling over each other.
In MySQL, the excess clients beyond max_connections are give an error.

 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Monday, March 18, 2013 12:15 PM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.
 
 
 
 Am 18.03.2013 19:26, schrieb Rick James:
  If you are running Apache with MaxClients set too high, that can
 cause the problem.
 
 too high is relative
 
  That Apache setting should be something like 20.  (Other web servers
  have similar settings.)
 
 20 is a laughable value as long you are not hosting only sites with no
 users at all
 
 i have seen MaxClients 500 be critical while the hardware was not
 overloaded and we had THOUSANDS of users which liked to get the website
 with all it's images, no way with stupid settings of 20 which means
 only ONE USER at the same time can fetch a single page with images and
 stylesheets
 


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



Re: How to change max simultaneous connection parameter in mysql.

2013-03-18 Thread Reindl Harald


Am 18.03.2013 21:01, schrieb Rick James:
 20 is plenty if your pages run fast enough

it is not
you never have hosted a large site

 Excess clients after MaxClients are queued in Apache

so what - it doe snot help you
been there, done that

if you have some hundret USERS at the same time
any every of them is requesting the same page with
a lot of images you are simply DEAD with a limit of
20 in your configuration

 If the 20 are consuming resources (eg cpu/disk) it is better to queue the 
 excess 
 than to have everybody stumbling over each other.

if your server can not serve more than 20 simultaionous
requests you are not doing any serious things

sorry, 20 can be done with any crappy notebook these days

 In MySQL, the excess clients beyond max_connections are give an error.
 
 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Monday, March 18, 2013 12:15 PM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.



 Am 18.03.2013 19:26, schrieb Rick James:
 If you are running Apache with MaxClients set too high, that can
 cause the problem.

 too high is relative

 That Apache setting should be something like 20.  (Other web servers
 have similar settings.)

 20 is a laughable value as long you are not hosting only sites with no
 users at all

 i have seen MaxClients 500 be critical while the hardware was not
 overloaded and we had THOUSANDS of users which liked to get the website
 with all it's images, no way with stupid settings of 20 which means
 only ONE USER at the same time can fetch a single page with images and
 stylesheets



signature.asc
Description: OpenPGP digital signature


Re: How to change max simultaneous connection parameter in mysql.

2013-03-18 Thread Noel Butler
On Mon, 2013-03-18 at 21:35 +0100, Reindl Harald wrote:

 
 Am 18.03.2013 21:01, schrieb Rick James:
  20 is plenty if your pages run fast enough



 
 if your server can not serve more than 20 simultaionous
 requests you are not doing any serious things
 


or he's using a 286 




signature.asc
Description: This is a digitally signed message part


RE: How to change max simultaneous connection parameter in mysql.

2013-03-18 Thread Rick James
If you are running Apache with MaxClients set too high, that can cause the 
problem.  That Apache setting should be something like 20.  (Other web servers 
have similar settings.)

 -Original Message-
 From: Igor Shevtsov [mailto:nixofort...@gmail.com]
 Sent: Saturday, March 16, 2013 1:45 AM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.
 
 Hi Kevin,
 In your MySQL client pls execute:
 SET GLOBAL max_connections = 200;
 To Make the change permanent you can edit /etc/my.cnf or whatever MySQL
 config file you you've got in your system Look for this line
 max_connections under [mysqld] secction, add it if it's not in the
 config. make sure it looks like:
 max_connections = 200
 
 No MySQL restart required
 Cheers,
 Igor
 
 
 
 On 16/03/13 07:39, Manuel Arostegui wrote:
  2013/3/16 Kevin Peterson qh.res...@gmail.com
 
  I am using PHP along with mysql. Mysql default configuration allows
  to have 100 simultaneous connection which I want to chane to 200.
 Please help.
 
 
  If you're reaching too many connections quite often, this change can
  imply memory problems in your server. If you are close to get your
  server to swap...be careful with this parameter as any swapping will
  affect your performance.
 
  Manuel.
 
 
 
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql


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



RE: How to change max simultaneous connection parameter in mysql.

2013-03-18 Thread Rick James
 you never have hosted a large site
Check my email address before saying that.

20 may be low, but 100 is rather high.

 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Monday, March 18, 2013 1:36 PM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.
 
 
 
 Am 18.03.2013 21:01, schrieb Rick James:
  20 is plenty if your pages run fast enough
 
 it is not
 you never have hosted a large site
 
  Excess clients after MaxClients are queued in Apache
 
 so what - it doe snot help you
 been there, done that
 
 if you have some hundret USERS at the same time any every of them is
 requesting the same page with a lot of images you are simply DEAD with
 a limit of
 20 in your configuration
 
  If the 20 are consuming resources (eg cpu/disk) it is better to queue
  the excess than to have everybody stumbling over each other.
 
 if your server can not serve more than 20 simultaionous requests you
 are not doing any serious things
 
 sorry, 20 can be done with any crappy notebook these days
 
  In MySQL, the excess clients beyond max_connections are give an
 error.
 
  -Original Message-
  From: Reindl Harald [mailto:h.rei...@thelounge.net]
  Sent: Monday, March 18, 2013 12:15 PM
  To: mysql@lists.mysql.com
  Subject: Re: How to change max simultaneous connection parameter in
  mysql.
 
 
 
  Am 18.03.2013 19:26, schrieb Rick James:
  If you are running Apache with MaxClients set too high, that can
  cause the problem.
 
  too high is relative
 
  That Apache setting should be something like 20.  (Other web
 servers
  have similar settings.)
 
  20 is a laughable value as long you are not hosting only sites with
  no users at all
 
  i have seen MaxClients 500 be critical while the hardware was not
  overloaded and we had THOUSANDS of users which liked to get the
  website with all it's images, no way with stupid settings of 20
 which
  means only ONE USER at the same time can fetch a single page with
  images and stylesheets


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



Re: How to change max simultaneous connection parameter in mysql.

2013-03-16 Thread Manuel Arostegui
2013/3/16 Kevin Peterson qh.res...@gmail.com

 I am using PHP along with mysql. Mysql default configuration allows to
 have 100 simultaneous connection which I want to chane to 200. Please help.



If you're reaching too many connections quite often, this change can imply
memory problems in your server. If you are close to get your server to
swap...be careful with this parameter as any swapping will affect your
performance.

Manuel.




-- 
Manuel Aróstegui
Systems Team
tuenti.com


Re: How to change max simultaneous connection parameter in mysql.

2013-03-16 Thread Igor Shevtsov

Hi Kevin,
In your MySQL client pls execute:
SET GLOBAL max_connections = 200;
To Make the change permanent you can edit /etc/my.cnf or whatever MySQL 
config file you you've got in your system
Look for this line max_connections under [mysqld] secction, add it if 
it's not in the config. make sure it looks like:

max_connections = 200

No MySQL restart required
Cheers,
Igor



On 16/03/13 07:39, Manuel Arostegui wrote:

2013/3/16 Kevin Peterson qh.res...@gmail.com


I am using PHP along with mysql. Mysql default configuration allows to
have 100 simultaneous connection which I want to chane to 200. Please help.



If you're reaching too many connections quite often, this change can imply
memory problems in your server. If you are close to get your server to
swap...be careful with this parameter as any swapping will affect your
performance.

Manuel.







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



Re: connection issue

2012-12-25 Thread Tianyin Xu
Thanks, Doug.
How did you figure out it's because of open_files_limit?

Best,
Tianyin

On Sat, Dec 22, 2012 at 5:51 AM, Doug d...@hacks.perl.sh wrote:
 sorry the problem has been resolved.
 it's the reason of open_files_limit too small.
 I increased it and the problem resolved.

 2012/12/22 Doug d...@hacks.perl.sh:
 Hello,

 When connecting to mysql, sometime I got this error:

 # mysql -ucdn -h113.108.22x.xx -p
 Enter password:
 ERROR 2013 (HY000): Lost connection to MySQL server at 'reading
 initial communication packet', system error: 0


 But most time it's correct.
 What's the reason? Thanks.

 I am running mysql-5.1.37 on Linux, there is no firewall configured on the 
 host.

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




-- 
Tianyin XU,
http://cseweb.ucsd.edu/~tixu/

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



connection issue

2012-12-22 Thread Doug
Hello,

When connecting to mysql, sometime I got this error:

# mysql -ucdn -h113.108.22x.xx -p
Enter password:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading
initial communication packet', system error: 0


But most time it's correct.
What's the reason? Thanks.

I am running mysql-5.1.37 on Linux, there is no firewall configured on the host.

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



Re: connection issue

2012-12-22 Thread Doug
sorry the problem has been resolved.
it's the reason of open_files_limit too small.
I increased it and the problem resolved.

2012/12/22 Doug d...@hacks.perl.sh:
 Hello,

 When connecting to mysql, sometime I got this error:

 # mysql -ucdn -h113.108.22x.xx -p
 Enter password:
 ERROR 2013 (HY000): Lost connection to MySQL server at 'reading
 initial communication packet', system error: 0


 But most time it's correct.
 What's the reason? Thanks.

 I am running mysql-5.1.37 on Linux, there is no firewall configured on the 
 host.

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



Re: MySQL Connection Information

2012-11-14 Thread Prabhat Kumar
No, If you are using non-persistence connection  once the query get
complete you are closing the connection properly.



On Wed, Nov 14, 2012 at 11:44 AM, Trimurthy trimur...@tulassi.com wrote:

 hi every one,  i am working with some application which is
 developed in php and back end is mysql. in this application each and every
 page i am including config.php which consists queries to connect to the
 server. the user name and password is same all the time to connect to the
 database server. is it causes to an extra overload on the server to process
 the connection request every time with the same user name and password.







   Normal
   0




   false
   false
   false

   EN-US
   X-NONE
   AR-SA







































































































































































 Thanks  Kind Regards,

  TRIMURTHY






-- 
Best Regards,

Prabhat Kumar
MySQL DBA

My Blog: http://adminlinux.blogspot.com
My LinkedIn: http://www.linkedin.com/in/profileprabhat


Re: MySQL Connection Information

2012-11-14 Thread Wm Mussatto
On Tue, November 13, 2012 22:38, Prabhat Kumar wrote:
 No, If you are using non-persistence connection  once the query get
 complete you are closing the connection properly.

Is this true if you are using mod_php or equivalent?

 On Wed, Nov 14, 2012 at 11:44 AM, Trimurthy trimur...@tulassi.com wrote:

 hi every one,  i am working with some application which
 is
 developed in php and back end is mysql. in this application each and
 every
 page i am including config.php which consists queries to connect to
 the
 server. the user name and password is same all the time to connect to
 the
 database server. is it causes to an extra overload on the server to
 process
 the connection request every time with the same user name and password.







   Normal
   0




   false
   false
   false

   EN-US
   X-NONE
   AR-SA







































































































































































 Thanks  Kind Regards,

  TRIMURTHY






 --
 Best Regards,

 Prabhat Kumar
 MySQL DBA

 My Blog: http://adminlinux.blogspot.com
 My LinkedIn: http://www.linkedin.com/in/profileprabhat




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



Re: Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-08-01 Thread Fred G
Hi Monty,

First of all, thanks so much for responding to my question! I am using
MySQLworkbench 5.2.37CE.  I'm pretty sure the issue has to do with
something on the administrator side of things. We managed to get it so that
I can click the icon to export the file, but he's still working on getting
it so that we can write an sql query to do this. So for all practical
purposes on my end, the question is being resolved.

But I don't understand how clicking the icon after running a select query
works for exporting, but the command to outfile in a sql query would not
work.

Thanks again

On Tue, Jul 31, 2012 at 5:36 AM, Michael Widenius mo...@askmonty.orgwrote:


 Hi!

  Fred == Fred G Fred writes:

 Fred Thanks Dhaval.  Putting the join condition before INTO outfile
 doesn't seem
 Fred to work, either.

 Fred When I try to use the same outfile name 'test123.csv' I get Error
 Code:
 Fred 1086 File 'test123.csv' already exists.  But then when I try to find
 the
 Fred csv file on my computer, there is a folder with that name, but weird
 files
 Fred in it, none of which are a csv-- and certainly not in the location
 that I
 Fred thought it would be (the same directory that the .sql query is in).

 It's the mysqld server that is writing the .csv file. This means that
 the path is related to the mysql data directory and not to where your
 .sql file is.

 When using select into outfile it's always best to give a full path!


 Fred  Additionally, when I try to identify a different path, such as
 'C:\\' etc,
 Fred I get an error.  This error is: Error Code: 1. Can't create/write to
 file
 Fred C:\test123.csv(Errocde: 2).

 This probably means that you don't have write access to C:\


 Fred I tried running the query outputting to a different named .csv file,
 but it
 Fred is still just running... and seems like it was like yesterday
 where after
 Fred 10 minutes I will get the Error that the MySQL connection was lost.

 The reason that your connection is lost are ether:
 - There is timeout in the client you are using
   (The server never gives a timeout for running queries).
 - The mysqld server died (not likely but possible).
 - Some process in your system is killing quries that runs too long.

 One way to quickly check that things are working are by adding LIMIT 1
 to the query.

 Fred Does anyone have an idea of what is going on?

  The query without exporting the file works fine, in about 12 sec/77
 sec.
  I
  read online how to export MySQL queries into csv's, and I'm not sure
 what
  I
  am doing wrong.  I keep getting the error:
  Error Code: 2013.  Lost connection to MySQL server during query, where
 the
  duration/fetch values are 600.547 sec (~10 minutes).

 What is the exact error message?
 Which client are you using to do the query?

 It's strange that the query works fine when you are not using select
 into outfile.

 What MySQL version are you using

 Regards,
 Monty
 Creator of MySQL and MariaDB



Re: Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-07-31 Thread Michael Widenius

Hi!

 Fred == Fred G Fred writes:

Fred Thanks Dhaval.  Putting the join condition before INTO outfile doesn't 
seem
Fred to work, either.

Fred When I try to use the same outfile name 'test123.csv' I get Error Code:
Fred 1086 File 'test123.csv' already exists.  But then when I try to find the
Fred csv file on my computer, there is a folder with that name, but weird files
Fred in it, none of which are a csv-- and certainly not in the location that I
Fred thought it would be (the same directory that the .sql query is in).

It's the mysqld server that is writing the .csv file. This means that
the path is related to the mysql data directory and not to where your
.sql file is.

When using select into outfile it's always best to give a full path!


Fred  Additionally, when I try to identify a different path, such as 'C:\\' 
etc,
Fred I get an error.  This error is: Error Code: 1. Can't create/write to file
Fred C:\test123.csv(Errocde: 2).

This probably means that you don't have write access to C:\


Fred I tried running the query outputting to a different named .csv file, but 
it
Fred is still just running... and seems like it was like yesterday where 
after
Fred 10 minutes I will get the Error that the MySQL connection was lost.

The reason that your connection is lost are ether:
- There is timeout in the client you are using
  (The server never gives a timeout for running queries).
- The mysqld server died (not likely but possible).
- Some process in your system is killing quries that runs too long.

One way to quickly check that things are working are by adding LIMIT 1
to the query.

Fred Does anyone have an idea of what is going on?

 The query without exporting the file works fine, in about 12 sec/77 sec.
 I
 read online how to export MySQL queries into csv's, and I'm not sure what
 I
 am doing wrong.  I keep getting the error:
 Error Code: 2013.  Lost connection to MySQL server during query, where the
 duration/fetch values are 600.547 sec (~10 minutes).

What is the exact error message?
Which client are you using to do the query?

It's strange that the query works fine when you are not using select
into outfile.

What MySQL version are you using

Regards,
Monty
Creator of MySQL and MariaDB

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



Re: Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-07-26 Thread Fred G
Thanks Dhaval.  Putting the join condition before INTO outfile doesn't seem
to work, either.

When I try to use the same outfile name 'test123.csv' I get Error Code:
1086 File 'test123.csv' already exists.  But then when I try to find the
csv file on my computer, there is a folder with that name, but weird files
in it, none of which are a csv-- and certainly not in the location that I
thought it would be (the same directory that the .sql query is in).
 Additionally, when I try to identify a different path, such as 'C:\\' etc,
I get an error.  This error is: Error Code: 1. Can't create/write to file
C:\test123.csv(Errocde: 2).

I tried running the query outputting to a different named .csv file, but it
is still just running... and seems like it was like yesterday where after
10 minutes I will get the Error that the MySQL connection was lost.

Does anyone have an idea of what is going on?

On Wed, Jul 25, 2012 at 9:22 PM, Dhaval Jaiswal dhaval.jais...@via.comwrote:

 SELECT * FROM test INTO OUTFILE '/home/test.csv' FIELDS TERMINATED BY ','
 ENCLOSED BY '' LINES TERMINATED BY '\n'

 as above give your join condition before INTO OUTFILE.



 On Thu, Jul 26, 2012 at 1:32 AM, Fred G bayespoker...@gmail.com wrote:

 Hi--

 I'm trying to do the following:
 SELECT db.emp.emp_fname, db.emp.emp_fname, db.sale.sale_date,
 db.sale.sale_no, db.sale.sale_total_amt
 into outfile 'test123.csv'
 FIELDS terminated by ','
 FROM db.emp
 LEFT OUTER JOIN db.sale
 ON db.sale.emp_id = db.emp.emp_id;

 The query without exporting the file works fine, in about 12 sec/77 sec.
  I
 read online how to export MySQL queries into csv's, and I'm not sure what
 I
 am doing wrong.  I keep getting the error:
 Error Code: 2013.  Lost connection to MySQL server during query, where the
 duration/fetch values are 600.547 sec (~10 minutes).

 I'm wondering:
 a) What is going on?
 b) How do I fix it?

 Thanks so much!!




 --

 [image: Inline image 2] http://www.via.com/

 *Dhaval* | Database  System

 *E:* dhaval.jais...@via.com ra...@via.com| *T:* 080 4043 3000 | *M:* +91
 - 8095 397 843

 [image: all-icon.jpg] http://www.via.com/




Re: Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-07-26 Thread hsv
 2012/07/26 06:52 +0530, Dhaval Jaiswal 
SELECT * FROM test INTO OUTFILE '/home/test.csv' FIELDS TERMINATED BY ',' 
ENCLOSED BY '' LINES TERMINATED BY '\n'

as above give your join condition before INTO OUTFILE.

Right: MySQL server writes into some directory where it is, not where MySQL 
client is. If less than a full path name is given, almost certainly the server 
will attempt to write into a directory to which it has no permission, and 
almost certainly also not into one that you want it to write into. If server 
and client run on separate machines with separate disks, there is no means 
through OUTFILE of there setting the output where the client is, only through 
client s standard output, where you get no choice of field separator, line 
separator, or field-quote character (there is none), although you can keep or 
skip the column names (-N for skipping them), and suppress the one-character 
escape character (-r), same as FIELDS ESCAPED BY ''. There is no means of 
skipping NULL or \N for nulls, which is not CSV format.

And if your MySQL is under Windows, be sure to read all instructions about 
entering full pathnames. It is best to avoid the backslash (\), because that is 
a C-escape introduced (along with much other C-stuff) into SQL s original PL1.


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



Re: Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-07-26 Thread Fred G
Thanks!

On Thu, Jul 26, 2012 at 12:05 AM, h...@tbbs.net wrote:

  2012/07/26 06:52 +0530, Dhaval Jaiswal 
 SELECT * FROM test INTO OUTFILE '/home/test.csv' FIELDS TERMINATED BY ','
 ENCLOSED BY '' LINES TERMINATED BY '\n'

 as above give your join condition before INTO OUTFILE.
 
 Right: MySQL server writes into some directory where it is, not where
 MySQL client is. If less than a full path name is given, almost certainly
 the server will attempt to write into a directory to which it has no
 permission, and almost certainly also not into one that you want it to
 write into. If server and client run on separate machines with separate
 disks, there is no means through OUTFILE of there setting the output where
 the client is, only through client s standard output, where you get no
 choice of field separator, line separator, or field-quote character (there
 is none), although you can keep or skip the column names (-N for skipping
 them), and suppress the one-character escape character (-r), same as FIELDS
 ESCAPED BY ''. There is no means of skipping NULL or \N for nulls,
 which is not CSV format.

 And if your MySQL is under Windows, be sure to read all instructions about
 entering full pathnames. It is best to avoid the backslash (\), because
 that is a C-escape introduced (along with much other C-stuff) into SQL s
 original PL1.


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




Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-07-25 Thread Fred G
Hi--

I'm trying to do the following:
SELECT db.emp.emp_fname, db.emp.emp_fname, db.sale.sale_date,
db.sale.sale_no, db.sale.sale_total_amt
into outfile 'test123.csv'
FIELDS terminated by ','
FROM db.emp
LEFT OUTER JOIN db.sale
ON db.sale.emp_id = db.emp.emp_id;

The query without exporting the file works fine, in about 12 sec/77 sec.  I
read online how to export MySQL queries into csv's, and I'm not sure what I
am doing wrong.  I keep getting the error:
Error Code: 2013.  Lost connection to MySQL server during query, where the
duration/fetch values are 600.547 sec (~10 minutes).

I'm wondering:
a) What is going on?
b) How do I fix it?

Thanks so much!!


Re: Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-07-25 Thread Dhaval Jaiswal
SELECT * FROM test INTO OUTFILE '/home/test.csv' FIELDS TERMINATED BY ','
ENCLOSED BY '' LINES TERMINATED BY '\n'

as above give your join condition before INTO OUTFILE.


On Thu, Jul 26, 2012 at 1:32 AM, Fred G bayespoker...@gmail.com wrote:

 Hi--

 I'm trying to do the following:
 SELECT db.emp.emp_fname, db.emp.emp_fname, db.sale.sale_date,
 db.sale.sale_no, db.sale.sale_total_amt
 into outfile 'test123.csv'
 FIELDS terminated by ','
 FROM db.emp
 LEFT OUTER JOIN db.sale
 ON db.sale.emp_id = db.emp.emp_id;

 The query without exporting the file works fine, in about 12 sec/77 sec.  I
 read online how to export MySQL queries into csv's, and I'm not sure what I
 am doing wrong.  I keep getting the error:
 Error Code: 2013.  Lost connection to MySQL server during query, where the
 duration/fetch values are 600.547 sec (~10 minutes).

 I'm wondering:
 a) What is going on?
 b) How do I fix it?

 Thanks so much!!




-- 

[image: Inline image 2] http://www.via.com/

*Dhaval* | Database  System

*E:* dhaval.jais...@via.com ra...@via.com| *T:* 080 4043 3000 | *M:* +91
- 8095 397 843

[image: all-icon.jpg] http://www.via.com/


[Warning] Aborted connection...... (Got timeout reading communication packets)

2012-05-21 Thread Shafi AHMED
Ladies and Gentlemen:

I am getting below errors and therefore the user sessions terminate causing
business impact...Can some one who is expertise already in this advice at
the earliest?


120513  8:19:45 [Warning] Aborted connection 1167257 to db: 'iib' user:
'iibuser' host: '210.18.3.94' (Got timeout reading communication packets)


OS version: RHEL 5.3

DB version: MYSQL 5.1 

Table involved in the DB is of type : inndoDB

Background : This is an online exam registration site DB and the concurrent
connex invariably reaches to 200 for 500 users which should not be the case.

Ideally the concurrent connex must be 10.

Normally , we run truncate table before the exam starts up.

A similar setup(in terms of DB/OS/config etc )  works fine which is actually
DR at different site.

PS: Network segment between web and DB tier has been thoroughly checked and
seems to be fine.

Thanks a ton!

 
Best Rgs,
Shafi AHMED
Sify - Chennai

 
 




Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more with your 
Sifymail WIYI id!
Log on to http://www.sify.com

** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Technologies Limited and is intended for use only by the individual or 
entity to 
which it is addressed, and may contain information that is privileged, 
confidential or exempt from disclosure under applicable law. If this is a 
forwarded message, the content of this E-MAIL may not have been sent with 
the authority of the Company. If you are not the intended recipient, an 
agent of the intended recipient or a  person responsible for delivering the 
information to the named recipient,  you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this 
information in any way or in any manner is strictly prohibited. If you have 
received this communication in error, please delete this mail  notify us 
immediately at ad...@sifycorp.com

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



Re: [Warning] Aborted connection...... (Got timeout reading communication packets)

2012-05-21 Thread Suresh Kuna
Hello Shafi,

The below blog will give you more information on the error -
http://sureshkuna.blogspot.in/2010/12/aborted-connection-31084472-to-db-ms.html

Thanks
Suresh Kuna

On Mon, May 21, 2012 at 1:15 PM, Shafi AHMED shafi.ah...@sifycorp.comwrote:

 Ladies and Gentlemen:

 I am getting below errors and therefore the user sessions terminate causing
 business impact...Can some one who is expertise already in this advice at
 the earliest?


 120513  8:19:45 [Warning] Aborted connection 1167257 to db: 'iib' user:
 'iibuser' host: '210.18.3.94' (Got timeout reading communication packets)


 OS version: RHEL 5.3

 DB version: MYSQL 5.1

 Table involved in the DB is of type : inndoDB

 Background : This is an online exam registration site DB and the concurrent
 connex invariably reaches to 200 for 500 users which should not be the
 case.

 Ideally the concurrent connex must be 10.

 Normally , we run truncate table before the exam starts up.

 A similar setup(in terms of DB/OS/config etc )  works fine which is
 actually
 DR at different site.

 PS: Network segment between web and DB tier has been thoroughly checked and
 seems to be fine.

 Thanks a ton!


 Best Rgs,
Shafi AHMED
Sify - Chennai







 Get your world in your inbox!

 Mail, widgets, documents, spreadsheets, organizer and much more with your
 Sifymail WIYI id!
 Log on to http://www.sify.com

 ** DISCLAIMER **
 Information contained and transmitted by this E-MAIL is proprietary to
 Sify Technologies Limited and is intended for use only by the individual
 or entity to
 which it is addressed, and may contain information that is privileged,
 confidential or exempt from disclosure under applicable law. If this is a
 forwarded message, the content of this E-MAIL may not have been sent with
 the authority of the Company. If you are not the intended recipient, an
 agent of the intended recipient or a  person responsible for delivering the
 information to the named recipient,  you are notified that any use,
 distribution, transmission, printing, copying or dissemination of this
 information in any way or in any manner is strictly prohibited. If you have
 received this communication in error, please delete this mail  notify us
 immediately at ad...@sifycorp.com

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




-- 
Thanks
Suresh Kuna
MySQL DBA


RE: [Warning] Aborted connection...... (Got timeout reading communication packets)

2012-05-21 Thread Shafi AHMED
Hi suresh: I have gone through your blog..and feel it is more generic...
Can you please elaborate why the other setup(DR) works fine when the similar
prod(with no application code/web/db structural changes etc) has gone thru'
successfully with no such warning msgs ?

Thanks again...

 
Best Rgs,
Shafi AHMED
Sify - Chennai

 
 

-Original Message-
From: Suresh Kuna [mailto:sureshkumar...@gmail.com] 
Sent: Monday, May 21, 2012 1:29 PM
To: Shafi AHMED
Cc: mysql@lists.mysql.com; shafi...@gmail.com
Subject: Re: [Warning] Aborted connection.. (Got timeout reading
communication packets)

Hello Shafi,

The below blog will give you more information on the error -
http://sureshkuna.blogspot.in/2010/12/aborted-connection-31084472-to-db-ms.h
tml

Thanks
Suresh Kuna

On Mon, May 21, 2012 at 1:15 PM, Shafi AHMED
shafi.ah...@sifycorp.comwrote:

 Ladies and Gentlemen:

 I am getting below errors and therefore the user sessions terminate
causing
 business impact...Can some one who is expertise already in this advice at
 the earliest?


 120513  8:19:45 [Warning] Aborted connection 1167257 to db: 'iib' user:
 'iibuser' host: '210.18.3.94' (Got timeout reading communication packets)


 OS version: RHEL 5.3

 DB version: MYSQL 5.1

 Table involved in the DB is of type : inndoDB

 Background : This is an online exam registration site DB and the
concurrent
 connex invariably reaches to 200 for 500 users which should not be the
 case.

 Ideally the concurrent connex must be 10.

 Normally , we run truncate table before the exam starts up.

 A similar setup(in terms of DB/OS/config etc )  works fine which is
 actually
 DR at different site.

 PS: Network segment between web and DB tier has been thoroughly checked
and
 seems to be fine.

 Thanks a ton!


 Best Rgs,
Shafi AHMED
Sify - Chennai







 Get your world in your inbox!

 Mail, widgets, documents, spreadsheets, organizer and much more with your
 Sifymail WIYI id!
 Log on to http://www.sify.com

 ** DISCLAIMER **
 Information contained and transmitted by this E-MAIL is proprietary to
 Sify Technologies Limited and is intended for use only by the individual
 or entity to
 which it is addressed, and may contain information that is privileged,
 confidential or exempt from disclosure under applicable law. If this is a
 forwarded message, the content of this E-MAIL may not have been sent with
 the authority of the Company. If you are not the intended recipient, an
 agent of the intended recipient or a  person responsible for delivering
the
 information to the named recipient,  you are notified that any use,
 distribution, transmission, printing, copying or dissemination of this
 information in any way or in any manner is strictly prohibited. If you
have
 received this communication in error, please delete this mail  notify us
 immediately at ad...@sifycorp.com

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




-- 
Thanks
Suresh Kuna
MySQL DBA


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



RE: [Warning] Aborted connection...... (Got timeout reading communication packets)

2012-05-21 Thread Shafi AHMED
Sorry- a  typo :) 

Hi suresh: I have gone through your blog..and feel it is more generic...
Can you please elaborate why the other setup(DR) works fine when the similar
prod(with no application code/web/db structural changes etc) has gone thru'
failures with such warning msgs ?

 
Best Rgs,
Shafi AHMED
Sify - Chennai

 
 

-Original Message-
From: Shafi AHMED [mailto:shafi.ah...@sifycorp.com] 
Sent: Monday, May 21, 2012 2:04 PM
To: 'Suresh Kuna'
Cc: 'mysql@lists.mysql.com'; 'shafi...@gmail.com'
Subject: RE: [Warning] Aborted connection.. (Got timeout reading
communication packets)

Hi suresh: I have gone through your blog..and feel it is more generic...
Can you please elaborate why the other setup(DR) works fine when the similar
prod(with no application code/web/db structural changes etc) has gone thru'
failures with such warning msgs ?

Thanks again...

 
Best Rgs,
Shafi AHMED
Sify - Chennai

 
 

-Original Message-
From: Suresh Kuna [mailto:sureshkumar...@gmail.com] 
Sent: Monday, May 21, 2012 1:29 PM
To: Shafi AHMED
Cc: mysql@lists.mysql.com; shafi...@gmail.com
Subject: Re: [Warning] Aborted connection.. (Got timeout reading
communication packets)

Hello Shafi,

The below blog will give you more information on the error -
http://sureshkuna.blogspot.in/2010/12/aborted-connection-31084472-to-db-ms.h
tml

Thanks
Suresh Kuna

On Mon, May 21, 2012 at 1:15 PM, Shafi AHMED
shafi.ah...@sifycorp.comwrote:

 Ladies and Gentlemen:

 I am getting below errors and therefore the user sessions terminate
causing
 business impact...Can some one who is expertise already in this advice at
 the earliest?


 120513  8:19:45 [Warning] Aborted connection 1167257 to db: 'iib' user:
 'iibuser' host: '210.18.3.94' (Got timeout reading communication packets)


 OS version: RHEL 5.3

 DB version: MYSQL 5.1

 Table involved in the DB is of type : inndoDB

 Background : This is an online exam registration site DB and the
concurrent
 connex invariably reaches to 200 for 500 users which should not be the
 case.

 Ideally the concurrent connex must be 10.

 Normally , we run truncate table before the exam starts up.

 A similar setup(in terms of DB/OS/config etc )  works fine which is
 actually
 DR at different site.

 PS: Network segment between web and DB tier has been thoroughly checked
and
 seems to be fine.

 Thanks a ton!


 Best Rgs,
Shafi AHMED
Sify - Chennai







 Get your world in your inbox!

 Mail, widgets, documents, spreadsheets, organizer and much more with your
 Sifymail WIYI id!
 Log on to http://www.sify.com

 ** DISCLAIMER **
 Information contained and transmitted by this E-MAIL is proprietary to
 Sify Technologies Limited and is intended for use only by the individual
 or entity to
 which it is addressed, and may contain information that is privileged,
 confidential or exempt from disclosure under applicable law. If this is a
 forwarded message, the content of this E-MAIL may not have been sent with
 the authority of the Company. If you are not the intended recipient, an
 agent of the intended recipient or a  person responsible for delivering
the
 information to the named recipient,  you are notified that any use,
 distribution, transmission, printing, copying or dissemination of this
 information in any way or in any manner is strictly prohibited. If you
have
 received this communication in error, please delete this mail  notify us
 immediately at ad...@sifycorp.com

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




-- 
Thanks
Suresh Kuna
MySQL DBA


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



Re: [Warning] Aborted connection...... (Got timeout reading communication packets)

2012-05-21 Thread Suresh Kuna
This needs to be investigated on the server, and cannot be guessed.

On Mon, May 21, 2012 at 2:29 PM, Shafi AHMED shafi.ah...@sifycorp.comwrote:

 Sorry- a  typo :)

 Hi suresh: I have gone through your blog..and feel it is more generic...
 Can you please elaborate why the other setup(DR) works fine when the
 similar
 prod(with no application code/web/db structural changes etc) has gone thru'
 failures with such warning msgs ?


 Best Rgs,
Shafi AHMED
Sify - Chennai




 -Original Message-
 From: Shafi AHMED [mailto:shafi.ah...@sifycorp.com]
 Sent: Monday, May 21, 2012 2:04 PM
 To: 'Suresh Kuna'
 Cc: 'mysql@lists.mysql.com'; 'shafi...@gmail.com'
 Subject: RE: [Warning] Aborted connection.. (Got timeout reading
 communication packets)

 Hi suresh: I have gone through your blog..and feel it is more generic...
 Can you please elaborate why the other setup(DR) works fine when the
 similar
 prod(with no application code/web/db structural changes etc) has gone thru'
 failures with such warning msgs ?

 Thanks again...


 Best Rgs,
Shafi AHMED
Sify - Chennai




 -Original Message-
 From: Suresh Kuna [mailto:sureshkumar...@gmail.com]
 Sent: Monday, May 21, 2012 1:29 PM
 To: Shafi AHMED
 Cc: mysql@lists.mysql.com; shafi...@gmail.com
 Subject: Re: [Warning] Aborted connection.. (Got timeout reading
 communication packets)

 Hello Shafi,

 The below blog will give you more information on the error -

 http://sureshkuna.blogspot.in/2010/12/aborted-connection-31084472-to-db-ms.h
 tml

 Thanks
 Suresh Kuna

 On Mon, May 21, 2012 at 1:15 PM, Shafi AHMED
 shafi.ah...@sifycorp.comwrote:

  Ladies and Gentlemen:
 
  I am getting below errors and therefore the user sessions terminate
 causing
  business impact...Can some one who is expertise already in this advice at
  the earliest?
 
 
  120513  8:19:45 [Warning] Aborted connection 1167257 to db: 'iib' user:
  'iibuser' host: '210.18.3.94' (Got timeout reading communication packets)
 
 
  OS version: RHEL 5.3
 
  DB version: MYSQL 5.1
 
  Table involved in the DB is of type : inndoDB
 
  Background : This is an online exam registration site DB and the
 concurrent
  connex invariably reaches to 200 for 500 users which should not be the
  case.
 
  Ideally the concurrent connex must be 10.
 
  Normally , we run truncate table before the exam starts up.
 
  A similar setup(in terms of DB/OS/config etc )  works fine which is
  actually
  DR at different site.
 
  PS: Network segment between web and DB tier has been thoroughly checked
 and
  seems to be fine.
 
  Thanks a ton!
 
 
  Best Rgs,
 Shafi AHMED
 Sify - Chennai
 
 
 
 
 
 
 
  Get your world in your inbox!
 
  Mail, widgets, documents, spreadsheets, organizer and much more with your
  Sifymail WIYI id!
  Log on to http://www.sify.com
 
  ** DISCLAIMER **
  Information contained and transmitted by this E-MAIL is proprietary to
  Sify Technologies Limited and is intended for use only by the individual
  or entity to
  which it is addressed, and may contain information that is privileged,
  confidential or exempt from disclosure under applicable law. If this is a
  forwarded message, the content of this E-MAIL may not have been sent with
  the authority of the Company. If you are not the intended recipient, an
  agent of the intended recipient or a  person responsible for delivering
 the
  information to the named recipient,  you are notified that any use,
  distribution, transmission, printing, copying or dissemination of this
  information in any way or in any manner is strictly prohibited. If you
 have
  received this communication in error, please delete this mail  notify us
  immediately at ad...@sifycorp.com
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/mysql
 
 


 --
 Thanks
 Suresh Kuna
 MySQL DBA




-- 
Thanks
Suresh Kuna
MySQL DBA


Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2012-03-07 Thread Blog Tieng Viet
If you did not work directly on mysql server (login
by mysql command), please try this. 
Using script (PHP, ...) may lose connection, as my experience.

Best

--- On Mon, 3/5/12, Singer X.J. Wang w...@singerwang.com wrote:

 From: Singer X.J. Wang w...@singerwang.com
 Subject: Re: ERROR 2013 (HY000): Lost connection to MySQL server during query
 To: javad bakhshi javadbakh...@yahoo.com
 Cc: mysql@lists.mysql.com mysql@lists.mysql.com
 Date: Monday, March 5, 2012, 10:40 PM
 Checking your firewall settings..
 
 S
 
 
 On Mon, Mar 5, 2012 at 08:39, javad bakhshi javadbakh...@yahoo.com
 wrote:
 
  Hi,
 
  Still have the same problem and changing
 connect_timeout didn't help.
  Any other Ideas? Is there even any solution to this?
 
  Best regards,
  Javad Bakhshi,
 
 
  
   From: mail...@securitylabs.it
 mail...@securitylabs.it
  To: mysql@lists.mysql.com
  Sent: Thursday, March 1, 2012 11:09 AM
  Subject: Re: ERROR 2013 (HY000): Lost connection to
 MySQL server during
  query
 
  Il 01/03/2012 11:03, javad bakhshi ha scritto:
   Hi,
  
   I am trying to load data into my table from a very
 large file but after
  some time I get this error:
  
   ERROR 2013 (HY000): Lost connection to MySQL
 server during query
  
  
   My file size is around 4G and I have 220M lines in
 my file which have to
  be loaded in to my table. I have 10 of these files
 which have to loaded in
  the same table. My MySQL version is 5.1.59, I have
 changed the
  max_allowed_packet to 346030080.
  
   any ideas how I can solve this problem?
     Best regards,
   Javad Bakhshi,
  In order to resolve the problem you may need to
 increase these two values
  in mysql.ini or my.cnf, and restart mysql:
 
  wait_timeout = 28800
  connect_timeout = 28800
 
  -- MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:    http://lists.mysql.com/mysql
 
 
 -- 
 --
 Pythian proud winner of Oracle North America Titan Award for
 Exadata 
 Solution...watch the video on pythian.com


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



Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2012-03-05 Thread javad bakhshi
Hi,

Still have the same problem and changing connect_timeout didn't help. 
Any other Ideas? Is there even any solution to this?
 
Best regards,
Javad Bakhshi,



 From: mail...@securitylabs.it mail...@securitylabs.it
To: mysql@lists.mysql.com 
Sent: Thursday, March 1, 2012 11:09 AM
Subject: Re: ERROR 2013 (HY000): Lost connection to MySQL server during query
 
Il 01/03/2012 11:03, javad bakhshi ha scritto:
 Hi,
 
 I am trying to load data into my table from a very large file but after some 
 time I get this error:
 
 ERROR 2013 (HY000): Lost connection to MySQL server during query
 
 
 My file size is around 4G and I have 220M lines in my file which have to be 
 loaded in to my table. I have 10 of these files which have to loaded in the 
 same table. My MySQL version is 5.1.59, I have changed the  
 max_allowed_packet to 346030080.
 
 any ideas how I can solve this problem?
   Best regards,
 Javad Bakhshi,
In order to resolve the problem you may need to increase these two values in 
mysql.ini or my.cnf, and restart mysql:

wait_timeout = 28800
connect_timeout = 28800

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

Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2012-03-05 Thread Singer X.J. Wang
Checking your firewall settings..

S


On Mon, Mar 5, 2012 at 08:39, javad bakhshi javadbakh...@yahoo.com wrote:

 Hi,

 Still have the same problem and changing connect_timeout didn't help.
 Any other Ideas? Is there even any solution to this?

 Best regards,
 Javad Bakhshi,


 
  From: mail...@securitylabs.it mail...@securitylabs.it
 To: mysql@lists.mysql.com
 Sent: Thursday, March 1, 2012 11:09 AM
 Subject: Re: ERROR 2013 (HY000): Lost connection to MySQL server during
 query

 Il 01/03/2012 11:03, javad bakhshi ha scritto:
  Hi,
 
  I am trying to load data into my table from a very large file but after
 some time I get this error:
 
  ERROR 2013 (HY000): Lost connection to MySQL server during query
 
 
  My file size is around 4G and I have 220M lines in my file which have to
 be loaded in to my table. I have 10 of these files which have to loaded in
 the same table. My MySQL version is 5.1.59, I have changed the
 max_allowed_packet to 346030080.
 
  any ideas how I can solve this problem?
Best regards,
  Javad Bakhshi,
 In order to resolve the problem you may need to increase these two values
 in mysql.ini or my.cnf, and restart mysql:

 wait_timeout = 28800
 connect_timeout = 28800

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


-- 
--
Pythian proud winner of Oracle North America Titan Award for Exadata 
Solution...watch the video on pythian.com


ERROR 2013 (HY000): Lost connection to MySQL server during query

2012-03-01 Thread javad bakhshi
Hi,

I am trying to load data into my table from a very large file but after some 
time I get this error:

ERROR 2013 (HY000): Lost connection to MySQL server during query


My file size is around 4G and I have 220M lines in my file which have to be 
loaded in to my table. 
I have 10 of these files which have to loaded in the same table. 
My MySQL version is 5.1.59, I have changed the  max_allowed_packet to 346030080.

any ideas how I can solve this problem?
 
Best regards,
Javad Bakhshi,

Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2012-03-01 Thread mail...@securitylabs.it

Il 01/03/2012 11:03, javad bakhshi ha scritto:

Hi,

I am trying to load data into my table from a very large file but after some 
time I get this error:

ERROR 2013 (HY000): Lost connection to MySQL server during query


My file size is around 4G and I have 220M lines in my file which have to be loaded in to my table. 
I have 10 of these files which have to loaded in the same table. 
My MySQL version is 5.1.59, I have changed the  max_allowed_packet to 346030080.


any ideas how I can solve this problem?
  
Best regards,

Javad Bakhshi,
In order to resolve the problem you may need to increase these two 
values in mysql.ini or my.cnf, and restart mysql:


wait_timeout = 28800
connect_timeout = 28800

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



Aborted connection 102

2011-12-14 Thread Rafael Valenzuela
Hi everybody,
I have this notice ,
111214 11:55:53 [Warning] Aborted connection 102 to db: 'proninop_proninop'
user: 'pronino' host: 'xxx.xxx.xxx.xxx' (Got timeout reading communication
packets)
I have watched in this site
http://dev.mysql.com/doc/refman/5.0/en/communication-errors.html but I have
not seen the number 102.
Any idea?
thanks a lot

-- 
Mit forever
My Blog http://www.redcloverbi.wordpress.com
My Faborite 
Webhttp://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/index.htm
http://www.technologyreview.com/


Re: Aborted connection 102

2011-12-14 Thread Michael Dykman
102 is just the run-time assigned connection id.  It appears that the
server bailed on a client connection due to a timeout.  This suggests
that either you have/had network issues, an error on the client side
or someone just killed a client connection without closing properly.
Unless you are seeing a lot of these, don't waste your time..  it
looks like operational white-noise.

 - michael dykman
On Wed, Dec 14, 2011 at 9:39 AM, Rafael Valenzuela rav...@gmail.com wrote:
 Hi everybody,
 I have this notice ,
 111214 11:55:53 [Warning] Aborted connection 102 to db: 'proninop_proninop'
 user: 'pronino' host: 'xxx.xxx.xxx.xxx' (Got timeout reading communication
 packets)
 I have watched in this site
 http://dev.mysql.com/doc/refman/5.0/en/communication-errors.html but I have
 not seen the number 102.
 Any idea?
 thanks a lot

 --
 Mit forever
 My Blog http://www.redcloverbi.wordpress.com
 My Faborite 
 Webhttp://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/index.htm
 http://www.technologyreview.com/



-- 
 - michael dykman
 - mdyk...@gmail.com

 May the Source be with you.

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



Re: Aborted connection 102

2011-12-14 Thread Rafael Valenzuela
Hi Michael,
Thanks :D.

2011/12/14 Michael Dykman mdyk...@gmail.com

 102 is just the run-time assigned connection id.  It appears that the
 server bailed on a client connection due to a timeout.  This suggests
 that either you have/had network issues, an error on the client side
 or someone just killed a client connection without closing properly.
 Unless you are seeing a lot of these, don't waste your time..  it
 looks like operational white-noise.

  - michael dykman
 On Wed, Dec 14, 2011 at 9:39 AM, Rafael Valenzuela rav...@gmail.com
 wrote:
  Hi everybody,
  I have this notice ,
  111214 11:55:53 [Warning] Aborted connection 102 to db:
 'proninop_proninop'
  user: 'pronino' host: 'xxx.xxx.xxx.xxx' (Got timeout reading
 communication
  packets)
  I have watched in this site
  http://dev.mysql.com/doc/refman/5.0/en/communication-errors.html but I
 have
  not seen the number 102.
  Any idea?
  thanks a lot
 
  --
  Mit forever
  My Blog http://www.redcloverbi.wordpress.com
  My Faborite Web
 http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/index.htm
 
  http://www.technologyreview.com/



 --
  - michael dykman
  - mdyk...@gmail.com

  May the Source be with you.

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




-- 
Mit forever
My Blog http://www.redcloverbi.wordpress.com
My Faborite 
Webhttp://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/index.htm
http://www.technologyreview.com/


Update table on lost connection

2011-09-28 Thread Alex Schaft

Hi,

We're busy moving legacy apps from foxpro tables to mysql. User logins 
were tracked via a record in a table which the app then locked, 
preventing multiple logins for the same user code.


I want to simulate this via a locked column in a mysql table, but 
would need the field to be cleared if the server loses the connection to 
the client. How would I do this, or is there an alternative?


Thanks,
Alex



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Update table on lost connection

2011-09-28 Thread Hank
Check out the GET_LOCK and RELEASE_LOCK virtual lock functions in MySQL.

-Hank



On Wed, Sep 28, 2011 at 9:15 AM, Alex Schaft al...@quicksoftware.co.za wrote:
 Hi,

 We're busy moving legacy apps from foxpro tables to mysql. User logins were
 tracked via a record in a table which the app then locked, preventing
 multiple logins for the same user code.

 I want to simulate this via a locked column in a mysql table, but would
 need the field to be cleared if the server loses the connection to the
 client. How would I do this, or is there an alternative?

 Thanks,
 Alex




 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:    http://lists.mysql.com/mysql?unsub=hes...@gmail.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Practical connection limits MySQL 5.1/5.5

2011-04-25 Thread Zhu Chao
eBay once developed a patch for pooled threads, on top of 5.0, to resolve this 
kind of issue so they can support 10k+ sessions(massive amount of application 
need to talk to those mysql). 
 
Not sure whether they are merged into main version though.




Best regards
Zhuchao


在 2011-4-14,17:59,Reindl Harald h.rei...@thelounge.net 写道:

 Am 14.04.2011 11:50, schrieb Johan De Meersman:
 - Original Message -
 From: Reindl Harald h.rei...@thelounge.net
 
 even if you have enough memory why will you throw it away for a
 unusual connection count instead use the RAm for innodb-buffer-pool,
 query-cache, key-buffers?
 
 Maybe the application doesn't have support for connection pooling and can't 
 be easily replaced.
 
 http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/mysql.html
 
 Maybe there's just that much clients instead of a central service
 
 Maybe the OP could clarify what he really does
 
 Maybe there's not just a single application that uses that database.
 
 http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/mysql.html
 
 As usual, Harald, you fail to realise that your experience does not 
 encompass the whole of human civilisation. 
 
 as usual people have questions without any information what they really do
 
 You seem to have a good technical background, but it might be useful to 
 learn to 
 consider problems from the point of view of the people who have them, at 
 times.
 It tends to be a much appreciated skill in the real world.
 
 this is your point of view, ok
 
 my point of view is instead having headaches about how many connections are
 possible without problems to consider how many connections are really
 needed and without my.cnf (buffer settings), any information about the
 workload of the applications the whole question does not make sense
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Practical connection limits MySQL 5.1/5.5

2011-04-14 Thread Johan De Meersman
- Original Message -
 From: Reindl Harald h.rei...@thelounge.net
 
 even if you have enough memory why will you throw it away for a
 unusual connection count instead use the RAm for innodb-buffer-pool,
 query-cache, key-buffers?

Maybe the application doesn't have support for connection pooling and can't be 
easily replaced. Maybe there's just that much clients instead of a central 
service. Maybe there's not just a single application that uses that database.

As usual, Harald, you fail to realise that your experience does not encompass 
the whole of human civilisation. You seem to have a good technical background, 
but it might be useful to learn to consider problems from the point of view of 
the people who have them, at times. It tends to be a much appreciated skill in 
the real world.



-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Practical connection limits MySQL 5.1/5.5

2011-04-14 Thread Reindl Harald
Am 14.04.2011 11:50, schrieb Johan De Meersman:
 - Original Message -
 From: Reindl Harald h.rei...@thelounge.net

 even if you have enough memory why will you throw it away for a
 unusual connection count instead use the RAm for innodb-buffer-pool,
 query-cache, key-buffers?
 
 Maybe the application doesn't have support for connection pooling and can't 
 be easily replaced.

http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/mysql.html

 Maybe there's just that much clients instead of a central service

Maybe the OP could clarify what he really does

 Maybe there's not just a single application that uses that database.

http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/mysql.html

 As usual, Harald, you fail to realise that your experience does not encompass 
 the whole of human civilisation. 

as usual people have questions without any information what they really do

 You seem to have a good technical background, but it might be useful to learn 
 to 
 consider problems from the point of view of the people who have them, at 
 times.
 It tends to be a much appreciated skill in the real world.

this is your point of view, ok

my point of view is instead having headaches about how many connections are
possible without problems to consider how many connections are really
needed and without my.cnf (buffer settings), any information about the
workload of the applications the whole question does not make sense



signature.asc
Description: OpenPGP digital signature


Practical connection limits MySQL 5.1/5.5

2011-04-13 Thread Jeff Lee
Hey All,

Can anyone provide some guidance as to what the practical connection limits
to MySQL 5.1/5.5 are under linux?

We're running a ruby on rails application that establishes 50 to 100
connections to our database upon startup resulting in around 1,000
persistent db connections.  I've been told to expect anywhere from 5 - 10x
our current transaction volume and I'm trying to predict where we're going
to top out.  The servers are pretty beefy so I don't have a problem
reserving memory for connections if that's what it takes but was more
concerned about other problems that might be caused by having so many
connections.

I have started looking at doing connection concentration using MySQL Proxy
Funnel but it doesn't look like it's been updated in a while so I'm not sure
how far I'll get.

Thanks


Re: Practical connection limits MySQL 5.1/5.5

2011-04-13 Thread Reindl Harald

Am 13.04.2011 23:50, schrieb Jeff Lee:
 Hey All,
 
 Can anyone provide some guidance as to what the practical connection limits
 to MySQL 5.1/5.5 are under linux?
 
 We're running a ruby on rails application that establishes 50 to 100
 connections to our database upon startup resulting in around 1,000
 persistent db connections. 

depends on how much RAM the box has
remind that every connection needs some MB for buffers

 I've been told to expect anywhere from 5 - 10x
 our current transaction volume and I'm trying to predict where we're going
 to top out.  

i can not image why 1000 connections are needed in a real world application
throw away the aüülication if it does not support connection-pooling in 2011

 The servers are pretty beefy so I don't have a problem
 reserving memory for connections if that's what it takes but was more
 concerned about other problems that might be caused by having so many
 connections

even if you have enough memory why will you throw it away for a
unusual connection count instead use the RAm for innodb-buffer-pool,
query-cache, key-buffers?





signature.asc
Description: OpenPGP digital signature


RE: Practical connection limits MySQL 5.1/5.5

2011-04-13 Thread Martin Gainty

i agree with harald

if you're using Java you should consider pooling your database connections with 
DBCP
http://commons.apache.org/dbcp/

feel free to ping me for implementation details

takk,
Martin  
__ 
Note de déni et de confidentialité
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Wed, 13 Apr 2011 23:59:43 +0200
 From: h.rei...@thelounge.net
 To: mysql@lists.mysql.com
 Subject: Re: Practical connection limits MySQL 5.1/5.5
 
 
 Am 13.04.2011 23:50, schrieb Jeff Lee:
  Hey All,
  
  Can anyone provide some guidance as to what the practical connection limits
  to MySQL 5.1/5.5 are under linux?
  
  We're running a ruby on rails application that establishes 50 to 100
  connections to our database upon startup resulting in around 1,000
  persistent db connections. 
 
 depends on how much RAM the box has
 remind that every connection needs some MB for buffers
 
  I've been told to expect anywhere from 5 - 10x
  our current transaction volume and I'm trying to predict where we're going
  to top out.  
 
 i can not image why 1000 connections are needed in a real world application
 throw away the aüülication if it does not support connection-pooling in 2011
 
  The servers are pretty beefy so I don't have a problem
  reserving memory for connections if that's what it takes but was more
  concerned about other problems that might be caused by having so many
  connections
 
 even if you have enough memory why will you throw it away for a
 unusual connection count instead use the RAm for innodb-buffer-pool,
 query-cache, key-buffers?
 
 
 
  

Re: Negative connection/thread IDs in mysqld.log?

2010-12-21 Thread 杨涛涛
Hi,
  The negative IDs is fine.  You should read the document for the data type
section, especially INT.


David Yeung, In China, Beijing.
My First Blog:http://yueliangdao0608.cublog.cn
My Second Blog:http://yueliangdao0608.blog.51cto.com
My Msn: yueliangdao0...@gmail.com



2010/12/15 Atle Veka at...@flyingcroc.net

 Hi, I tried searching for an answer to this to no avail. I noticed my
 mysqld.log contains negative connection/thread IDs. mysqld itself shows
 positive IDs as expected. Some sort of wrap?

 /usr/sbin/mysqld, Version: 5.0.32. started with:
 Tcp port: 3306  Unix socket: /tmp/mysql.sock
 Time Id CommandArgument
 101212  8:00:01 -2049127301 Connect ...


 Regards,
 Atle

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql?unsub=yueliangdao0...@gmail.com




Negative connection/thread IDs in mysqld.log?

2010-12-14 Thread Atle Veka
Hi, I tried searching for an answer to this to no avail. I noticed my 
mysqld.log contains negative connection/thread IDs. mysqld itself shows 
positive IDs as expected. Some sort of wrap?


/usr/sbin/mysqld, Version: 5.0.32. started with:
Tcp port: 3306  Unix socket: /tmp/mysql.sock
Time Id CommandArgument
101212  8:00:01 -2049127301 Connect ...


Regards,
Atle

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: localhost vs domain for connection string

2010-11-29 Thread Jerry Schwartz
-Original Message-
From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De
Meersman
Sent: Thursday, November 25, 2010 3:29 AM
To: Jerry Schwartz
Cc: Brent Clark; mysql mailing list
Subject: Re: localhost vs domain for connection string

On Wed, Nov 24, 2010 at 4:44 PM, Jerry Schwartz je...@gii.co.jp wrote:

 [JS] This might or might not be enabled by default. I'm running on Windows,
 and I seem to remember having to change it.

 # Enable named pipe, bypassing the network stack
 enable-named-pipe


Windows' named pipes are not the same as unix sockets, although the general
idea is similar. I'm not sure, but I think the Unix socket file is always
created.

[JS] I don't remember either. I also don't remember if the original question 
was about *nix or Windows.


Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341
E-mail: je...@gii.co.jp
Web site: www.the-infoshop.com



--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: localhost vs domain for connection string

2010-11-25 Thread Johan De Meersman
On Wed, Nov 24, 2010 at 4:44 PM, Jerry Schwartz je...@gii.co.jp wrote:

 [JS] This might or might not be enabled by default. I'm running on Windows,
 and I seem to remember having to change it.

 # Enable named pipe, bypassing the network stack
 enable-named-pipe


Windows' named pipes are not the same as unix sockets, although the general
idea is similar. I'm not sure, but I think the Unix socket file is always
created.


-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel


RE: localhost vs domain for connection string

2010-11-24 Thread Jerry Schwartz
-Original Message-
From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De
Meersman
Sent: Wednesday, November 24, 2010 2:39 AM
To: Jerry Schwartz
Cc: Brent Clark; mysql mailing list
Subject: Re: localhost vs domain for connection string

On Tue, Nov 23, 2010 at 7:55 PM, Jerry Schwartz je...@gii.co.jp wrote:

 IIRC, localhost is seen by the client as a magic word to mean use the
 UNIX socket, not 127.0.0.1.
 
 [JS] IF it is enabled in my.cnf.

Hmm, didn't know that bit. What's the option called ?

[JS] This might or might not be enabled by default. I'm running on Windows, 
and I seem to remember having to change it.

# SERVER SECTION
# --
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306

# Enable named pipe, bypassing the network stack
enable-named-pipe

=
Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341
E-mail: je...@gii.co.jp
Web site: www.the-infoshop.com




--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



localhost vs domain for connection string

2010-11-23 Thread Brent Clark

Hiya

Is there a difference if someone had to make the connection string the a 
domain (hosts file entry makes the machine look at its ip) as opposed to 
just using localhost.

If so would a performance hit be incurred?

I have this client that has used the domain and in netstat im  seeing 
all this


tcp0  0 own.ex.ip:50340  own.ex.ip:3306   
ESTABLISHED 30324/apache2
tcp0  0 own.ex.ip:50287  own.ex.ip:3306   
ESTABLISHED 30309/apache2
tcp0  0 own.ex.ip:3306   own.ex.ip:50287  
ESTABLISHED 29234/mysqld
tcp0  0 own.ex.ip:50357  own.ex.ip:3306   
ESTABLISHED 31714/apache2
tcp0  0 own.ex.ip:3306   own.ex.ip:50335  
ESTABLISHED 29234/mysqld


But I have another client that is using localhost and netstat is quiet 
as a mouse.


This actually never dawned on me. Hence the reason im asking
But the real reason is that the first clients machine is under heavy 
load and we are trying to see what can be improved.


Kind Regards
Brent Clark

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: localhost vs domain for connection string

2010-11-23 Thread Johan De Meersman
IIRC, localhost is seen by the client as a magic word to mean use the
UNIX socket, not 127.0.0.1.

So, yes, that would make the connection not show up in netstat :-)

On Tue, Nov 23, 2010 at 11:11 AM, Brent Clark brentgclarkl...@gmail.comwrote:

 Hiya

 Is there a difference if someone had to make the connection string the a
 domain (hosts file entry makes the machine look at its ip) as opposed to
 just using localhost.
 If so would a performance hit be incurred?

 I have this client that has used the domain and in netstat im  seeing all
 this

 tcp0  0 own.ex.ip:50340  own.ex.ip:3306   ESTABLISHED
 30324/apache2
 tcp0  0 own.ex.ip:50287  own.ex.ip:3306   ESTABLISHED
 30309/apache2
 tcp0  0 own.ex.ip:3306   own.ex.ip:50287  ESTABLISHED
 29234/mysqld
 tcp0  0 own.ex.ip:50357  own.ex.ip:3306   ESTABLISHED
 31714/apache2
 tcp0  0 own.ex.ip:3306   own.ex.ip:50335  ESTABLISHED
 29234/mysqld

 But I have another client that is using localhost and netstat is quiet as a
 mouse.

 This actually never dawned on me. Hence the reason im asking
 But the real reason is that the first clients machine is under heavy load
 and we are trying to see what can be improved.

 Kind Regards
 Brent Clark

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql?unsub=vegiv...@tuxera.be




-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel


Re: localhost vs domain for connection string

2010-11-23 Thread Jan Steinman
 From: Brent Clark brentgclarkl...@gmail.com
 
 Is there a difference if someone had to make the connection string the a 
 domain (hosts file entry makes the machine look at its ip) as opposed to just 
 using localhost.
 If so would a performance hit be incurred?

Using 'localhost' will always be faster, although perhaps imperceptibly so.


I look into the future because that’s where I am going to spend the rest of my 
life. -- George Burns
 Jan Steinman, EcoReality Co-op 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: localhost vs domain for connection string

2010-11-23 Thread Jerry Schwartz
-Original Message-
From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De
Meersman
Sent: Tuesday, November 23, 2010 6:19 AM
To: Brent Clark
Cc: mysql mailing list
Subject: Re: localhost vs domain for connection string

IIRC, localhost is seen by the client as a magic word to mean use the
UNIX socket, not 127.0.0.1.

[JS] IF it is enabled in my.cnf.

So, yes, that would make the connection not show up in netstat :-)

On Tue, Nov 23, 2010 at 11:11 AM, Brent Clark 
brentgclarkl...@gmail.comwrote:

 Hiya

 Is there a difference if someone had to make the connection string the a
 domain (hosts file entry makes the machine look at its ip) as opposed to
 just using localhost.
 If so would a performance hit be incurred?

 I have this client that has used the domain and in netstat im  seeing all
 this

 tcp0  0 own.ex.ip:50340  own.ex.ip:3306   ESTABLISHED
 30324/apache2
 tcp0  0 own.ex.ip:50287  own.ex.ip:3306   ESTABLISHED
 30309/apache2
 tcp0  0 own.ex.ip:3306   own.ex.ip:50287  ESTABLISHED
 29234/mysqld
 tcp0  0 own.ex.ip:50357  own.ex.ip:3306   ESTABLISHED
 31714/apache2
 tcp0  0 own.ex.ip:3306   own.ex.ip:50335  ESTABLISHED
 29234/mysqld

 But I have another client that is using localhost and netstat is quiet as a
 mouse.

 This actually never dawned on me. Hence the reason im asking
 But the real reason is that the first clients machine is under heavy load
 and we are trying to see what can be improved.

 Kind Regards
 Brent Clark

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql?unsub=vegiv...@tuxera.be




--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: localhost vs domain for connection string

2010-11-23 Thread Johan De Meersman
On Tue, Nov 23, 2010 at 7:55 PM, Jerry Schwartz je...@gii.co.jp wrote:

 IIRC, localhost is seen by the client as a magic word to mean use the
 UNIX socket, not 127.0.0.1.
 
 [JS] IF it is enabled in my.cnf.


Hmm, didn't know that bit. What's the option called ?

-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel


Re: Persistent Connection VS One Time Connection Was Update Table

2010-09-27 Thread Willy Mularto
I have checked Apache's log. There is no refused connection. And also with 
MySQL I have set it to 999 connections and view the processes. Maximum 
connection ever reached was only around 200. What I'm thinking now is. Is it 
because of I use one time connection method? I mean every time the script's 
called I create new connection and disconnect it after execute the query. Thanks



sangprabv
sangpr...@gmail.com
http://www.petitiononline.com/froyo/


On Sep 27, 2010, at 7:28 PM, Nigel Wood wrote:

 On Mon, 2010-09-27 at 11:25 +0100, Willy Mularto wrote:
 Hi,
 I work on MySQL 5 with PHP 5 and use Apache 2 as the webserver. I have a 
 simple query that searches matched row id and update the field via  HTTP GET 
 query. On a low load it succeed update the row. But on high traffic 
 sometimes it failed to update some  rows. No errors return by the script. 
 What usually cause this and how to solve this problem? Thanks
 
 
 1.) Are you sure the script is executed under those conditions? Is
 Apache refusing the request because to many children have been forked?
 
 2.) Are you sure the script will report if MySQL fails with too many
 connections?
 
 
 sangprabv
 sangpr...@gmail.com
 http://www.petitiononline.com/froyo/
 
 
 
 
 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: cant establish connection at application side.

2010-09-03 Thread Jangita

On 02/09/2010 6:01 p, karthik kumar wrote:


Wow .. Cool that solved our problem...
Thanks a lott ..


No problem, it took me two weeks to figure out why it takes sooo long to 
log in; :-) enjoy!

--
Jangita | +256 76 91 8383 | Y!  MSN: jang...@yahoo.com
Skype: jangita | GTalk: jangita.nyag...@gmail.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



cant establish connection at application side.

2010-09-02 Thread karthik kumar
Hi .. I am facing a problem in mysql.

 I am getting error  'Can not open connection' at the application
side  which happens at random timings.   What i found was at whenever the
problem occurs it takes 70 secs for connecting to mysql server. The machine
is a high end quad core, 16 GB ram, dedicated for mysql

 I guess its problem is with my configurations.   My guess is like if i ve
configured some buffer to x  and when when mysql is being used it keeps
coming down and slows down connecting time for clients ( its a  wild guess )
..  So can I do something to monitor the resources/ connections/ or
something else to see what does mysql lacks when connection time reaches 70
secs or my application gets a 'Can not open connection' problem so that I
give a larger value for that thing  ..
  Certainly changing (timout's .. or something else ) in application
would solve but thats not a solution for my situation .. i have configured
max number of connections to 500 .. and the total number of connections
hardly reach 100 ..
   Any help please ..

Thanks
Karthik.


Re: cant establish connection at application side.

2010-09-02 Thread Michael Dykman
You might want to have a good close look at the state of your network
before you consider mysql as a cause..

 - michael dykman

On Thu, Sep 2, 2010 at 10:57 AM, karthik kumar kumarkarth...@gmail.com wrote:
 Hi .. I am facing a problem in mysql.

         I am getting error  'Can not open connection' at the application
 side  which happens at random timings.   What i found was at whenever the
 problem occurs it takes 70 secs for connecting to mysql server. The machine
 is a high end quad core, 16 GB ram, dedicated for mysql

  I guess its problem is with my configurations.   My guess is like if i ve
 configured some buffer to x  and when when mysql is being used it keeps
 coming down and slows down connecting time for clients ( its a  wild guess )
 ..  So can I do something to monitor the resources/ connections/ or
 something else to see what does mysql lacks when connection time reaches 70
 secs or my application gets a 'Can not open connection' problem so that I
 give a larger value for that thing  ..
          Certainly changing (timout's .. or something else ) in application
 would solve but thats not a solution for my situation .. i have configured
 max number of connections to 500 .. and the total number of connections
 hardly reach 100 ..
           Any help please ..

 Thanks
 Karthik.




-- 
 - michael dykman
 - mdyk...@gmail.com

 May the Source be with you.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: cant establish connection at application side.

2010-09-02 Thread karthik kumar
I am running a tool  which just makes connection and closes it  (using JDBC)
.. The JDBC connection never says 'Can not establish connection' .. I just
says  ' at this time '  took  70 secs  to establish a connection .. So my
guess was network was not a problem,( since connection was established but
takes extra time )  .. The application says  'Can not establish connection'
= cant establish connection in a specified timeout..

Am i guessing anything wrong or can I get any ideas please ?

Thanks
Karthik.





On Thu, Sep 2, 2010 at 8:32 PM, Michael Dykman mdyk...@gmail.com wrote:

 You might want to have a good close look at the state of your network
 before you consider mysql as a cause..

  - michael dykman

 On Thu, Sep 2, 2010 at 10:57 AM, karthik kumar kumarkarth...@gmail.com
 wrote:
  Hi .. I am facing a problem in mysql.
 
  I am getting error  'Can not open connection' at the application
  side  which happens at random timings.   What i found was at whenever the
  problem occurs it takes 70 secs for connecting to mysql server. The
 machine
  is a high end quad core, 16 GB ram, dedicated for mysql
 
   I guess its problem is with my configurations.   My guess is like if i
 ve
  configured some buffer to x  and when when mysql is being used it keeps
  coming down and slows down connecting time for clients ( its a  wild
 guess )
  ..  So can I do something to monitor the resources/ connections/ or
  something else to see what does mysql lacks when connection time reaches
 70
  secs or my application gets a 'Can not open connection' problem so that I
  give a larger value for that thing  ..
   Certainly changing (timout's .. or something else ) in
 application
  would solve but thats not a solution for my situation .. i have
 configured
  max number of connections to 500 .. and the total number of connections
  hardly reach 100 ..
Any help please ..
 
  Thanks
  Karthik.
 



 --
  - michael dykman
  - mdyk...@gmail.com

  May the Source be with you.



Re: cant establish connection at application side.

2010-09-02 Thread Jangita

On 02/09/2010 4:57 p, karthik kumar wrote:

Hi .. I am facing a problem in mysql.

  I am getting error  'Can not open connection' at the application
side  which happens at random timings.   What i found was at whenever the
problem occurs it takes 70 secs for connecting to mysql server. The machine
is a high end quad core, 16 GB ram, dedicated for mysql

  I guess its problem is with my configurations.   My guess is like if i ve
configured some buffer to x  and when when mysql is being used it keeps
coming down and slows down connecting time for clients ( its a  wild guess )
..  So can I do something to monitor the resources/ connections/ or
something else to see what does mysql lacks when connection time reaches 70
secs or my application gets a 'Can not open connection' problem so that I
give a larger value for that thing  ..
   Certainly changing (timout's .. or something else ) in application
would solve but thats not a solution for my situation .. i have configured
max number of connections to 500 .. and the total number of connections
hardly reach 100 ..
Any help please ..

Thanks
Karthik.

Try adding skip-name-resolve on your mysql.conf file; long connection 
times sometimes are caused by the server trying to resolve, and with 
many people connecting can sometimes slow the server to a halt!


Make sure that your users table has IP addresses instead of host names 
on the user table eg. 127.0.0.1 instead of localhost (since mysql wount 
resolve anymore)


--
Jangita | +256 76 91 8383 | Y!  MSN: jang...@yahoo.com
Skype: jangita | GTalk: jangita.nyag...@gmail.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: cant establish connection at application side.

2010-09-02 Thread Leslie Doak
I had a similar problem and found a solution. My WAMP server could not serve
pages because the port that it was configured to utilize was in use by my
Skype app, which loaded first. All that I had to do, was quit out of Skype,
then start WAMP server, then restart Skype (which, I think, uses a different
port if it's first choice is in use).
Good luck.
-Leslie

On Thu, Sep 2, 2010 at 8:29 AM, karthik kumar kumarkarth...@gmail.comwrote:

 I am running a tool  which just makes connection and closes it  (using
 JDBC)
 .. The JDBC connection never says 'Can not establish connection' .. I just
 says  ' at this time '  took  70 secs  to establish a connection .. So my
 guess was network was not a problem,( since connection was established but
 takes extra time )  .. The application says  'Can not establish connection'
 = cant establish connection in a specified timeout..

 Am i guessing anything wrong or can I get any ideas please ?

 Thanks
 Karthik.





 On Thu, Sep 2, 2010 at 8:32 PM, Michael Dykman mdyk...@gmail.com wrote:

  You might want to have a good close look at the state of your network
  before you consider mysql as a cause..
 
   - michael dykman
 
  On Thu, Sep 2, 2010 at 10:57 AM, karthik kumar kumarkarth...@gmail.com
  wrote:
   Hi .. I am facing a problem in mysql.
  
   I am getting error  'Can not open connection' at the
 application
   side  which happens at random timings.   What i found was at whenever
 the
   problem occurs it takes 70 secs for connecting to mysql server. The
  machine
   is a high end quad core, 16 GB ram, dedicated for mysql
  
I guess its problem is with my configurations.   My guess is like if i
  ve
   configured some buffer to x  and when when mysql is being used it keeps
   coming down and slows down connecting time for clients ( its a  wild
  guess )
   ..  So can I do something to monitor the resources/ connections/ or
   something else to see what does mysql lacks when connection time
 reaches
  70
   secs or my application gets a 'Can not open connection' problem so that
 I
   give a larger value for that thing  ..
Certainly changing (timout's .. or something else ) in
  application
   would solve but thats not a solution for my situation .. i have
  configured
   max number of connections to 500 .. and the total number of connections
   hardly reach 100 ..
 Any help please ..
  
   Thanks
   Karthik.
  
 
 
 
  --
   - michael dykman
   - mdyk...@gmail.com
 
   May the Source be with you.
 




-- 
Leslie Doak
Classic Page Works
619-222-3625 | leslied...@gmail.com | http://www.ClassicPageWorks.com
Twitter: http://twitter.com/lesliedoak | LinkedIn:
http://www.linkedin.com/in/lesliedoak


Re: cant establish connection at application side.

2010-09-02 Thread karthik kumar
Wow .. Cool that solved our problem...
Thanks a lott ..



On Thu, Sep 2, 2010 at 9:20 PM, Jangita jang...@jangita.com wrote:

 On 02/09/2010 4:57 p, karthik kumar wrote:

 Hi .. I am facing a problem in mysql.

  I am getting error  'Can not open connection' at the application
 side  which happens at random timings.   What i found was at whenever the
 problem occurs it takes 70 secs for connecting to mysql server. The
 machine
 is a high end quad core, 16 GB ram, dedicated for mysql

  I guess its problem is with my configurations.   My guess is like if i ve
 configured some buffer to x  and when when mysql is being used it keeps
 coming down and slows down connecting time for clients ( its a  wild guess
 )
 ..  So can I do something to monitor the resources/ connections/ or
 something else to see what does mysql lacks when connection time reaches
 70
 secs or my application gets a 'Can not open connection' problem so that I
 give a larger value for that thing  ..
   Certainly changing (timout's .. or something else ) in
 application
 would solve but thats not a solution for my situation .. i have configured
 max number of connections to 500 .. and the total number of connections
 hardly reach 100 ..
Any help please ..

 Thanks
 Karthik.

  Try adding skip-name-resolve on your mysql.conf file; long connection
 times sometimes are caused by the server trying to resolve, and with many
 people connecting can sometimes slow the server to a halt!

 Make sure that your users table has IP addresses instead of host names on
 the user table eg. 127.0.0.1 instead of localhost (since mysql wount resolve
 anymore)

 --
 Jangita | +256 76 91 8383 | Y!  MSN: jang...@yahoo.com
 Skype: jangita | GTalk: jangita.nyag...@gmail.com

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql?unsub=kumarkarth...@gmail.com




Re: Fixed Connection Diagnostic Tool

2010-07-07 Thread michel

Mike, much thanks and I have it fixed!


The problem was that I screwed up setting the database permissions. I am 
really happy that I learned about


mysql -h


It will be a great help!



Michel


- Original Message - 
From: Michael Dykman mdyk...@gmail.com

To: michel compu...@videotron.ca
Cc: mysql@lists.mysql.com
Sent: Tuesday, July 06, 2010 7:15 PM
Subject: Re: Fixed Connection Diagnostic Tool


C3P0 connection does, indeed work well on remote machines..  In fact,
I only deploy it locally on dev servers.  My production systems all
use c3p0 on remote servers.

Again, if you can connect from the command line of your client machine
to the server *via TCP* with the same credentials as your DataSource
is using, then it will all just work fine.  You appear to have
specified a bind address which made local TCP connections impossible.
Address that, and you sohuld have no trouble at all.

- md

On Tue, Jul 6, 2010 at 6:45 PM, michel compu...@videotron.ca wrote:

Thank you all for the help and info! This error happened because I started
MySQL with -bind-address=91.203.57.207; even if Softslate is given the
proper IP address and port number is fails on connection pooling. I fixed
the problem by setting the MySQL IP address to 127.0.0.1.

I am thinking that the reason is that the C3P0 connection pooling cannot
work on a 'remote' machine.


Michel


- Original Message - From: Rob Wultsch wult...@gmail.com
To: michel compu...@videotron.ca
Cc: mysql@lists.mysql.com
Sent: Tuesday, July 06, 2010 1:52 AM
Subject: Re: Connection Diagnostic Tool



On Mon, Jul 5, 2010 at 3:55 PM, michel compu...@videotron.ca wrote:


I have been trying to figure this one out, but I don't have the skill
sets
here so I can use some help.

I tried ' -h 127.0.0.1' in my bash shell and I get a command not found,
so I
am still really off-the-mark. Is there a place on the net I can look up
what
it does and how to run it?



Thanks!


I am pretty sure Michael that meant running the command line mysql 
client:

mysql -uuser -ppass -h127.0.0.1 -e 'select hello world!'


--
Rob Wultsch
wult...@gmail.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=compu...@videotron.ca




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=mdyk...@gmail.com






--
- michael dykman
- mdyk...@gmail.com

May the Source be with you.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=compu...@videotron.ca


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Fixed Connection Diagnostic Tool

2010-07-06 Thread michel
Thank you all for the help and info! This error happened because I started 
MySQL with -bind-address=91.203.57.207; even if Softslate is given the 
proper IP address and port number is fails on connection pooling. I fixed 
the problem by setting the MySQL IP address to 127.0.0.1.


I am thinking that the reason is that the C3P0 connection pooling cannot 
work on a 'remote' machine.



Michel


- Original Message - 
From: Rob Wultsch wult...@gmail.com

To: michel compu...@videotron.ca
Cc: mysql@lists.mysql.com
Sent: Tuesday, July 06, 2010 1:52 AM
Subject: Re: Connection Diagnostic Tool



On Mon, Jul 5, 2010 at 3:55 PM, michel compu...@videotron.ca wrote:


I have been trying to figure this one out, but I don't have the skill 
sets

here so I can use some help.

I tried ' -h 127.0.0.1' in my bash shell and I get a command not found, 
so I
am still really off-the-mark. Is there a place on the net I can look up 
what

it does and how to run it?



Thanks!


I am pretty sure Michael that meant running the command line mysql client:
mysql -uuser -ppass -h127.0.0.1 -e 'select hello world!'


--
Rob Wultsch
wult...@gmail.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: 
http://lists.mysql.com/mysql?unsub=compu...@videotron.ca





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Fixed Connection Diagnostic Tool

2010-07-06 Thread Michael Dykman
C3P0 connection does, indeed work well on remote machines..  In fact,
I only deploy it locally on dev servers.  My production systems all
use c3p0 on remote servers.

Again, if you can connect from the command line of your client machine
to the server *via TCP* with the same credentials as your DataSource
is using, then it will all just work fine.  You appear to have
specified a bind address which made local TCP connections impossible.
Address that, and you sohuld have no trouble at all.

 - md

On Tue, Jul 6, 2010 at 6:45 PM, michel compu...@videotron.ca wrote:
 Thank you all for the help and info! This error happened because I started
 MySQL with -bind-address=91.203.57.207; even if Softslate is given the
 proper IP address and port number is fails on connection pooling. I fixed
 the problem by setting the MySQL IP address to 127.0.0.1.

 I am thinking that the reason is that the C3P0 connection pooling cannot
 work on a 'remote' machine.


 Michel


 - Original Message - From: Rob Wultsch wult...@gmail.com
 To: michel compu...@videotron.ca
 Cc: mysql@lists.mysql.com
 Sent: Tuesday, July 06, 2010 1:52 AM
 Subject: Re: Connection Diagnostic Tool


 On Mon, Jul 5, 2010 at 3:55 PM, michel compu...@videotron.ca wrote:

 I have been trying to figure this one out, but I don't have the skill
 sets
 here so I can use some help.

 I tried ' -h 127.0.0.1' in my bash shell and I get a command not found,
 so I
 am still really off-the-mark. Is there a place on the net I can look up
 what
 it does and how to run it?



 Thanks!

 I am pretty sure Michael that meant running the command line mysql client:
 mysql -uuser -ppass -h127.0.0.1 -e 'select hello world!'


 --
 Rob Wultsch
 wult...@gmail.com

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe: http://lists.mysql.com/mysql?unsub=compu...@videotron.ca



 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:    http://lists.mysql.com/mysql?unsub=mdyk...@gmail.com





-- 
 - michael dykman
 - mdyk...@gmail.com

 May the Source be with you.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



re: Connection Diagnostic Tool

2010-07-05 Thread michel


I have been trying to figure this one out, but I don't have the skill sets
here so I can use some help.

I tried ' -h 127.0.0.1' in my bash shell and I get a command not found, so 
I
am still really off-the-mark. Is there a place on the net I can look up 
what

it does and how to run it?



Thanks!

- Original Message - 
From: Michael Dykman mdyk...@gmail.com

To: michel compu...@videotron.ca
Sent: Saturday, July 03, 2010 11:37 PM
Subject: Re: Connection Diagnostic Tool


You are right..  Java never coonnects on that domain socket, it
*always* used TCP.

Check your credentials at the command line using -h 127.0.0.1 (or even
the LAN ip, depending on how your JDBC connections are configured)
which will force your client to connect via TCP, just as Java will.

I expect that you will find that there are permission errors
preventing the TCP connec which are not obvious when connecting via
the domain socket.

- michael

On Sat, Jul 3, 2010 at 11:14 PM, michel compu...@videotron.ca wrote:

Michael,


I am able to connect using the socket, so MySQL is working fine. The 
problem
is when 'SoftSlate Commerce' tries to connect as localhost. From what I 
have

been reading I am using the 'mysql.sock', but it's not at the default
'/tmp/mysql.sock', it's created in /home/sgdev/mysql; so it may bew 
that

I need a way to specify to 'SoftSlate Commerce' where the socket is.


Regards,



Michel



- Original Message - From: Michael Dykman mdyk...@gmail.com
To: michel compu...@videotron.ca
Cc: mysql@lists.mysql.com
Sent: Saturday, July 03, 2010 2:43 PM
Subject: Re: Connection Diagnostic Tool


I use c3p0 to manage MySQL connections in my JVM stack and have for
years in many installations, I have never had to do anything special.
If I can connect to the server through the console at the command line
of the client machine using the same credentials, then the stack will
just work. Are you using Tomcat's JNDI config? I have always found
those to be a pain.. I manage my DataSource via Spring which I find
to be much more portable.

At the end of the day, if you are able to connect manually as
described above but your Tomcat application cannot, it's is not a
MySQL problem.. It's more likely a Tomcat/JNDI problem. If you can't
connect via the command line (same client, same host, same
credentials), then we have a MySQL issue we can address as such.

- michael dykman


On Sat, Jul 3, 2010 at 8:08 AM, michel compu...@videotron.ca wrote:


I am setting up the Softslate web store package that uses Hibernate to
connect to MySQL. Softslate fails to connect to MysQL on the c3p0
connection
pooling. While I would love to solve this little problem it would be 
wiser

if I learn to diagnose the problem. Is there a tool that can run on the
Tomcat server that can help me replicate/diagnose the problem? 
Softslaste

is
running on the same box as MySQL.


Thank you!

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=mdyk...@gmail.com






--
- michael dykman
- mdyk...@gmail.com

May the Source be with you.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=compu...@videotron.ca






--
- michael dykman
- mdyk...@gmail.com

May the Source be with you. 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Connection Diagnostic Tool

2010-07-05 Thread Rob Wultsch
On Mon, Jul 5, 2010 at 3:55 PM, michel compu...@videotron.ca wrote:

 I have been trying to figure this one out, but I don't have the skill sets
 here so I can use some help.

 I tried ' -h 127.0.0.1' in my bash shell and I get a command not found, so I
 am still really off-the-mark. Is there a place on the net I can look up what
 it does and how to run it?



 Thanks!

I am pretty sure Michael that meant running the command line mysql client:
mysql -uuser -ppass -h127.0.0.1 -e 'select hello world!'


-- 
Rob Wultsch
wult...@gmail.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Connection Diagnostic Tool

2010-07-03 Thread michel
I am setting up the Softslate web store package that uses Hibernate to 
connect to MySQL. Softslate fails to connect to MysQL on the c3p0 connection 
pooling. While I would love to solve this little problem it would be wiser 
if I learn to diagnose the problem. Is there a tool that can run on the 
Tomcat server that can help me replicate/diagnose the problem? Softslaste is 
running on the same box as MySQL.



Thank you! 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Connection Diagnostic Tool

2010-07-03 Thread Michael Dykman
I use c3p0 to manage MySQL connections in my JVM stack and have for
years in many installations, I have never had to do anything special.
If I can connect to the server through the console at the command line
of the client machine using the same credentials, then the stack will
just work.  Are you using Tomcat's  JNDI config?  I have always found
those to be a pain..  I manage my DataSource via Spring which I find
to be much more portable.

At the end of the day, if you are able to connect manually as
described above but your Tomcat application cannot, it's is not a
MySQL problem..  It's more likely a Tomcat/JNDI problem.  If you can't
connect via the command line (same client, same host, same
credentials), then we have a MySQL issue we can address as such.

 - michael dykman


On Sat, Jul 3, 2010 at 8:08 AM, michel compu...@videotron.ca wrote:
 I am setting up the Softslate web store package that uses Hibernate to
 connect to MySQL. Softslate fails to connect to MysQL on the c3p0 connection
 pooling. While I would love to solve this little problem it would be wiser
 if I learn to diagnose the problem. Is there a tool that can run on the
 Tomcat server that can help me replicate/diagnose the problem? Softslaste is
 running on the same box as MySQL.


 Thank you!

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:    http://lists.mysql.com/mysql?unsub=mdyk...@gmail.com





-- 
 - michael dykman
 - mdyk...@gmail.com

 May the Source be with you.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Determine connection origins

2010-06-30 Thread Machiel Richards
Good day all

 

We are trying to find out where the current connections  on
our Mysql database originates from.

 

We are receiving 4000+ connections at the moment where this
was usually only about half this.

 

Is there a way of determining where the connections
originates from ? i.e - website, internal, import scripts, etc...

 

Machiel Richards

MySQL DBA

Relational Database Consulting 

 

RDC_Logo

 



  1   2   3   4   5   6   7   8   9   10   >