Primary Key
I saw an example of creating tables (see below). I wonder what the primary key (user_name, role_name) in the table user_roles means? Does it mean that both user_name and role_name are the primary key of the user_roles table? How does a table have two primary keys? create table users ( user_name varchar(15) not null primary key, user_pass varchar(15) not null ); create table user_roles ( user_name varchar(15) not null, role_name varchar(15) not null, primary key (user_name, role_name) ); __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Time series
on 1/1/04 9:59 PM, Schulman, Michael wrote: > That only returns one number.. what we are really looking for is something > like > > SELECT ticker, hour, first(price), last(price) from pricedata group by hour Well, if you're using MySQL 4.1+, you're in luck. A subquery should help. SELECT ticker, HOUR(time) AS hour, price FROM pricedata WHERE time IN (SELECT MIN(time), MAX(time) FROM pricedata WHERE HOUR(time) = HOUR(pickatime) ) If you have an older version, simply split it up into two queries and use your middle/front end to handle the intermediate result -- Bob IQ2GI5SCP2 Things You Don't Hear Every Day, #'s 16 and 17: A professor: "It's all right if you come to class high." A(nother) professor: "I think base 16 is cool." -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Time series
>> First: select * from table1 order by field1 asc limit 1 >> Last: select * from table1 order by field1 desc limit 1 > That only returns one number.. what we are really looking for is something And worse: as far as I can tell 3.22.x even if field1 is indexed, ONE of those queries is going to be very slow. The query planner doesn't seem to be smart enough to read the index in reverse for ORDER BY DESC clauses. -- thanks, Will -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Newbie: need form to input records & View report
I know this sounds stupid but I'm totally lost. I've created a MySQL DB whose purpose is to track customers who have not gotten a newspaper. I've created all the necessary fields, and have managed to learn how to add/delete/modify the records in mysqlcc, but what I want is to have a predesigned form like you'd find on a webpage where you simply enter the complaints and hit submit or whatever, and it responds with the complaint ID # ( ComplaintID is an autoincrement field in the db ) Then I need to be able to print a report in a nicely labeled/readable format showing all entries made that day where the "chargeable" field is not "List" (Chargeable is an enum consisting of "yes", "no", "list"). Will someone please be kind enough to point me in the right direction. I can't seem to get my head around this concept. Troy oh, if it matters, I'm using Linux Mandrake 9.2 with the Gnome 2.0 GDM. I also have qtDesigner, OO, & Screem. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
re: mySQL in Hebrew/my.cnf
You should check the error log about why the server didn't start. It should be called yourhostname.err in your data directory. I think the problem is that you put spaces around the second equal sign. The first equal sign "set-variable = ..." can be surrounded by spaces but the second one "... default-character-set=hebrew" should not have any spaces. [mysqld] set-variable = default-character-set=hebrew You can also try invoking this option on the command line when starting the server like this: /usr/local/mysql/bin/mysqld_safe --default-character-set=hebrew & with 3.23.xx I think the command is: /usr/local/mysql/bin/safe_mysqld --default-character-set=hebrew & Again, no spaces around the equal sign. But putting it in my.cnf is probably the preferred method. Hope this helps, Jeremy
Re: Time series - Response....
Hi Mike, I'm working in a large Data Capture Division of Lason Inc. in India, I have developed a Database which is used to report Server Load & Server space utilization online, I'm designing this layout with some what critical process. It's not in millian rows per day, but in thousands... also not as a big thing, but you can get some idea more from this. If u like further, pl. contact in mobile: 9444186201 (India). -Aman. Schulman, Michael wrote: Hi, I work for a large financial instituition. We are currently evaluating databases to store intraday stock data. These are large tables with 40 million rows per day. We've done some initial testing with MySQL and have been extremely impressed with its speed and ease of use. I know that it goes agains the SQL standard but adding a FIRST,LAST aggregate function along with some other time series functions would allow mysql to compete with just about any timeseries database, and open up mysql to a huge market of financial firms. I know my firm would most likely purchase it.Has anyone developed anyhting like this as an add on? Thanks, Mike -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Time series
As far as I know min(price) and max(price) will return the lowest and higest price, not the first and last in the group. Again I know first and last break the paradaigm of SQL's bucket mentality but it is crucial to doing timeseries analysis. And timeseries aggregation as the query I gave is trying to do. Thanks again, Mike -Original Message- From: Fredrick Bartlett [mailto:[EMAIL PROTECTED] Sent: Thursday, January 01, 2004 10:12 PM To: Schulman, Michael; [EMAIL PROTECTED] Subject: Re: Time series Is Hour a DateTime? If so, will this work... SELECT ticker, DATE_FORMAT(Hour,'%H' ), min(price), max(price) from pricedata order by DATE_FORMAT(Hour,'%H' ) group by DATE_FORMAT(Hour,'%H' ) - Original Message - From: "Schulman, Michael" <[EMAIL PROTECTED]> To: "'Fredrick Bartlett'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 01, 2004 6:59 PM Subject: RE: Time series > That only returns one number.. what we are really looking for is something > like > > SELECT ticker, hour, first(price), last(price) from pricedata group by hour > > Sorry for the confusion. > > Thanks, > Mike > > -Original Message- > From: Fredrick Bartlett [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 01, 2004 9:57 PM > To: Schulman, Michael; [EMAIL PROTECTED] > Subject: Re: Time series > > > Hmmm... > First: select * from table1 order by field1 asc limit 1 > Last: select * from table1 order by field1 desc limit 1 > > > - Original Message - > From: "Schulman, Michael" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, January 01, 2004 6:47 PM > Subject: Time series > > > > Hi, > > > > I work for a large financial instituition. We are currently evaluating > > databases to store intraday stock data. These are large tables with 40 > > million rows per day. We've done some initial testing with MySQL and have > > been extremely impressed with its speed and ease of use. I know that it > > goes agains the SQL standard but adding a FIRST,LAST aggregate function > > along with some other time series functions would allow mysql to compete > > with just about any timeseries database, and open up mysql to a huge > market > > of financial firms. I know my firm would most likely purchase it. Has > > anyone developed anyhting like this as an add on? > > > > Thanks, > > Mike > > > > -- > > > This message is intended only for the personal and confidential use of the > > designated recipient(s) named above. If you are not the intended > recipient of > > this message you are hereby notified that any review, dissemination, > > distribution or copying of this message is strictly prohibited. This > > communication is for information purposes only and should not be regarded > as > > an offer to sell or as a solicitation of an offer to buy any financial > > product, an official confirmation of any transaction, or as an official > > statement of Lehman Brothers. Email transmission cannot be guaranteed to > be > > secure or error-free. Therefore, we do not represent that this > information is > > complete or accurate and it should not be relied upon as such. All > > information is subject to change without notice. > > > > > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > > > > > -- > This message is intended only for the personal and confidential use of the > designated recipient(s) named above. If you are not the intended recipient of > this message you are hereby notified that any review, dissemination, > distribution or copying of this message is strictly prohibited. This > communication is for information purposes only and should not be regarded as > an offer to sell or as a solicitation of an offer to buy any financial > product, an official confirmation of any transaction, or as an official > statement of Lehman Brothers. Email transmission cannot be guaranteed to be > secure or error-free. Therefore, we do not represent that this information is > complete or accurate and it should not be relied upon as such. All > information is subject to change without notice. > -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot
Re: Time series
Is Hour a DateTime? If so, will this work... SELECT ticker, DATE_FORMAT(Hour,'%H' ), min(price), max(price) from pricedata order by DATE_FORMAT(Hour,'%H' ) group by DATE_FORMAT(Hour,'%H' ) - Original Message - From: "Schulman, Michael" <[EMAIL PROTECTED]> To: "'Fredrick Bartlett'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 01, 2004 6:59 PM Subject: RE: Time series > That only returns one number.. what we are really looking for is something > like > > SELECT ticker, hour, first(price), last(price) from pricedata group by hour > > Sorry for the confusion. > > Thanks, > Mike > > -Original Message- > From: Fredrick Bartlett [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 01, 2004 9:57 PM > To: Schulman, Michael; [EMAIL PROTECTED] > Subject: Re: Time series > > > Hmmm... > First: select * from table1 order by field1 asc limit 1 > Last: select * from table1 order by field1 desc limit 1 > > > - Original Message - > From: "Schulman, Michael" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, January 01, 2004 6:47 PM > Subject: Time series > > > > Hi, > > > > I work for a large financial instituition. We are currently evaluating > > databases to store intraday stock data. These are large tables with 40 > > million rows per day. We've done some initial testing with MySQL and have > > been extremely impressed with its speed and ease of use. I know that it > > goes agains the SQL standard but adding a FIRST,LAST aggregate function > > along with some other time series functions would allow mysql to compete > > with just about any timeseries database, and open up mysql to a huge > market > > of financial firms. I know my firm would most likely purchase it. Has > > anyone developed anyhting like this as an add on? > > > > Thanks, > > Mike > > > > -- > > > This message is intended only for the personal and confidential use of the > > designated recipient(s) named above. If you are not the intended > recipient of > > this message you are hereby notified that any review, dissemination, > > distribution or copying of this message is strictly prohibited. This > > communication is for information purposes only and should not be regarded > as > > an offer to sell or as a solicitation of an offer to buy any financial > > product, an official confirmation of any transaction, or as an official > > statement of Lehman Brothers. Email transmission cannot be guaranteed to > be > > secure or error-free. Therefore, we do not represent that this > information is > > complete or accurate and it should not be relied upon as such. All > > information is subject to change without notice. > > > > > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > > > > > -- > This message is intended only for the personal and confidential use of the > designated recipient(s) named above. If you are not the intended recipient of > this message you are hereby notified that any review, dissemination, > distribution or copying of this message is strictly prohibited. This > communication is for information purposes only and should not be regarded as > an offer to sell or as a solicitation of an offer to buy any financial > product, an official confirmation of any transaction, or as an official > statement of Lehman Brothers. Email transmission cannot be guaranteed to be > secure or error-free. Therefore, we do not represent that this information is > complete or accurate and it should not be relied upon as such. All > information is subject to change without notice. > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Time series
That only returns one number.. what we are really looking for is something like SELECT ticker, hour, first(price), last(price) from pricedata group by hour Sorry for the confusion. Thanks, Mike -Original Message- From: Fredrick Bartlett [mailto:[EMAIL PROTECTED] Sent: Thursday, January 01, 2004 9:57 PM To: Schulman, Michael; [EMAIL PROTECTED] Subject: Re: Time series Hmmm... First: select * from table1 order by field1 asc limit 1 Last: select * from table1 order by field1 desc limit 1 - Original Message - From: "Schulman, Michael" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 01, 2004 6:47 PM Subject: Time series > Hi, > > I work for a large financial instituition. We are currently evaluating > databases to store intraday stock data. These are large tables with 40 > million rows per day. We've done some initial testing with MySQL and have > been extremely impressed with its speed and ease of use. I know that it > goes agains the SQL standard but adding a FIRST,LAST aggregate function > along with some other time series functions would allow mysql to compete > with just about any timeseries database, and open up mysql to a huge market > of financial firms. I know my firm would most likely purchase it.Has > anyone developed anyhting like this as an add on? > > Thanks, > Mike > > -- > This message is intended only for the personal and confidential use of the > designated recipient(s) named above. If you are not the intended recipient of > this message you are hereby notified that any review, dissemination, > distribution or copying of this message is strictly prohibited. This > communication is for information purposes only and should not be regarded as > an offer to sell or as a solicitation of an offer to buy any financial > product, an official confirmation of any transaction, or as an official > statement of Lehman Brothers. Email transmission cannot be guaranteed to be > secure or error-free. Therefore, we do not represent that this information is > complete or accurate and it should not be relied upon as such. All > information is subject to change without notice. > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Time series
Hmmm... First: select * from table1 order by field1 asc limit 1 Last: select * from table1 order by field1 desc limit 1 - Original Message - From: "Schulman, Michael" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 01, 2004 6:47 PM Subject: Time series > Hi, > > I work for a large financial instituition. We are currently evaluating > databases to store intraday stock data. These are large tables with 40 > million rows per day. We've done some initial testing with MySQL and have > been extremely impressed with its speed and ease of use. I know that it > goes agains the SQL standard but adding a FIRST,LAST aggregate function > along with some other time series functions would allow mysql to compete > with just about any timeseries database, and open up mysql to a huge market > of financial firms. I know my firm would most likely purchase it.Has > anyone developed anyhting like this as an add on? > > Thanks, > Mike > > -- > This message is intended only for the personal and confidential use of the > designated recipient(s) named above. If you are not the intended recipient of > this message you are hereby notified that any review, dissemination, > distribution or copying of this message is strictly prohibited. This > communication is for information purposes only and should not be regarded as > an offer to sell or as a solicitation of an offer to buy any financial > product, an official confirmation of any transaction, or as an official > statement of Lehman Brothers. Email transmission cannot be guaranteed to be > secure or error-free. Therefore, we do not represent that this information is > complete or accurate and it should not be relied upon as such. All > information is subject to change without notice. > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Time series
Hi, I work for a large financial instituition. We are currently evaluating databases to store intraday stock data. These are large tables with 40 million rows per day. We've done some initial testing with MySQL and have been extremely impressed with its speed and ease of use. I know that it goes agains the SQL standard but adding a FIRST,LAST aggregate function along with some other time series functions would allow mysql to compete with just about any timeseries database, and open up mysql to a huge market of financial firms. I know my firm would most likely purchase it.Has anyone developed anyhting like this as an add on? Thanks, Mike -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: special characters as field values
Hi Chris, You're fine with mysql_real_escape_string(). % or _ only need to be escaped if you're using them in LIKE and want them to match iterally. -- never needs to be escaped in a string. BTW, if you're using PHP and the stupid magic_quotes_gpc is on, you don't want to escape stuff yourself again, or it will add too many slashes! So you need to check for that somehow. Hope that helps. Matt - Original Message - From: "Chris W" Sent: Wednesday, December 31, 2003 4:44 PM Subject: special characters as field values > I am storing data from an html form and there could be any character in > there, including a % and an _. I'm using mysql_real_escape_string in > php to escape special characters, but it says it doesn't escape the % > and _. I was also reading something about escaping the -- . If I want > all of these characters and character sequences to be allowable field > values do I need to do more than what mysql_real_escape_string will do > for me? I am enclosing all values in ' like the following... > > $query = "INSERT INTO user Values (NULL, '$UserID', '$Password', > '$Email', '$FName', '$LName', "; > $query .= "'$StreetAddress', '$AddressLine2', '$City', '$State', '$ZIP')"; > $result = mysql_query($query); > > > Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Subtracting date fields
Hi Bob, I did. So it should be assumed he's using 4.1.1 or 5.0? That's pretty stupid. What % of people do you think are using those versions? 1%? 0.1%? 0.01%? I think most people want the most compatible code/syntax/functions if they accomplish the same thing. If you want things to be portable to different systems, I suggest using things compatible with 3.23. And when you have to use something that's not, handle it in your code. Matt - Original Message - From: "Bob Terrell" <[EMAIL PROTECTED]> Sent: Thursday, January 01, 2004 5:35 PM Subject: Re: Subtracting date fields > on 1/1/04 5:42 PM, Matt W wrote: > > > Dan, > > > > DATEDIFF() only works in MySQL 4.1.1+. > > > > RTFM! ;-) > > Did you notice how the original poster didn't specify a version number? > > RTFOP,YSSOS. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Replicating Table Schema
* Gohaku > I was just curious if there's a shorthand way of replicating a Table > Schema. > I use the following to create a new Table with the same schema. > >create table new_table ( select * from table); > >delete from new_table; You can avoid the DELETE by specifying a non-true WHERE clause: CREATE TABLE new_table SELECT * FROM table WHERE 1=0 http://www.mysql.com/doc/en/CREATE_TABLE.html > You can get the schema for an entire database by using the --no-data option for the mysqldump utility. http://www.mysql.com/doc/en/mysqldump.html > -- Roger -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
ZeosDbo Performance question
Dear friends, What version of zesdbo is more faster, 5.5 or 6.1.2? .NET Plataform is a future you believe in this new plataform? Regards. Carlos J Souza >From Brazil -- <>
RE: Subtracting date fields
Matt, Good point, although he didn't specify what version he was using so I assumed a newer one. Perhaps a disclaimer should have been included? Anyways, Kenneth, if you're using an older version try this: SELECT id, TO_DAYS(firstdate) - TO_DAYS(postdate) AS diff FROM calendar Dan -Original Message- From: Matt W [mailto:[EMAIL PROTECTED] Sent: Thursday, January 01, 2004 4:42 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Subtracting date fields Dan, DATEDIFF() only works in MySQL 4.1.1+. RTFM! ;-) Matt - Original Message - From: <[EMAIL PROTECTED]> Sent: Wednesday, December 31, 2003 2:10 PM Subject: RE: Subtracting date fields > Kenneth, > > try > > SELECT id, DATEDIFF(firstdate, postdate) AS diff FROM > calendar > > RTFM! > > hope that helps, dan > > -Original Message- > From: Kenneth Letendre > Sent: Saturday, January 31, 2004 1:51 PM > Subject: Subtracting date fields > > > Hello, > >I'm trying to get the difference (in days) between > dates stored in two > date fields. >My query: > > SELECT id,(firstdate- postdate) AS diff FROM calendar > >This works fine if the two dates are in the same > month, but not > otherwise. MySQL appears to be treating the two dates > as base-10 integers > rather than dates. E.g.: > > 2004-01-07 (20,040,107) - 2003-12-31 (20,031,231) = > 8876 > >How do I get MySQL to treat these date fields as > date fields in this case? > > > Thanks, > > Kenneth -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Replicating Table Schema
On Thu, Jan 01, 2004 at 05:42:59PM -0500, Gohaku wrote: > Hi everyone, > I was just curious if there's a shorthand way of replicating a Table > Schema. > I use the following to create a new Table with the same schema. > >create table new_table ( select * from table); > >delete from new_table; CREATE TABLE new_table LIKE old_table; Available from MySQL 4.1 up: http://www.mysql.com/doc/en/CREATE_TABLE.html -- Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Replicating Table Schema
Hi everyone, I was just curious if there's a shorthand way of replicating a Table Schema. I use the following to create a new Table with the same schema. >create table new_table ( select * from table); >delete from new_table; Thanks in advance, -gohaku -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Subtracting date fields
Dan, DATEDIFF() only works in MySQL 4.1.1+. RTFM! ;-) Matt - Original Message - From: <[EMAIL PROTECTED]> Sent: Wednesday, December 31, 2003 2:10 PM Subject: RE: Subtracting date fields > Kenneth, > > try > > SELECT id, DATEDIFF(firstdate, postdate) AS diff FROM > calendar > > RTFM! > > hope that helps, dan > > -Original Message- > From: Kenneth Letendre > Sent: Saturday, January 31, 2004 1:51 PM > Subject: Subtracting date fields > > > Hello, > >I'm trying to get the difference (in days) between > dates stored in two > date fields. >My query: > > SELECT id,(firstdate- postdate) AS diff FROM calendar > >This works fine if the two dates are in the same > month, but not > otherwise. MySQL appears to be treating the two dates > as base-10 integers > rather than dates. E.g.: > > 2004-01-07 (20,040,107) - 2003-12-31 (20,031,231) = > 8876 > >How do I get MySQL to treat these date fields as > date fields in this case? > > > Thanks, > > Kenneth -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Remote access FROM a secure server
> -Message d'origine- > De : Amer Neely [mailto:[EMAIL PROTECTED] > Envoyé : Thursday, January 01, 2004 3:07 PM > À : Larry Brown > Cc : MySQL List > Objet : Re: Remote access FROM a secure server > > > Larry Brown wrote: > > Have you tried to telnet to port 3306 on the server from > your local machine > > to the foreign server? It should give you some feedback as > to why your > > connection is refused. If it times out, the server > probably had 3306 > > blocked. I've not used remote servers other than inside a > secure facility > > so I haven't messed with SSL for mysql, so for instance it may use a > > different port number etc. > > > > Just my 2 cents worth... > > > > Larry > > > > -Original Message- > > From: Amer Neely [mailto:[EMAIL PROTECTED] > > Sent: Thursday, January 01, 2004 2:07 PM > > To: MySQL > > Subject: Remote access FROM a secure server > > > > > > I have a Perl script running on a secure server (https) and > am trying to > > access the mysql server on a different (unsecure) server. My ISP > > administrator has done the following: > > > > GRANT ALL ON database_name.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password' > > > > Then he restarted the server. But I'm still not getting > access. Is the > > 'FLUSH PRIVILEGES' still necessary, or is the restart > sufficient? I can > > access the db from a local phpMyAdmin and am using the same > parameters > > in my script, so I know it is accessible. We're both stumped. > > > > Anyone shed some light on this please? > > Good thought. I just tried that and still got booted away. > Connecting To xxx.xxx.xxx:3306...Could not open a connection > to host on port > 23 : Connect failed > > Curious where the 'port 23' came from. It is the standard telnet port. You must not put the colon in a telnet command. here is the right command: telnet host.domain.com 3306 hth Ugo > -- > All outgoing email scanned by AVG Antivirus > Amer Neely, Softouch Information Services | Home of Spam Catcher & > Research Central. > W: www.softouch.on.ca > E: [EMAIL PROTECTED] > Perl | PHP | MySQL | CGI programming for all data entry forms. > "We make web sites work!" > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Remote access FROM a secure server
Larry Brown wrote: Have you tried to telnet to port 3306 on the server from your local machine to the foreign server? It should give you some feedback as to why your connection is refused. If it times out, the server probably had 3306 blocked. I've not used remote servers other than inside a secure facility so I haven't messed with SSL for mysql, so for instance it may use a different port number etc. Just my 2 cents worth... Larry -Original Message- From: Amer Neely [mailto:[EMAIL PROTECTED] Sent: Thursday, January 01, 2004 2:07 PM To: MySQL Subject: Remote access FROM a secure server I have a Perl script running on a secure server (https) and am trying to access the mysql server on a different (unsecure) server. My ISP administrator has done the following: GRANT ALL ON database_name.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password' Then he restarted the server. But I'm still not getting access. Is the 'FLUSH PRIVILEGES' still necessary, or is the restart sufficient? I can access the db from a local phpMyAdmin and am using the same parameters in my script, so I know it is accessible. We're both stumped. Anyone shed some light on this please? Good thought. I just tried that and still got booted away. Connecting To xxx.xxx.xxx:3306...Could not open a connection to host on port 23 : Connect failed Curious where the 'port 23' came from. -- All outgoing email scanned by AVG Antivirus Amer Neely, Softouch Information Services | Home of Spam Catcher & Research Central. W: www.softouch.on.ca E: [EMAIL PROTECTED] Perl | PHP | MySQL | CGI programming for all data entry forms. "We make web sites work!" -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Remote access FROM a secure server
Have you tried to telnet to port 3306 on the server from your local machine to the foreign server? It should give you some feedback as to why your connection is refused. If it times out, the server probably had 3306 blocked. I've not used remote servers other than inside a secure facility so I haven't messed with SSL for mysql, so for instance it may use a different port number etc. Just my 2 cents worth... Larry -Original Message- From: Amer Neely [mailto:[EMAIL PROTECTED] Sent: Thursday, January 01, 2004 2:07 PM To: MySQL Subject: Remote access FROM a secure server I have a Perl script running on a secure server (https) and am trying to access the mysql server on a different (unsecure) server. My ISP administrator has done the following: GRANT ALL ON database_name.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password' Then he restarted the server. But I'm still not getting access. Is the 'FLUSH PRIVILEGES' still necessary, or is the restart sufficient? I can access the db from a local phpMyAdmin and am using the same parameters in my script, so I know it is accessible. We're both stumped. Anyone shed some light on this please? -- All outgoing email scanned by AVG Antivirus Amer Neely, Softouch Information Services | Home of Spam Catcher & Research Central. W: www.softouch.on.ca E: [EMAIL PROTECTED] Perl | PHP | MySQL | CGI programming for all data entry forms. "We make web sites work!" -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Remote access FROM a secure server
I have a Perl script running on a secure server (https) and am trying to access the mysql server on a different (unsecure) server. My ISP administrator has done the following: GRANT ALL ON database_name.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password' Then he restarted the server. But I'm still not getting access. Is the 'FLUSH PRIVILEGES' still necessary, or is the restart sufficient? I can access the db from a local phpMyAdmin and am using the same parameters in my script, so I know it is accessible. We're both stumped. Anyone shed some light on this please? -- All outgoing email scanned by AVG Antivirus Amer Neely, Softouch Information Services | Home of Spam Catcher & Research Central. W: www.softouch.on.ca E: [EMAIL PROTECTED] Perl | PHP | MySQL | CGI programming for all data entry forms. "We make web sites work!" -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Installation Question
I second Ugo's opinion. dan Ugo Bellavance wrote: -Message d'origine- De : Kirti S. Bajwa [mailto:[EMAIL PROTECTED] Envoyé : Thursday, January 01, 2004 12:16 PM À : '[EMAIL PROTECTED]' Objet : RE: Installation Question Dan: Thank you fast reply on New Year Day. The only reason I was trying to install the source distribution because it is supposed to be optimized!! It is not optimized. It is optimizeable, not the same thing. However, you need to know exacly what are the compiler flags to optimize it. If you run on x86, you are better of with the binary or the .rpm. No offense, but people who compile at mysql are a lot better than you and me to get the best flags. hth Ugo Is binary distribution is also optimized or it makes no difference? I personally prefer binary myself. I will wait for a response before I start all over again. Thanks again. Kirti -Original Message- From: dan orlic [mailto:[EMAIL PROTECTED] Sent: Thursday, January 01, 2004 12:07 PM To: Kirti S. Bajwa Subject: Re: Installation Question i never had much luck with the source distribution, let alone using the prefix flag. Try untarring it in /usr/local/mysql dir yourself and then continue with the ./configure make and so forth... better yet, i would untar it in a /usr/local/mysql-whatever-version and then make a soft link of mysql point to that directory, allows you to have multiple installs of mysql where all you have to change is the link and restart mysql. my humble option, go with the binary installation it will take you less then a couple minutes to install. hope this helps. dan Kirti S. Bajwa wrote: I am trying to install MySQL from source distribution by following the instructions under section: 2.3.1 Quick Source Installation Overview. I notice that the configure state is listed as follows: shell> ./configure --prefix=/usr/local/mysql which means to install the software in /usr/local/mysql. After I run this configure statement, I do not see a folder /usr/local/mysql!! Is it correct? Kirti -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Installation Question
> -Message d'origine- > De : Kirti S. Bajwa [mailto:[EMAIL PROTECTED] > Envoyé : Thursday, January 01, 2004 12:16 PM > À : '[EMAIL PROTECTED]' > Objet : RE: Installation Question > > > > Dan: > > Thank you fast reply on New Year Day. > > The only reason I was trying to install the source > distribution because it > is supposed to be optimized!! It is not optimized. It is optimizeable, not the same thing. However, you need to know exacly what are the compiler flags to optimize it. If you run on x86, you are better of with the binary or the .rpm. No offense, but people who compile at mysql are a lot better than you and me to get the best flags. hth Ugo > > Is binary distribution is also optimized or it makes no difference? I > personally prefer binary myself. I will wait for a response > before I start > all over again. > > Thanks again. > > > Kirti > > > -Original Message- > From: dan orlic [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 01, 2004 12:07 PM > To: Kirti S. Bajwa > Subject: Re: Installation Question > > > i never had much luck with the source distribution, let alone > using the > prefix flag. Try untarring it in /usr/local/mysql dir > yourself and then > continue with the ./configure make and so forth... better > yet, i would > untar it in a /usr/local/mysql-whatever-version and then make a soft > link of mysql point to that directory, allows you to have multiple > installs of mysql where all you have to change is the link > and restart > mysql. my humble option, go with the binary installation it will > take you less then a couple minutes to install. > > hope this helps. > > dan > > Kirti S. Bajwa wrote: > > >I am trying to install MySQL from source distribution by > following the > >instructions under section: 2.3.1 Quick Source Installation > Overview. > >I notice that the configure state is listed as follows: > >shell> ./configure --prefix=/usr/local/mysql > > > >which means to install the software in /usr/local/mysql. > After I run this > >configure statement, I do not see a folder /usr/local/mysql!! Is it > correct? > > > >Kirti > > > > > > > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Installation Question
Dan: Thank you fast reply on New Year Day. The only reason I was trying to install the source distribution because it is supposed to be optimized!! Is binary distribution is also optimized or it makes no difference? I personally prefer binary myself. I will wait for a response before I start all over again. Thanks again. Kirti -Original Message- From: dan orlic [mailto:[EMAIL PROTECTED] Sent: Thursday, January 01, 2004 12:07 PM To: Kirti S. Bajwa Subject: Re: Installation Question i never had much luck with the source distribution, let alone using the prefix flag. Try untarring it in /usr/local/mysql dir yourself and then continue with the ./configure make and so forth... better yet, i would untar it in a /usr/local/mysql-whatever-version and then make a soft link of mysql point to that directory, allows you to have multiple installs of mysql where all you have to change is the link and restart mysql. my humble option, go with the binary installation it will take you less then a couple minutes to install. hope this helps. dan Kirti S. Bajwa wrote: >I am trying to install MySQL from source distribution by following the >instructions under section: 2.3.1 Quick Source Installation Overview. >I notice that the configure state is listed as follows: >shell> ./configure --prefix=/usr/local/mysql > >which means to install the software in /usr/local/mysql. After I run this >configure statement, I do not see a folder /usr/local/mysql!! Is it correct? > >Kirti > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Installation Question
I am trying to install MySQL from source distribution by following the instructions under section: 2.3.1 Quick Source Installation Overview. I notice that the configure state is listed as follows: shell> ./configure --prefix=/usr/local/mysql which means to install the software in /usr/local/mysql. After I run this configure statement, I do not see a folder /usr/local/mysql!! Is it correct? Kirti -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: SQL syntax error
Hi Asif, Asif Iqbal wrote: I have been pushing my syslogs to the following mysql table However whenever it sees lines with a ' (apostrophe) it complains about SQL syntax You need to escape those reserved characters, i.e. have ' replaced by \' because otherwise mysql will treat the apostrophe as the string delimiting character. Greets Fred -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ZeosDBO 5.5 x 6.1.2 Version
Hi Carlos, I tested zeos in my application and 6.1 seems to be faster, and much more simple. Happy new year > From Brazil too ;) - Luciano Barcaro Depto. Informática - Laboratório Alvaro Carlos J Souza wrote: Dear friends, What version of zesdbo is more faster, 5.5 or 6.1.2? .NET Plataform is a future you believe in this new plataform? Regards. Carlos J Souza >From Brazil -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
SQL syntax error
Hi All I have been pushing my syslogs to the following mysql table However whenever it sees lines with a ' (apostrophe) it complains about SQL syntax Here are two lines with ' from my syslog: Jan 1 03:58:15 dal-svcs-02.inet.qwest.net 203: *Jan 1 08:58:13.926 UTC: %PFINIT-SP-5-CONFIG_SYNC: Sync'ing the startup configuration to the standby Router Jan 01 00:57:06 [65.119.67.5.17.126] %NTP-W-NOTIMEZONE, Time will not be set until timezone is configured; use 'system set timezone' to configure Here is how it complains: failed to run query: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ing the startup configuration to the standby Router ')' at line failed to run query: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'system set timezone' to configure ', '087) (RST) ')' at line 1 Here is how my mysql table looks like +---+--+--+-+-++ | Field | Type | Null | Key | Default | Extra | +---+--+--+-+-++ | id| int(11) | | PRI | NULL| auto_increment | | timestamp | varchar(16) | YES | | NULL|| | host | varchar(255) | YES | | NULL|| | prog | varchar(255) | YES | | NULL|| | mesg | text | YES | | NULL|| +---+--+--+-+-++ Is there anyway I can modify the host,prog and mesg field types to accept apostrophe as part of the record ? Thanks for all the help (Happy New Year !!) -- Asif Iqbal http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x8B686E08 There's no place like 127.0.0.1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
ZeosDBO 5.5 x 6.1.2 Version
Dear friends, What version of zesdbo is more faster, 5.5 or 6.1.2? .NET Plataform is a future you believe in this new plataform? Regards. Carlos J Souza >From Brazil -- <>
mySQL in Hebrew/my.cnf
I asked about a week ago how to get mySQL to index correctly in Hebrew, and the best answer that I received was to define a my.cnf file as follows [mysqld] set-variable = default-character-set = hebrew I created the file /etc/my.cnf using the root account, stopped the mysql daemon then restarted. The daemon failed immediately. I tried this a few more times, then reluctantly came to the conclusion that there is something wrong with the /etc/my.cnf file, so I deleted it and successfully started the daemon. Is there something special which I need to define regarding the file's permissions? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
dropping multiple tables with one command question
Happy New Year!!! What's the command for dropping multiple tables? Example: 12 tables that all start with: phpbb_ What? Well, the install isn't going as planned. I am having to reinstall as I try to work out script path (I think) or some other piece of info that isn't entered correctly, yet. Anyway, DROP TABLE tablename; is one table. I want to drop all the tables without typing them, but using DROP TABLE phpbb*; doesn't work. Any help appreciated. Happy New Year, Tom -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]