Re: Prevent execution of queries without a WHERE clause
Hi, You can check this feature out on section 2.9 on the mysql 5.0 certification guide (page 44). this feature has some side effects other than requesting a where with deletes and updates i.e. Quoting for whoever doesn't have the MySQL certification study guide 1.UPDATE and DELETE statments are allowed only if then include a WHERE clause that spedifically identifies which records to update or delete by means of a key,value or if they include a LIMIT clause. 2. Output from single-table SELECT statments is restricted to no more than 1,000 rows unless the statment include a LIMIT clause 3. Multiple-table SELECT statments are allowed only if MySQL will examine no more than 1,000,000 rows to process the query. The --i-am-a-dummy option is a synonym for --safe-updates. :) Gluck Darren On Tue, Sep 8, 2009 at 10:25 AM, Ian Simpson i...@it.myjobgroup.co.ukwrote: Thanks John, that's done the trick On Mon, 2009-09-07 at 18:24 +0100, John Daisley wrote: Add the option 'safe-updates' to the mysql section of your 'my.cnf' / 'my.ini' file and restart the mysqld service. [mysql] Safe-updates Regards John Daisley Mobile +44(0)7812 451238 Email j...@butterflysystems.co.uk Certified MySQL 5 Database Administrator (CMDBA) Certified MySQL 5 Developer Cognos BI Developer --- Sent from HP IPAQ mobile device. -Original Message- From: Ian Simpson i...@it.myjobgroup.co.uk Sent: Monday, September 07, 2009 5:14 PM To: mysql@lists.mysql.com Subject: Prevent execution of queries without a WHERE clause Hi all, I vaguely recall finding mention a MySQL command or start-up option that blocked any update or delete query that didn't have a WHERE component, to prevent statements accidentally affecting too many rows (like those of a certain absent-minded web developer who might work for the same company as me...). I now can't find any reference to it, other than a vague mention of using safe mode in the comments in the mysql docs; it doesn't explain if that is starting with --safe-mode, or using the mysqld_safe script. Both of these modes seem remarkably poorly documented, making me unwilling to experiment with them without advice, in case one of them disables networking or something similar. Hoping someone can help with this. Thanks -- Ian Simpson System Administrator MyJobGroup -- Ian Simpson System Administrator MyJobGroup -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=i...@mysqlpreacher.com
Re: optimize my.cnf
Hi Christos, Performance optimization is very subjective, and if you are experiencing low performance it can be a million different things. The description you provided didn't mention any of your current my.cnf settings, nor did it mention what kind of tables your database contains, size of data, types of indexes, engines used by your tables etc. You mention you have a quad core machine running 8G ram how much of that ram is being used by MySQL and how much by other applications? how much of it is free? What kind of CPU usage are you experiencing, what is the size of your db, are you logging slow queries and checking for missing indexes? My.cnf is not a magic box which improves performance by setting a couple of variables and normally the performance improvements are minimal as compared to other things like: 1: faster disks 2: normalized and correctly designed db (not in your power I guess) 3: good code in your application (not in your power either) I'd suggest you read High Performance MySQL 2nd ed which will definitely be of help. Sorry for bombarding you with questions but performance tuning is not something you do by setting a couple of params on my.cnf! Gluck Darren www.mysqlpreacher.com - yet another blog from a mysql dba www.securich.com - a mysql security plugin On Thu, Sep 3, 2009 at 10:06 AM, Christos Pelekis chris...@blueice.orgwrote: Hi, can you please send me some optimization examples for my.cnf ? I use mysql 5.1.37 The server run just 2 very busy forums. It is quad core cpu and 8 giga ram so we have lot of run (run debian) Can you please give me some examples? Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=i...@mysqlpreacher.com
Re: reverting to passwd-less root w/out --skip-grant-tables
Log in as root and run: set password = ''; OR update mysql.user set Password='' where User='root'; this is TOTALLY INSECURE but if that's what you want, then it should do the trick. Regards, Darren Cassar www.mysqlpreacher.com www.securich.com On Wed, Aug 26, 2009 at 2:33 AM, Joe mysql@bluepolka.net wrote: I'm trying to get back to an earlier state where we started mysqld withOUT --skip-grant-tables but the root user had no password. Yes, insecure, but we're in restoration mode here. How do I reset/revert the root password to no password without running with --skip-grant-tables? Thanks in advance. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=i...@mysqlpreacher.com