Re: Version 5.6.2-m5 Boolean Datatype

2013-05-22 Thread Darryle Steplight
Hey Neil, Why not just store it as a TINYINT, that's what I do when I only care about 0 or 1 values? On Wed, May 22, 2013 at 2:19 PM, Neil Tompkins wrote: > Hi Shawn > > I plan in installing the latest MySQL version tomorrow. Does MySQL not > support Bool eg true and false > > Neil > > On 22

Re: One table gets locked by itself

2012-05-08 Thread Darryle Steplight
My plan B was basically what Rick and Claudio said. Check your my.conf file for this variable LONG_QUERY_TIME . That determines how long a query will run before it's considered slow. You may need to adjust that setting, but that will just get rid of the symptom and not the problem at hand. Findi

Re: One table gets locked by itself

2012-05-08 Thread Darryle Steplight
In your my.conf or configuration file look for an attribute that says "LOG_SLOW_QUERIES " , that should point to the path of your slow query log. On Tue, May 8, 2012 at 10:19 AM, abhishek jain wrote: > Hi > Thanks, > Where can i find query log for previous one,or i have to do some config in > my.

Re: mysql for os x 10.6 (64bit) cannot start service

2012-02-29 Thread Darryle Steplight
If you are going to use "su" to officially switch to the root users just make sure you do "su -" with the dash. On Wed, Feb 29, 2012 at 2:10 PM, Reindl Harald wrote: > > > Am 29.02.2012 19:20, schrieb Larry Martell: >> Is the sudo succeeding? If it is, then there's no reason you shouldn't >> be

Re: mysql for os x 10.6 (64bit) cannot start service

2012-02-29 Thread Darryle Steplight
t; >> On Wed, Feb 29, 2012 at 7:46 AM, Elim Qiu wrote: >> >> > Yes, there is an icon. I can open the preference but the start service >> >> > button cannot do the job >> >> >> >> What

Re: mysql for os x 10.6 (64bit) cannot start service

2012-02-29 Thread Darryle Steplight
I have version 5.5.17 MySQL Community Server (GPL) on my Mac. On Wed, Feb 29, 2012 at 9:36 AM, Elim Qiu wrote: > The vertion of MySQL that I cannot start is 5.1.61 (the only one for 5.1* > mac at mysql.com) > > On Wed, Feb 29, 2012 at 7:05 AM, Elim Qiu wrote: > >> *I downloaded **Mac OS X ver.

Re: mysql for os x 10.6 (64bit) cannot start service

2012-02-29 Thread Darryle Steplight
Do you see a MySql icon under System Preferences > Other ? That's how I start MySql on my Mac. On Wed, Feb 29, 2012 at 9:05 AM, Elim Qiu wrote: > *I downloaded **Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive, installed to > my pretty clean os x 10.6.8 (snow leopard) after (1st time) started apac

Re: left join two tables

2011-04-28 Thread Darryle Steplight
Hi Johan, I think you probably want something like this. Give the following a shot. SELECT * FROM table1 LEFT JOIN table2 ON table1.ID = table2.subID LEFT JOIN table3 ON table1.ID= table3.subID On Thu, Apr 28, 2011 at 9:41 AM, Johan De Meersman wrote: > Hey there, > > - Original Message -

Re: CURRENT insert ID

2011-01-21 Thread Darryle Steplight
@Joao - I'm currently building a database out right now that has this scenario. One field can be the primary key, that has a purpose for holding the record id, another field can hold the value. Let say there are two fields, id, s_id. Initially, you insert a record and `id` is now 100 and you update

Re: Update Syntax

2009-07-26 Thread Darryle Steplight
Hi Vicor, Look into INSERT ON DUPLICATE or REPLACE statements. You need to have a primary key or unique key for these too work. On Sun, Jul 26, 2009 at 1:11 PM, Victor Subervi wrote: > Hi; > I would like to test the following: > > update maps set map where site=mysite; > > to see if there is s

Re: ordering search results

2009-07-17 Thread Darryle Steplight
You might have to change the collation you are currently using to one that best match the language of those weird accents you are referring too. That's part of the reason you may be getting unexpected results with your ORDER BY statement. Also, can you show us your select statements? On Fri, Jul 1

Re: Hard? query to with group order by group head's name

2009-07-15 Thread Darryle Steplight
Hi Elim, I didn't test it out but it sounds like you want to do this " SELECT * FROM group_members GROUP BY head_id, member_id ORDER BY name ASC ". On Thu, Jul 16, 2009 at 1:20 AM, Elim PDT wrote: > My table group_member looks like this: > +---+---+-+ > | member_id | name

Re: Slow query Performance

2009-07-15 Thread Darryle Steplight
Can you show us the output of DESCRIBE score and SHOW INDEX FROM score? On Wed, Jul 15, 2009 at 6:44 PM, Tachu® wrote: > I'm having random query slowness that i can only reproduce once. My main > question is that the query runs faster the second time around but i dont > have query cache enabled he

Re: mysql select query

2009-07-12 Thread Darryle Steplight
hat, but i really need all cols in the table, i think the problem > maybe caused by one of the col which is text type, each record of this col > has 2000 characters. this makes the size of record more biger. > > 2009/7/13 Darryle Steplight >> >> You are still doing SELECT

Re: mysql select query

2009-07-12 Thread Darryle Steplight
nge | index_seq_start | index_seq_start | > 5   | NULL | 90886 | Using where | > ++-+-+---+-+-+-+--+---+-+ > > index_seq_start is the index on start_postion, > > 2009/7/13 Darryle Steplight

Re: mysql select query

2009-07-12 Thread Darryle Steplight
1. Don't use SELECT *. Only grab the cols that you only need. Also make sure you have an index on min_position and max_position. After that if your query isn't faster please show us the output of running EXPLAIN select * from table_name where start_postion between min_postion and max_postion" .

Re: safe query prevent sites from hijacker

2009-06-19 Thread Darryle Steplight
Of course I'm assuming you are using PHP. On Fri, Jun 19, 2009 at 10:28 AM, Darryle Steplight wrote: > "pull the plug for the mains and save energy.". It's still early, but > it was only a matter of time before people on this list start typing > what I was thinkin

Re: safe query prevent sites from hijacker

2009-06-19 Thread Darryle Steplight
"pull the plug for the mains and save energy.". It's still early, but it was only a matter of time before people on this list start typing what I was thinking. But for starter, check out http://shiflett.org/ and read his Essential PHP Security book. On Fri, Jun 19, 2009 at 10:03 AM, walter harms w

Re: How to Optimize distinct with index

2009-06-19 Thread Darryle Steplight
Select user_id from user where key1=value and key2=value2 and key3=value2 GROUP BY user_id is faster than Select distinct user_id from user where key1=value and key2=value2 and key3=value2; 2009/6/18 周彦伟 : > Hi, >I have a sql : >Select distinct user_id from user where

Re: Fastest way to select on 0/1 flag

2009-06-15 Thread Darryle Steplight
Hi Artem, There can be many malicious factors at play here, but if you are not using an index then definitely create on now. It will obviously help you with option 1 and you can still benefit from it with option 2. If you don't have an index, MySQL has to search for you data row by row which i

Re: dumb crash

2009-06-11 Thread Darryle Steplight
Hi PJ, Try adding "innodb_force_recovery = 4" to the mysqld section of your config file before restarting the server.If you can dump your tables using "4" then only some data on corrupt individual pages is lost. If you have to use innodb_force_recovery = 6, that means your db pages are left in an

Re: Best way to convert character set from "latin1 to utf8" for existing database?

2009-06-07 Thread Darryle Steplight
Uma, I apologize in advance if this is redundant ,because I did not click on any of Ewen's link. Nonetheless, this is the approach I would take. start your mysql server with different --character-set-server and ---collation-server options Type SHOW COLLATION; in your mysql shell to determine w

Re: Why doesn't mySQL stop a query when the browser tab is closedL

2009-06-03 Thread Darryle Steplight
Hi Daevid, You can always stop the query by running SHOW PROCESSLIST; from the command line or your MySql Admin tool. The above command will show you all of the queries that are currently running along with their PID# and state. Find the query your want to stop, and run the following command KIL

Re: mysql error 2013 Lost connection to MySQL server during query

2009-05-25 Thread Darryle Steplight
Hi Per, Maybe you need to beef up your CONNECT_TIMEOUT setting in your .my.cnf file. Are these queries appearing in your slow query logs?What is your LOG_QUERY_TIMES set too? Here are some other settings you may want to play around wtih CONNECT_TIMEOUT INTERACTIVE_TIMEOUT WAIT_TIMEOUT NET_WRITE_T

Re: mysqlimport remote host problem

2009-03-10 Thread Darryle Steplight
Hi Rene, Just a head's up. You might want to keep your username/password credentials private. On Tue, Mar 10, 2009 at 10:16 PM, René Fournier wrote: > OK, I've managed to do the same thing with just the mysql command line > program: > >        mysql -h 192.168.0.224 -u root -p alba2 < > /Bac

Re: When will MySQL support array datatype?

2009-03-10 Thread Darryle Steplight
Moon, I'm not sure exactly what you are trying to do, but why don't you just serialize() or json_encode() your data into a column? On Tue, Mar 10, 2009 at 9:35 AM, Moon's Father wrote: > Thanks for your fast reply. > Then only temporary table can simulate array datatype. > > On Mon, Feb 16,

Re: best mysql optimization tutorial and/or quick start guide?

2009-03-05 Thread Darryle Steplight
High Performance MySql "Optimization, Backups, Replication, and more" 2nd Edition . Got a problem, pick a chapter and read the solution. This book is awesome, I'm confident you will find what you are looking for :) . On Thu, Mar 5, 2009 at 12:30 PM, Stephen Edberg wrote: > >> I've been poking aro

Re: Error: Duplicate entry '0' for key 'PRIMARY'

2009-03-02 Thread Darryle Steplight
Are you trying to do an Insert On Duplicate Key? Do ou want to insert a new row if it doesn't already exist or update one if it does? On Mon, Mar 2, 2009 at 4:09 PM, sam rumaizan wrote: > Are you talking about Length/Values1 > > > > --- On Mon, 3/2/09, Gary Smith wrote: > > From: Gary Smith > S

Re: [PHP] Re: catch the error

2009-02-26 Thread Darryle Steplight
Additionally regarding the error handling , add this to the op of your script. ini_set("display_errors","true"); error_reporting(E_STRICT|E_ALL); and post the output of your error message. On Thu, Feb 26, 2009 at 1:40 PM, Ashley Sheridan wrote: > On Thu, 2009-02-26

Re: catch the error

2009-02-26 Thread Darryle Steplight
Hi PJ, $db_host = 'biggie'; $db_user = 'root'; $db_pass = 'gu...@#$'; $db_name = 'biblane'; Everyone here is trying to help you and that's cool, but EVERYONE on this list may not be so nice. The above credentials is definitely the type of information you want to keep private, unless you don't

Re: catch the error

2009-02-26 Thread Darryle Steplight
ok, well if that's the case then do this $db = mysql_connect('biggie', 'user', 'password', 'test'); That should fix the problem. On Thu, Feb 26, 2009 at 12:46 PM, PJ wrote: > It is commented out because I am using "mysql_connect" > I don't think it would be good to use both, since the db1

Re: catch the error

2009-02-26 Thread Darryle Steplight
Hi PJ, Could it be that you have "//include ("lib/db1.php"); " commented out? Try uncommenting that line and see what happens. The error message will always print because the query is never executing properly if you have the db connections file commented out. On Thu, Feb 26, 2009 at 12:28 PM,

Re: Newbie Question - MySQL Administrator

2009-02-19 Thread Darryle Steplight
Jeff, For starters, it looks like you need a value for VARCHAR. Try the same statement but with VARCHAR(255) . On Fri, Feb 20, 2009 at 1:17 AM, Jeff Murdock wrote: > This is on a Mac OS X (v10.5.6) system in case that matters. > > > > 1. - MySQL Administrator Help button says: > > HELP > > H

Re: Selecting a column with a regular expression applied to it?

2008-09-11 Thread Darryle Steplight
Hi Ryan, MySql does have regular expressions. See Link http://dev.mysql.com/doc/refman/5.0/en/regexp.html On Thu, Sep 11, 2008 at 9:52 AM, Ryan Stille <[EMAIL PROTECTED]> wrote: > From looking at the MySQL 5 docs, it doesn't look like there is any way to > select a column with a regular expressio

Re: Weird problem with mysql_query

2008-09-09 Thread Darryle Steplight
Hi G, There is nothing weird about your results. When you do a Count(*) without a GROUP BY(someColumn) you are essentially asking MySQL how many rows are present in the table. But when you do use Group By someColum , you are asking MySql how many rows do I have of "someColumn" . It's just a go

Re: Totaling from several tables away

2008-09-05 Thread Darryle Steplight
Hi Brian, Try this. SELECT SUM(mi.calories) FROM Meal_Items as mi, People as P, Meals as m WHERE p.Person_ID = '5' AND p.Person_ID=m.Person_ID AND m.Date = '2009-09-04' AND m.Meal_ID = mi.Meal_id GROUP BY p.Person_ID Hi Gerald: This part is throwing me off " ON People.Name=Meals.Name" . But I

Re: good books or URL for mysql sql tunning

2008-08-13 Thread Darryle Steplight
Hi Anada, I recommend MySQL Database Design and Tuning by Robert Schineider. It covers everything from benchmark testing to Innodb Performance Enhancements. I'm 85% done with the book myself. It shows and explains good command-line and MySql Admin tool examples. The techniques discuss in this book

Re: PHP Question

2008-05-06 Thread Darryle steplight
Hi Michael, Try placing the following at the top of your PHP code: ini_set('error_reporting', E_ALL | E_STRICT); ini_set('display_errors', 'On'); What error messages do you see on your page? On Tue, May 6, 2008 at 12:07 PM, Jerry Schwartz <[EMAIL PROTECTED]> wrote: > In general, if I have a P