REstricting MySQL access to port 3306

2009-09-24 Thread The Doctor
Some months a back I had to firewall port 3306 due to DDoS. I cannot do this now as a client needs 3306 outside the LAN. What can I do to prevent DDoS on my MySQL server? -- Member - Liberal International This is doc...@nl2k.ab.ca Ici doc...@nl2k.ab.ca God, Queen and country! Beware

RE: REstricting MySQL access to port 3306

2009-09-24 Thread John
I don't think there's anything specific to MySQL but for any system you should ensure you have a good well configured firewall set up, make sure antivirus software is installed and kept up to date, ensure programs only run with essential permissions and keep your system up to date with all the

Re: REstricting MySQL access to port 3306

2009-09-24 Thread muhammad subair
If just view people can access MySQL in port 3306 you can set in firewall to not accessible from all host except the host which you list. If very wide people need the MySQL, like in hosting provider, I think you can use application which make people can manage MySQL via server such as PHPMyAdmin,

RE: REstricting MySQL access to port 3306

2009-09-24 Thread Willy
Limit connection from trusted host will reduce it. And its better handled by firewall . Willy Sent from my Sony Ericsson XPERIA™ X1. -Original Message- From: John j...@butterflysystems.co.uk Sent: 24 September 2009 15:07 To: 'The Doctor' doc...@doctor.nl2k.ab.ca; mysql@lists.mysql.com

Re: REstricting MySQL access to port 3306

2009-09-24 Thread Claudio Nanni
and in case it is feasible use a custom port to prevent specific attacks to mysql. All clients and application servers will need to connect to the new port. Claudio 2009/9/24 Willy sangpr...@gmail.com Limit connection from trusted host will reduce it. And its better handled by firewall .

Re: REstricting MySQL access to port 3306

2009-09-24 Thread Johan De Meersman
The 'recent' module in iptables allows you to automatically block IPs that open more than x connections in y seconds. As long as the ddos doesn't saturate your line, that'll help a lot. On Thu, Sep 24, 2009 at 10:56 AM, Claudio Nanni claudio.na...@gmail.comwrote: and in case it is feasible

Excluding records that don't match condition

2009-09-24 Thread James Fryer
I have a database of Titles (books, magazines, etc.) with a M:M relation to Keywords. I would like to be able to generate queries for the condition Return titles matching X with keywords NOT matching A. This seems quite hard to do. Here is a minimal table structure: CREATE TABLE Title (

MySQL University: Speakers wanted!

2009-09-24 Thread Stefan Hinz
We'd like to fill the remaining session slots for MySQL University this year. Currently, there are 7 available slots in 2009, as can be seen here: http://forge.mysql.com/wiki/MySQL_University#Upcoming_Sessions Anyone who has something technical to say about MySQL qualifies as a speaker. MySQL

Re: Excluding records that don't match condition

2009-09-24 Thread Mike Spreitzer
I'm not sure whether the following will meet your needs. Have you considered SELECT title FROM Title WHERE NOT EXISTS (SELECT * FROM Keyword, TitleKeyword WHERE Keyword.kw='A' AND Keyword.id=TitleKeyword.keyword_id AND TitleKeyword.title_id=Title.id) Regards, Mike Spreitzer SMTP:

RE: query optimization question (my struggle against 'using temporary; using filesort')

2009-09-24 Thread Gavin Towey
Hi Ciaran, So I think there's a couple things going on: 1. The explain plan for your slow query looks wrong, such as mysql is confused. It's possible your index statistics are incorrect. Try ANALYZE TABLE on listings and addresses. I think a sure way to fix it is to add STRAIGHT_JOIN to

Re: query optimization question (my struggle against 'using temporary; using filesort')

2009-09-24 Thread Ciaran Lee
Hi Gavin,Thanks very much, I'll implement as many of your suggestions as possible. The varchar(255)'s are inexcusable and I feel suitably ashamed :) The queries were generated by ActiveRecord (an ORM library for Ruby), although even if I had written them myself they would probably not be much

Master/Slave Replication Question

2009-09-24 Thread Tim Gustafson
Hi, I'm a big fan of mySQL's multi-master replication, but I've run into gotchas over the years. Off the top of my head, I can think of: - auto_increment complications, - if you have a-b-c-a, it's not exactly graceful to insert a d server for a-b-c-d-a - if you have a-b-c-a and b fails, it's

INSERT ... SELECT ON DUPLICATE

2009-09-24 Thread dbrb2002-sql
Does anyone know if I can add a hint SQL_BUFFER_RESULT to INSERT .. SELECT ON DUPLICATE ex.. INSERT INTO foo SELECT SQL_BUFFER_RESULT* FROM bar ON DUPLICATE KEY UPDATE foo.X=.. Both my tables foo and bar are InnoDB; but the idea is to release the lock on bar as soon as possible by moving the