Can't Connect To MySQL
Hi, I just installed Redhat 7.1 will all the options (full install) When I try to connect to MySQL I am getting this error /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! I tried to follow as mention on manuall but I still fail to bring up the server...any simpler method? Many thanks - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
4.0.0 Intel rpm contains InnoDB-.43 with no foreign keys
Hi! There was some confusion in the making of the 4.0.0 binaries. The Intel rpm contains InnoDB-.43 which does not support foreign keys, while the source distribution and the Intel .tar.gz binary contains .43b which supports foreign keys. Sorry for the confusion! Some things are broken in all 4.0.0 versions. Multi-table delete does not work for transactional tables. This has been fixed for 4.0.1. The syntax LOCK IN SHARE MODE does not work either. Regards, Heikki http://www.innodb.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: spontanious performance problem :(
On Tue, Oct 23, 2001 at 08:08:08AM +0200, Michal Zejdl wrote: Blank shot - have you enough FD? sql I really think so... ulimit -a: max user processes 32768 open files 32768 And within /etc/my.cnf: [safe_mysqld] open-files-limit=32768 set-variable= open_files=32768 /proc/sys/fs/file-max: 32768 The load is approx. 0.30 when I don't increase the max_connections from 100 to 1250. So FD was also what I thought about too, but I think all settings for it are OK. -- Wouter de Jong [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Length limit of 500 on primary keys?
On Mon, Oct 22, 2001 at 11:42:23AM -0600, Steve Meyers wrote: If you use a good 64-bit hash, I doubt you'll run into any uniqueness problems. MySQL will support that as a 64-bit BIGINT. You especially should not have any problems if you hash each column, then do the primary key across the four hashes. I'm not sure why there is a limit, but I'm also not sure why anybody in their right mind would want a unique index that long :) In Gemini, I think the limit is 2048 bytes (or so). It was increased to handle URLs (among other things). At a previous job, we tested a 32-bit hash function by running it against hundreds of thousands of unique URL's stored in our database. We found one collision. A 64-bit hash is billions of times better (4 billion, to be exact). Good to know. I wonder how many collisions I'd find if I ran it over every URL listed in the directory www.yahoo.com. Which 64 bit hash function did you use? Invent your own, or something off the shelf? Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 47 days, processed 1,025,236,716 queries (251/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Length of columns and attachents as a column...
Placed At : BOM Durga Prasad@SATYAM 10/23/2001 01:06 PM Hi all, Is it possible to have an external file as an attachment in MySQL? An example would be a .gif, .doc, .ppt, .ram etc. If there is no way directly have MySQL table to store an attachment, is there any work around? Any guidance will be appreciated. Thanks and Regards, Durga Prasad - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: load data infile problems
Chris Book writes: My actual data has represented as , so I need to set it up this way. I would prefer to work with the files the way they are now rather than re-export my data a different way, since that machine is inconvenient right now. I can export data using the same params, and it generates a file in the same format that im using to import... so I don't see why the import would fail. The three reasons I can think of is if it checks if the first character is the escape character before checking if it's the optional enclosing character, or if it gets confused when it runs into the enclosing character seemingly unescaped inside the string, or if it thinks the terminating is an escape character. As the format as you have it could be parse in an (at least almost) unambigous way, I suggest reporting this as a bug. In the meantime, I guess you'll have to search and replace before inserting into the database. :-/ //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
error code: 10060
I get this error message when trying to log in to remote MySQL database server... what does this mean? how can I solve this? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
log files????
I have created a mysql based intranet and it has occurred to me that I need to find out how to manage the log files but I cannot find them. I downloaded the binary mysql-3.23.41-pc-linux-gnu-i686.tar.gz and installed to /usr/local/mysql where should I look? Are they turned off by default ??? cheers Dave - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Very untidy
Hi all, can someone look at my very untidy code and maybe give me some pointers. Searching for values by the hour. etc for ($i = 0; $i = 23; $i++) { $query = select count(num) as mycount from dundeefw where date=$date and action=1 and time=hour($i); // Execute query $result = mysql_query($query) or die (Query Failed); while ($row = mysql_fetch_array ($result)) { $connection[$i] = $row[mycount]; } } I am wondering if there is anyway using SQL to avoid doing this the very messy way. many thanks Leon. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Fw: Can't Connect To MySQL
Thanks man, I tried that but still no hope.. when I did a ps -ef | grep mysqld there is nothing in my output! Pleas.. somebody make this thing work. - Original Message - From: Pankaj Gautam To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] Sent: Tuesday, October 23, 2001 4:34 PM Subject: Re: Can't Connect To MySQL First try to run the mysql server i.e. mysqld safe_mysqld and verify using ps -ef | grep mysqld it should list something like this root 3314 16400 0 01:31 pts/800:00:00 sh /usr/local/bin/safe_mysqld root 3329 3314 0 01:31 pts/800:00:00 /usr/local/libexec/mysqld --base root 3331 3329 0 01:31 pts/800:00:00 /usr/local/libexec/mysqld --base root 3332 3331 0 01:31 pts/800:00:00 /usr/local/libexec/mysqld --base now it should work for u -PG Pankaj Gautam #127, 575 Birch Creek, South Rengstorff Avenue Mountain View CA, 94040 From: M. Alageswaran To: Subject: Can't Connect To MySQL Date: Tue, 23 Oct 2001 14:43:32 +0800 MIME-Version: 1.0 Received: from [192.58.197.162] by hotmail.com (3.2) with ESMTP id MHotMailBD9E5BEE000B400431E5C03AC5A207940; Mon, 22 Oct 2001 23:40:47 -0700 Received: (qmail 26254 invoked by uid 7797); 23 Oct 2001 06:32:28 - Received: (qmail 26204 invoked from network); 23 Oct 2001 06:32:25 - From mysql-return-88735-gautam_pankaj Mon, 22 Oct 2001 23:41:50 -0700 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org) List-ID: Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Subscribe: Delivered-To: mailing list [EMAIL PROTECTED] Message-ID: 005a01c15b8e$08e69f60$[EMAIL PROTECTED] X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Hi, I just installed Redhat 7.1 will all the options (full install) When I try to connect to MySQL I am getting this error /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! I tried to follow as mention on manuall but I still fail to bring up the server...any simpler method? Many thanks - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail To unsubscribe, e-mail Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php Get your FREE download of MSN Explorer at http://explorer.msn.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql CLI: executing SQL from a file
On Mon, 2001-10-22 at 23:49, Neil Zanella wrote: Hello, I would like to know if it is possible to issue a command from the mysql command line interface which will read SQL commands contained in a file and execute them immediately without having to cut and paste them one gpm buffer size at a time. commands.sql mysql should do just fine. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
pls help for index problem
hi, I encountered a problem about indexing. I want to add index on timerecord field in table gw (shown as below) to speed up query relating with time. However, I use explain command (explain select * from gw where timerecord = '010902') to analyze the performace. As a result, it seems the query do not use this index. Would U tell me why and how to correct this !! CREATE TABLE gw( sitename char(12), ip char(15), mac char(17), esn char(12), flag char(2), timerecord timestamp(10), KEY timerecord (timerecord) ); explain select * from gw where timerecord = '010902' table type possible_keyskey key_len ref rows Extra gw ALL timerecord 8313193 where used *remark: The total records in the table gw are 8313193 ! regards, kmlau (I have already read the official document from mysql about index.) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Very untidy
select hour(ts), count(ts) from dundeefw where date=$date and action=1 group by hour(ts) Assuming ts is your timestamp column ... Tom Haapanen [EMAIL PROTECTED] -Original Message- From: Leon Noble [mailto:[EMAIL PROTECTED]] Sent: 23 October 2001 05:45 To: [EMAIL PROTECTED] Subject: Very untidy Hi all, can someone look at my very untidy code and maybe give me some pointers. Searching for values by the hour. etc for ($i = 0; $i = 23; $i++) { $query = select count(num) as mycount from dundeefw where date=$date and action=1 and time=hour($i); // Execute query $result = mysql_query($query) or die (Query Failed); while ($row = mysql_fetch_array ($result)) { $connection[$i] = $row[mycount]; } } I am wondering if there is anyway using SQL to avoid doing this the very messy way. many thanks Leon. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
select ... on empty innobase tables crashes MySQL-Server
Description: Using the following statement on empyt innobase tables crashes the MySQL-Server: select MAX(col3) from crashTable where col1 = 1 and col2 = 7; How-To-Repeat: CREATE TABLE IF NOT EXISTS crashTable ( col1 SMALLINT UNSIGNED NOT NULL, col2 SMALLINT UNSIGNED NOT NULL, col3 INT UNSIGNED NOT NULL, col4 INT UNSIGNED NOT NULL, txtLen INT UNSIGNED, txtLONGBLOB, UNIQUE crashKey(col1, col2, col3, col4) ) TYPE = InnoDB; select MAX(col3) from crashTable where col1 = 1 and col2 = 7; Note: this only crashes when the table type is innobase - the select works fine with MyISAM. Note2: partial query statements, i.e. select MAX(col3) from crashTable and select col3 from crashTable where col1 = 1 and col2 = 7 work fine. Note3: the statement crashes the server only when the table is EMPTY. Fix: Inserting a default record with any values prevents a crash and delivers a correct result (provided that the default record does not contain values that might be 'real' and thus read...) INSERT INTO crashTable VALUES (0, 0, 0, 0, NULL, NULL); Submitter-Id: Ove Originator:Ove Organization: AdNovum Informatik AG +-+ Ove Hiltwein mailto:[EMAIL PROTECTED] Software Architect und Software Engineerdipl. Informatik-Ing. ETH AdNovum Informatik AG http://www.adnovum.ch phone: ++41 1 272 6111 Roentgenstrasse 22, CH-8005 Zuerich fax: ++41 1 272 6312 +-+ AdNovum Software Inc. San Mateo, CA 94404 phone: ++1 650 525 9322 1400 Fashion Island Boulevard, Suite 309 fax: ++1 650 525 9324 +--Fight for your right to bare arms--+ MySQL support: none Synopsis: select MAX(col3) ... statement on empty innobase table crashes MySQL server Severity: non-critical Priority: low Category: mysql Class: sw-bug Release: mysql-3.23.43 (Source distribution) Environment: System: SunOS lucas 5.6 Generic_105181-26 sun4u sparc SUNW,Ultra-5_10 Architecture: sun4 Some paths: /bin/perl /home/ove/.bin/make /opt/pd/bin/gcc /opt/SUNWspro/bin/cc GCC: Reading specs from /opt/pd/gcc-2.95.3/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/specs gcc version 2.95.3 20010315 (release) Compilation info: CC='/opt/pd/gcc-2.95.2/bin/gcc' CFLAGS='-O3' CXX='/opt/pd/gcc-2.95.2/bin/gcc' CXXFLAGS='-O3 -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' LIBC: -rw-r--r-- 1 bin bin 1623504 May 25 04:55 /lib/libc.a lrwxrwxrwx 1 root root 11 Jun 8 19:59 /lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 bin bin 1024888 May 25 04:55 /lib/libc.so.1 -rw-r--r-- 1 bin bin 1623504 May 25 04:55 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Jun 8 19:59 /usr/lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 bin bin 1024888 May 25 04:55 /usr/lib/libc.so.1 Configure command: ./configure --prefix=/opt/mysql --localstatedir=$LOCALSTATEDIR --with-innodb --without-debug Perl: This is perl, version 4.0 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: select ... on empty innobase tables crashes MySQL-Server
Hi! Thank you for a detailed bug report. This bug is already fixed in the source release 3.23.43b available from http://www.innodb.com You can look at latest bug information at http://www.innodb.com/bugfixes.html Regards, Heikki Description: Using the following statement on empyt innobase tables crashes the MySQL-Server: select MAX(col3) from crashTable where col1 = 1 and col2 =7; How-To-Repeat: CREATE TABLE IF NOT EXISTS crashTable ( col1 SMALLINT UNSIGNED NOT NULL, col2 SMALLINT UNSIGNED NOT NULL, col3 INT UNSIGNED NOT NULL, col4 INT UNSIGNED NOT NULL, txtLen INT UNSIGNED,txtLONGBLOB, UNIQUE crashKey(col1, col2, col3, col4) ) TYPE = InnoDB; select MAX(col3) from crashTable where col1 = 1 and col2 = 7; Note: this only crashes when the table type is innobase - the select works fine with MyISAM. Note2: partial query statements, i.e. select MAX(col3) from crashTable and select col3 from crashTable where col1 = 1 and col2 = 7 work fine. Note3: the statement crashes the server only when the table is EMPTY.Fix: Inserting a default record with any values prevents a crash and delivers a correct result (provided that the default record does not contain values that might be 'real' and thus read...) INSERT INTO crashTable VALUES (0, 0, 0, 0, NULL, NULL);Submitter-Id: Ove Originator:Ove Organization: AdNovum Informatik AG +-+ Ove Hiltwein mailto:[EMAIL PROTECTED] Software Architect und Software Engineerdipl. Informatik-Ing. ETH AdNovum Informatik AG http://www.adnovum.ch phone: ++41 1 272 6111 Roentgenstrasse 22, CH-8005 Zuerich fax: ++41 1 272 6312 +-+ AdNovum Software Inc. San Mateo, CA 94404 phone: ++1 650 525 9322 1400 Fashion Island Boulevard, Suite 309 fax: ++1 650 525 9324 +--Fight for your right to bare arms--+ MySQL support: none Synopsis: select MAX(col3) ... statement on empty innobase table crashes MySQL server Severity: non-critical Priority: lowCategory: mysqlClass:sw-bug Release: mysql-3.23.43 (Source distribution)Environment: System: SunOS lucas 5.6 Generic_105181-26 sun4u sparc SUNW,Ultra-5_10 Architecture: sun4 Some paths: /bin/perl /home/ove/.bin/make /opt/pd/bin/gcc /opt/SUNWspro/bin/cc GCC: Reading specs from /opt/pd/gcc-2.95.3/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/specs gcc version 2.95.3 20010315 (release) Compilation info: CC='/opt/pd/gcc-2.95.2/bin/gcc' CFLAGS='-O3' CXX='/opt/pd/gcc-2.95.2/bin/gcc' CXXFLAGS='-O3-felide-constructors -fno-exceptions -fno-rtti' LDFLAGS=''LIBC: -rw-r--r-- 1 bin bin 1623504 May 25 04:55 /lib/libc.a lrwxrwxrwx 1 root root 11 Jun 8 19:59 /lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 bin bin 1024888 May 25 04:55 /lib/libc.so.1 -rw-r--r-- 1 bin bin 1623504 May 25 04:55 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Jun 8 19:59 /usr/lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 bin bin 1024888 May 25 04:55 /usr/lib/libc.so.1 Configure command: ./configure --prefix=/opt/mysql --localstatedir=$LOCALSTATEDIR --with-innodb --without-debugPerl: This is perl, version 4.0 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Best Table And Index Structure
Hi, I'm new to MySQL and indeed SQL in general (coming from an MS Access and Flat Text File background). I have data in text form at the moment of the following fields: ID (Auto increment) ARTIST (Text up to 255 characters long) DESCRIPTION (Text up to 255 characters long) PRICE (Decimal up to 00.00 long) There are approximately 3 million rows of information. I need to create a table structure to import this data into, and then indexes that would balance performance / efficiency to allow searches on the ARTIST and DESCRIPTION columns (the searches will be across either or both fields, and may be partial matches, full matches, Boolean AND / OR etc). I'm running MySQL for windows at the moment for development, although will move this to a Linux / Perl platform with the end result being a web based search engine. Can anyone give me some recommendations on the best table structure? Many thanks, Martyn - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Could not load module libz.a(shr.o) for run scripts/mysql_install_db
[EMAIL PROTECTED] writes: Description: The following is the error message: #scripts/mysql_install_db Could not load program ./bin/my_print_defaults: Dependent module libz.a(shr.o) could not be loaded. Could not load module libz.a(shr.o). [skip] Hi! This is a known deficiency which we shall try to avoid in the next AIX build. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
XA compliant
Dear, Is the mysql XA compliant ? Is there a JDBC driver which support the possible XA compliancy of mysql? Kind regards, Luc Gevaert ComCor Belgium tel: +32 (0)3 309 95 30 GSM(B): +32 (0)479 27 47 20 Fax(B): +32 (0)3 309 05 47 E-mail: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Very untidy
Thanks Tom, That has worked an absolute treat. thank you very much Leon. -Original Message- From: Haapanen, Tom [mailto:[EMAIL PROTECTED]] Sent: 23 October 2001 10:54 To: 'Leon Noble' Cc: [EMAIL PROTECTED] Subject: RE: Very untidy select hour(ts), count(ts) from dundeefw where date=$date and action=1 group by hour(ts) Assuming ts is your timestamp column ... Tom Haapanen [EMAIL PROTECTED] -Original Message- From: Leon Noble [mailto:[EMAIL PROTECTED]] Sent: 23 October 2001 05:45 To: [EMAIL PROTECTED] Subject: Very untidy Hi all, can someone look at my very untidy code and maybe give me some pointers. Searching for values by the hour. etc for ($i = 0; $i = 23; $i++) { $query = select count(num) as mycount from dundeefw where date=$date and action=1 and time=hour($i); // Execute query $result = mysql_query($query) or die (Query Failed); while ($row = mysql_fetch_array ($result)) { $connection[$i] = $row[mycount]; } } I am wondering if there is anyway using SQL to avoid doing this the very messy way. many thanks Leon. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: ORDER BY bug; must also select column that is being ordered by
Hi! Try our 3.23.44 binary for Linux as soon as it is out, and let us know if the problem persists. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
selecting rows where all rows meet a criterion
OK, I have a tricky SQL syntax problem I would like to share. For simplicity's sake, I'll use an analogy. I have two tables, of students and grades, each with a ID column for use in joins, corresponding to a student's ID. The student table has an average grade column which shows that student's average grade last year. The grades table has a column for subject (e.g. English, Math) and a column for the grade achieved. Suppose I want to select all my students who have performed very well this year. I want to select all the students who have beaten last year's average in ALL of this years marks! SELECT * FROM students,grades WHERE students.ID=grades.ID AND grades.grade students.average_grade This doesn't work. It gets me all the occasions where a student has beaten his average. But I only want students who have never gone below their average! In other words, I want to select from the students table, based on information on multiple rows in the grades table, where ALL the grades rows need to fulfil a certain criterion. Help would be gratefully received! -- Dave - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: selecting rows where all rows meet a criterion
Hi, SELECT * FROM students,grades WHERE students.ID=grades.ID AND grades.grade students.average_grade This doesn't work. It gets me all the occasions where a student has beaten his average. But I only want students who have never gone below their average! In other words, I want to select from the students table, based on information on multiple rows in the grades table, where ALL the grades rows need to fulfil a certain criterion. I dunno but this _might_ work: SELECT * FROM students, grades WHERE students.ID = grades.ID AND min(grades.grade) students.average_grade GROUP BY students.ID -- Aigars sql, mysql, query DISCLAIMER: Internet communications are not secure and therefore Defcom does not accept legal responsibility for the contents or accuracy of this message. The views and opinions contained in the message are solely those of the author and do not necessarily represent those of Defcom unless otherwise specifically stated. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: selecting rows where all rows meet a criterion
This might work ... but I don't have a suitable database to test with ... select * from students,grades where students.id=grades.id and min(grades.grade - students.average_grade) 0 group by students.id Tom Haapanen [EMAIL PROTECTED] -Original Message- From: David Hugh-Jones [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 23 October, 2001 13:10 To: [EMAIL PROTECTED] Subject: selecting rows where all rows meet a criterion OK, I have a tricky SQL syntax problem I would like to share. For simplicity's sake, I'll use an analogy. I have two tables, of students and grades, each with a ID column for use in joins, corresponding to a student's ID. The student table has an average grade column which shows that student's average grade last year. The grades table has a column for subject (e.g. English, Math) and a column for the grade achieved. Suppose I want to select all my students who have performed very well this year. I want to select all the students who have beaten last year's average in ALL of this years marks! SELECT * FROM students,grades WHERE students.ID=grades.ID AND grades.grade students.average_grade This doesn't work. It gets me all the occasions where a student has beaten his average. But I only want students who have never gone below their average! In other words, I want to select from the students table, based on information on multiple rows in the grades table, where ALL the grades rows need to fulfil a certain criterion. Help would be gratefully received! -- Dave - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: FreeBSD server help
Kyle, Need a bit more info, what version of mysql? Have you granted the other host(s) permission to use mysql? are you using mysqladmin to stop and start the daemon? cheers, m! Kyle B wrote: Hi all, I am going to try and describe my problem as best as possible. here it goes. Am running FreeBSD v3.0 I can connect to mysql when i telnet to localhost I cannot connect to mysql from another loacation When i try and shut down mysqld it tells me: Segmentation fault (core dumped) It is running on port 2201. I cannot telnet to that port mysql.sock is there whenever i try to run anything to do with mysqld it gives me the error: Segmentation fault (core dumped) Any ideas how to get mysql up and running correctly? Thanks a lot for your time. Kyle B. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
CRITICAL: I need Help turning on raid on MySQL windows version
My perl app that loads the tables reached 2gb and bang! It is only halfway done! I had converted from Oracle which doesn't give a second thought as long as the tablespace is large enough. Has anybody turned on raid for the windows version? Turning this feature on in Unix appears simple, but what about windows... I have MySQL version 3.23.43 windows... Butch Bean - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Pb with user variables
By reading the online manual-split.tar, I try to do some examples but one doesn't work. (For this time, I didn't configure mysql). To (re)-product this error: CREATE TABLE shop ( article INT(4) UNSIGNED ZEROFILL DEFAULT '' NOT NULL, dealer CHAR(20) DEFAULT '' NOT NULL, price DOUBLE(16,2) DEFAULT '0.00' NOT NULL, PRIMARY KEY(article, dealer)); INSERT INTO shop VALUES (1,'A',3.45),(1,'B',3.99),(2,'A',10.99),(3,'B',1.45),(3,'C',1.69), (3,'D',1.25),(4,'D',19.95); my query was: select @min_price:=min(price),@max_price:=max(price) from shop; and the error was: ERROR 1064: You have an error in your SQL syntax near '@min_price:=min(price),@max_price:=max(price) from shop' at line 1 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: FreeBSD server help
Hi Kyle, I know that various verions of FreeBSD had thread problems from 4.1 and down. Is it possible for you to upgrade to FreeBSD 4.4 or 4.3? 3.0 is very old and has many bugs, (unless you have been patching it!). After upgrading to 4.4 you can install MySQL from ports in several different ways or from source download if you want. Best of Luck. Ken - Original Message - From: Kyle B [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 22, 2001 7:46 PM Subject: FreeBSD server help Hi all, I am going to try and describe my problem as best as possible. here it goes. Am running FreeBSD v3.0 I can connect to mysql when i telnet to localhost I cannot connect to mysql from another loacation When i try and shut down mysqld it tells me: Segmentation fault (core dumped) It is running on port 2201. I cannot telnet to that port mysql.sock is there whenever i try to run anything to do with mysqld it gives me the error: Segmentation fault (core dumped) Any ideas how to get mysql up and running correctly? Thanks a lot for your time. Kyle B. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Best choice for index
SELECT id_team, sum(IF(m.id_visitor = t.id_team,m.visitor_score, m.home_score)) AS But_pour, sum(IF(m.id_visitor != t.id_team,m.visitor_score, m.home_score)) AS But_contre FROM tab_teams t, tab_matchs m WHERE t.id_level =4 AND(m.id_visitor = t.id_team OR m.id_home = t.id_team) AND m.season = 2 GROUP BY id_team; Try rewriting this SQL query into a UNION all statement, by removing the OR condition in the WHERE clause, like: SELECT fields FROM tables WHERE m.id_visitor=t.id_team AND m.season=2 UNION ALL SELECT fields FROM tables WHERE m.id_home=t.id_team AND m.season=2 At least from what I know of Oracle this can speed up the query by orders of magnitudes and it maybe does the trick with mySQL, too. UNION ALL is supported with mySQL = 4.x. Best regards ... Ralph ... - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
enum errors - what is the correct syntax?
Hi, I have been bashing my head for a couple of hours now trying to create an enum field which will hold a true or false (1 or 0) value, but I always get an error when I try to create the enum field. What is the SQL syntax to create such a field in phpMyAdmin? I tried to use the building tools within phpMyAdmin, but no success! I searched the MySQL help docs with no joy other either, other than how to read enum fields, but nothing on how to create one. Any possible support is appreciated Regards, Charles McGrotty MATS Database Administrator Maine State Department of Transportation. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Fresh install fails to start - 'host could not be looked up'
On Sunday 21 October 2001 22:59, Chip wrote: I just installed mysql-3.23.43, apache-1.3.22, and php-4.0.6 all from source this evening (on freebsd-4.4-r). When I try to run safe_mysqld I get this; mysqld started Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists! Aboring I see in the file passwd that the user mysql does not indeed exist. I have run /bin/mysql_install_db and it appears to run okay. I checked the online docs but they always refer to running mysql_install_db to set up the mysql user. Is it okay to manually add a new user to FreeBSD called mysql? I tried this but it doesn't work still. What should I do next? -- Chip W. I know it's not good form to respond to one's own message, but since nobody else did, and I got it working I thought I'd share this bit. The source installation absolutely refused to create the user and group entries necesssary, when running mysql_install_db. It did create the db's. And I tried to create the group/user manually but that was no good. I tried re-compiling several times with no luck. I then decided to try the port, which took a bit longer to install, but in the end it works fine. I just prefer the way the source install handles the files/directories better than the port, oh well, I'll live. -- Chip W. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: spontanious performance problem :(
Wouter de Jong wrote: /proc/sys/fs/file-max: 32768 And what about file-nr and others (*-nr)? sql -- Ing. Michal ejdl e-mail: [EMAIL PROTECTED] Sokolovsk uheln, a.s. tel.: +420 168 46-5418 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: selecting rows where all rows meet a criterion
David Hugh-Jones writes: The student table has an average grade column which shows that student's average grade last year. The grades table has a column for subject (e.g. English, Math) and a column for the grade achieved. Suppose I want to select all my students who have performed very well this year. I want to select all the students who have beaten last year's average in ALL of this years marks! This sounds like a LEFT JOIN problem. You want all students who have 0 grades that are below or equal to last year's average, right? Something like SELECT DISTINCT s.id FROM students s LEFT JOIN grades g ON g.id=s.id AND g.grade s.average AND g.year=2000 ought to do the trick. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: enum errors - what is the correct syntax?
McGrotty, Charles writes: I have been bashing my head for a couple of hours now trying to create an enum field which will hold a true or false (1 or 0) value, but I always get an error when I try to create the enum field. An ENUM can only hold strings, so you're probably missing the quotes around 0 and 1. Note that an ENUM has a special value, the empty string, which has a numerical value of 0. Your strings ('0' and '1') will have numerical values of 1 and 2, so you wont be able to use logical operators on the fields directly. E.g., instead of WHERE !field you'll have to write WHERE field == '1'. Because of this, I've ended up using TINYINT(1) instead, but if you're really concerned about space requirements, you should consider using a CHAR(0) _without_ NOT NULL. Now that's an odd way of storing booleans. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. And here's for the bloody stupid piece of crap filter: sql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SQL String max length ?
I stored a sql string in a file and when I launch it, it doesn't perform because the string is truncated before the end. Does mysql limit the length of an sql string ? How do I do to execute my all sql string ? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql CLI: executing SQL from a file
On Tue, 2001-10-23 at 10:52, Ken Guest wrote: On Mon, 2001-10-22 at 23:49, Neil Zanella wrote: Hello, I would like to know if it is possible to issue a command from the mysql command line interface which will read SQL commands contained in a file and execute them immediately without having to cut and paste them one gpm buffer size at a time. commands.sql mysql should do just fine. *smells the coffee* That should, of course, have been mysql commands.sql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Fw: Can't Connect To MySQL
M. Alageswaran wrote: Thanks man, I tried that but still no hope.. when I did a ps -ef | grep mysqld there is nothing in my output! -ef is for HP-UX (I think). For Linux you want 'ps ax |grep mysqld' note there is no dash in front of the ax. b. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: pls help for index problem
kmlau wrote: I encountered a problem about indexing. I want to add index on timerecord field in table gw (shown as below) to speed up query relating with time. However, I use explain command (explain select * from gw where timerecord = '010902') to analyze the performace. As a result, it seems the query do not use this index. Would U tell me why and how to correct this !! U do not need to specify the timestamp as a string, e.g. remove the quotes: timerecord=10902. But more importantly run 'myisamchk -a' on the index (.MYI) file. Doing both of these will help. b. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Length of columns and attachents as a column...
[EMAIL PROTECTED] wrote: Hi all, Is it possible to have an external file as an attachment in MySQL? An example would be a .gif, .doc, .ppt, .ram etc. If there is no way directly have MySQL table to store an attachment, is there any work around? Any guidance will be appreciated. To store it in the database you should use a blob: http://www.mysql.com/doc/B/L/BLOB.html I usually store the path to the file in the database 'though. b. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Experience with mm.mysql-2.0.x ?
Hi !!! And coming to your problem, I belive it got fixed in the latest release. Regards, venu -Original Message- From: Mark Arnold [mailto:[EMAIL PROTECTED]] Sent: Monday, October 22, 2001 6:20 PM To: [EMAIL PROTECTED] Subject: Experience with mm.mysql-2.0.x ? Hi, did anybody ever use the new mm.mysql-2.0.4 (or another 2.x version) library that is introduced as stable on the download section? Is it stable enough to use on production servers? Any positiv / negative comments on that? 2.0.6.1 is the latest and is in production in many places. It can be found at http://mmmysql.sourceforge.net/ www.mysql.com is pointing to old versions, and that is causing lot of problems. So, we will ask our web team to fix this ASAP. I am having problems with the 64k size limit bug in the earlier versions and I'm wondering if I should upgrade to 2.0.4 (which has it fixed) although it seems not to have production release status (yet). Please verify with the above version, it should be. Regards, venu -- For technical support contracts, go to https://order.mysql.com __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mr. Venu [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer /_/ /_/\_, /___/\___\_\___/ California, USA ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: selecting rows where all rows meet a criterion
Hi Tom I'm raring to try this out but whenever I try a GROUP BY on a select with a join, I seem to get ERROR : Invalid use of group function E.g. select * from words,pairs where words.word=pairs.word1 and pairs.word2=15451 and min(pairs.count/words.count) 0.8 group by word2; ERROR : Invalid use of group function (This is the real database, not my example!) David On Tuesday 23 October 2001 8:17 am, Haapanen, Tom w rote: This might work ... but I don't have a suitable database to test with ... select * from students,grades where students.id=grades.id and min(grades.grade - students.average_grade) 0 group by students.id Tom Haapanen [EMAIL PROTECTED] -Original Message- From: David Hugh-Jones [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 23 October, 2001 13:10 To: [EMAIL PROTECTED] Subject: selecting rows where all rows meet a criterion OK, I have a tricky SQL syntax problem I would like to share. For simplicity's sake, I'll use an analogy. I have two tables, of students and grades, each with a ID column for use in joins, corresponding to a student's ID. The student table has an average grade column which shows that student's average grade last year. The grades table has a column for subject (e.g. English, Math) and a column for the grade achieved. Suppose I want to select all my students who have performed very well this year. I want to select all the students who have beaten last year's average in ALL of this years marks! SELECT * FROM students,grades WHERE students.ID=grades.ID AND grades.grade students.average_grade This doesn't work. It gets me all the occasions where a student has beaten his average. But I only want students who have never gone below their average! In other words, I want to select from the students table, based on information on multiple rows in the grades table, where ALL the grades rows need to fulfil a certain criterion. Help would be gratefully received! -- Dave - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Best Table And Index Structure
Martyn Wendon wrote: Hi, I'm new to MySQL and indeed SQL in general (coming from an MS Access and Flat Text File background). I have data in text form at the moment of the following fields: ID (Auto increment) ARTIST (Text up to 255 characters long) DESCRIPTION (Text up to 255 characters long) PRICE (Decimal up to 00.00 long) CREATE TABLE table ( id integer DEFAULT 0 NOT NULL AUTO_INCREMENT PRIMARY KEY, artistvarchar(255), description varchar(255), price decimal( 8,2 ) key( artist(20), description(20)), -- for queries on just artist or artist and description. key( description(20)), --for queries on just desctiption fulltext( artist, description) -- for queries on FULL words anywhere in artist and description ); Read http://www.mysql.com/doc/C/R/CREATE_INDEX.html and http://www.mysql.com/doc/F/u/Fulltext_Search.html to understand the indexes better. b. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: SQL String max length ?
TOMASSONI Dominique wrote: I stored a sql string in a file and when I launch it, it doesn't perform because the string is truncated before the end. Does mysql limit the length of an sql string ? Not that I have ever run into. But ODBC does. What command are you running? E.g. on linux mysql db somequery.sql. How long is the sql? (run wc somequery.sql. b. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: selecting rows where all rows meet a criterion
Alas, my version won't let me use min() in a where clause - it only seems to let me use it in the select clause. Is there a workaround? mysql select * from words where min(count) 50 group by count; ERROR : Invalid use of group function d On Tuesday 23 October 2001 8:17 am, Haapanen, Tom wrote: This might work ... but I don't have a suitable database to test with ... select * from students,grades where students.id=grades.id and min(grades.grade - students.average_grade) 0 group by students.id Tom Haapanen [EMAIL PROTECTED] -Original Message- From: David Hugh-Jones [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 23 October, 2001 13:10 To: [EMAIL PROTECTED] Subject: selecting rows where all rows meet a criterion OK, I have a tricky SQL syntax problem I would like to share. For simplicity's sake, I'll use an analogy. I have two tables, of students and grades, each with a ID column for use in joins, corresponding to a student's ID. The student table has an average grade column which shows that student's average grade last year. The grades table has a column for subject (e.g. English, Math) and a column for the grade achieved. Suppose I want to select all my students who have performed very well this year. I want to select all the students who have beaten last year's average in ALL of this years marks! SELECT * FROM students,grades WHERE students.ID=grades.ID AND grades.grade students.average_grade This doesn't work. It gets me all the occasions where a student has beaten his average. But I only want students who have never gone below their average! In other words, I want to select from the students table, based on information on multiple rows in the grades table, where ALL the grades rows need to fulfil a certain criterion. Help would be gratefully received! -- David Hugh-Jones http://www.zaygo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Rotating error log?
Rafal Jank wrote: Hi! Is there a possibility to rotate mysql error log without stoping the server? I was waiting for someone else to respond. But some possibilities are 1: use the apache program 'rotatelog'. Not sure how you would do this. In Linux you can rename the file while the server is running. Doing that and then 'killall -HUP mysqld' might cause mysql to reopen the log files under the original name. But both of these are untested by me. b. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: selecting rows where all rows meet a criterion
Put the min clause in a having statement ex. select * from words group by count having min(count) 50; -Original Message- From: David Hugh-Jones [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 4:25 PM To: Haapanen, Tom Cc: [EMAIL PROTECTED] Subject: RE: selecting rows where all rows meet a criterion Alas, my version won't let me use min() in a where clause - it only seems to let me use it in the select clause. Is there a workaround? mysql select * from words where min(count) 50 group by count; ERROR : Invalid use of group function d On Tuesday 23 October 2001 8:17 am, Haapanen, Tom wrote: This might work ... but I don't have a suitable database to test with ... select * from students,grades where students.id=grades.id and min(grades.grade - students.average_grade) 0 group by students.id Tom Haapanen [EMAIL PROTECTED] -Original Message- From: David Hugh-Jones [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 23 October, 2001 13:10 To: [EMAIL PROTECTED] Subject: selecting rows where all rows meet a criterion OK, I have a tricky SQL syntax problem I would like to share. For simplicity's sake, I'll use an analogy. I have two tables, of students and grades, each with a ID column for use in joins, corresponding to a student's ID. The student table has an average grade column which shows that student's average grade last year. The grades table has a column for subject (e.g. English, Math) and a column for the grade achieved. Suppose I want to select all my students who have performed very well this year. I want to select all the students who have beaten last year's average in ALL of this years marks! SELECT * FROM students,grades WHERE students.ID=grades.ID AND grades.grade students.average_grade This doesn't work. It gets me all the occasions where a student has beaten his average. But I only want students who have never gone below their average! In other words, I want to select from the students table, based on information on multiple rows in the grades table, where ALL the grades rows need to fulfil a certain criterion. Help would be gratefully received! -- David Hugh-Jones http://www.zaygo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
I want to drop double click from apache's log store in mysql table
Hello and a big thank's to all mysql team for your wonderfull product. I use a mysql table to store my apache's logs. The table is like CREATE TABLE IF NOT EXISTS log ( ip char(12) not null, date datetime not null, ... PRIMARY KEY ( date, ip ) ); Some times, people double click on a link so I get 2 records with several seconds between them. To make a real count I want to keep only one of them. How can I do with one (or more) sql request ??? Thank's for your help. Ce message vous est envoyé par laposte.net - web : www.laposte.net/ minitel : 3615 LAPOSTENET (0,84 F TTC la minute)/ téléphone : 08 92 68 13 50 (2,21 F TTC la minute) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Failed test on merge.
Description: *** merge.rejectTue Oct 23 11:51:23 2001 --- merge.resultWed Oct 3 12:21:17 2001 *** a b *** 9,12 ! 1 Testing ! 1 Testing ! 1 Testing ! 1 Testing --- 9,12 ! 3 t1 ! 3 t2 ! 2 table ! 2 table *** incrothr *** 109,111 ! 1 10 ! 1 10 ! 1 10 --- 109,111 ! 2 24 ! 4 33 ! 3 53 How-To-Repeat: make test Fix: Submitter-Id: Originator:William Fitzpatrick Organization: Metrocall, Inc. MySQL support: none Synopsis: Severity: serious Priority: low Category: mysql Class: sw-bug Release: mysql-3.23.43 (Source distribution) Environment: System: Linux Popserver4 2.2.16 #3 Thu Jun 8 14:57:53 EDT 2000 i686 unknown Architecture: i686 Some paths: /usr/local/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2.3/specs gcc version 2.7.2.3 Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS='' LIBC: lrwxrwxrwx 1 root root 13 Oct 8 1999 /lib/libc.so.4 - libc.so.4.7.6 -rwxr-xr-x 1 root root 634880 Jun 4 1996 /lib/libc.so.4.7.6 lrwxrwxrwx 1 root root 14 Oct 8 1999 /lib/libc.so.5 - libc.so.5.4.46 -rwxr-xr-x 1 root root 614840 Oct 5 1998 /lib/libc.so.5.4.46 lrwxrwxrwx 1 root root 13 Oct 8 1999 /lib/libc.so.6 - libc-2.0.7.so -rwxr-xr-x 1 root root 652412 Oct 25 1998 /lib/libc-2.0.7.so -rw-r--r-- 1 root root 1131866 Jun 20 1998 /usr/lib/libc.a lrwxrwxrwx 1 root root 19 Oct 8 1999 /usr/lib/libc.so - /lib/libc.so.5.4.46 Configure command: ./configure - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: XA compliant
Is the mysql XA compliant ? No. Is there a JDBC driver which support the possible XA compliancy of mysql? No. Some application servers (Jboss for example) provide wrappers for non-XA-compliant databases (which there are many), but you can end up with corrupted databases, as the full two-phase-commit semantics are not supported (just emulated). -Mark (author of MM.MySQL JDBC driver for MySQL) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Replication Headache
Hi all, I wonder if anyone has experience with this. my servers are both setup with mysql. Im following the HOWTO on the MySQL website to set them up to replicate the data. Ive completed every step but I get this error in the logs on the slave system: Slave thread: error connecting to master:Unknown MySQL Server Host '' (2)(107), retry in 60 sec anyone had this before? thanks for your time Stuart. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Join problem, I think
Neil, I did a quick test of your data and this is what I got to work. SELECT item.item, titles.title FROM item LEFT JOIN titles ON item.title_id = titles.title_id; The left join selects all the items from the 'left' table even if there are no matching entries in the 'right' table. A bit of a warning here... if there is no match, then the NULL value is inserted into that spot. Hope it helps, K -- Kay Bowen Tec-Masters, Inc. Advanced Studies and Research Center - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
novice: running pre-written commands
Hi List members, I'm new to MySql and am working through Paul DuBois' book: MySql. In going through his tutorials, I've downloaded his distribution that contains pre-written mysql commands and data to make the manual entry easier. The problem is that I can't seem to run any of his scripts. He indicates that I should enter (at the mysql prompt): mysql create_student.sql; I get error 1064 indicated a syntax error in line 1. As for what I have and what I can do, I'm running the mysqld server and I can connect to it using mysql. The my.cnf configuration file (MySQL 3.23) is present and I've made just the most basic modifications. I can add tables and drop them and describe them. I'm running WinMe. I've tried changing directories into where the MySQL distribution files are sitting and running MySql from there but to no avail. I'm totally new to this and I would greatly appreciate any help, mark - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Tree in SQL
I understand that you only have one table. The query I gave you joins the same table against itself, and aliases it to a, b, and c. The only question was whether the depth is always the same. Steve Meyers Hi I have one table and the depth is not always the same. Anyway thanks :) If the depth of the tree is always the same, it is actually fairly easy. For instance, if there are three levels: SELECT c.group_id FROM table a, table b, table c WHERE a.group_id = 12345 AND b.group_id = a.parent_group_id AND c.group_id = b.parent_group_id If you don't know the depth, you'll have to do a recursive search (keep on querying for the next parent until you run out of parents). Steve Meyers - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Replication Headache
On Tue, Oct 23, 2001 at 05:05:04PM +0100, Stuart Otway wrote: Hi all, I wonder if anyone has experience with this. my servers are both setup with mysql. Im following the HOWTO on the MySQL website to set them up to replicate the data. Ive completed every step but I get this error in the logs on the slave system: Slave thread: error connecting to master:Unknown MySQL Server Host '' (2)(107), retry in 60 sec What does the master.info file on the slave contain? Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 47 days, processed 1,037,202,249 queries (252/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Length limit of 500 on primary keys?
At a previous job, we tested a 32-bit hash function by running it against hundreds of thousands of unique URL's stored in our database. We found one collision. A 64-bit hash is billions of times better (4 billion, to be exact). Good to know. I wonder how many collisions I'd find if I ran it over every URL listed in the directory www.yahoo.com. Which 64 bit hash function did you use? Invent your own, or something off the shelf? We found a public domain one on the net see http://www.burtleburtle.net/bob/hash/evahash.html for some sample code. It's only a 32-bit hash though. However, that same page appears to have instructions for a 64-bit hash function as well, but I haven't tried it at all. I'd be curious to know how many collisions you find hashing all the URL's in yahoo's database :) I don't know how long that would take, but if you do it I'd like to hear the results. Since the hash function takes a key and an initial value, you could try running it with two different initial values and/or keys. This would give you effectively a 128-bit hash, which you could store across two fields in MySQL. I'm guessing that the 64-bit hash will probably be good enough though. Steve Meyers - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Length limit of 500 on primary keys?
At a previous job, we tested a 32-bit hash function by running it against hundreds of thousands of unique URL's stored in our database. We found one collision. A 64-bit hash is billions of times better (4 billion, to be exact). Good to know. I wonder how many collisions I'd find if I ran it over every URL listed in the directory www.yahoo.com. Which 64 bit hash function did you use? Invent your own, or something off the shelf? In a previous message, I failed to mention one of the main reasons you would NOT want to use a 500-character primary key. MySQL uses a key buffer to keep as much index information in memory as possible. The longer the key, the less info it can keep in memory, and the more often it will have to swap to disk. If your key doesn't fit in the key buffer, my tests have shown that there is a HUGE performance loss. Steve Meyers - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Length limit of 500 on primary keys?
Steve Meyers wrote: At a previous job, we tested a 32-bit hash function by running it against hundreds of thousands of unique URL's stored in our database. We found one collision. A 64-bit hash is billions of times better (4 billion, to be exact). Good to know. I wonder how many collisions I'd find if I ran it over every URL listed in the directory www.yahoo.com. Which 64 bit hash function did you use? Invent your own, or something off the shelf? We found a public domain one on the net see http://www.burtleburtle.net/bob/hash/evahash.html for some sample code. It's only a 32-bit hash though. However, that same page appears to have instructions for a 64-bit hash function as well, but I haven't tried it at all. I'd be curious to know how many collisions you find hashing all the URL's in yahoo's database :) I don't know how long that would take, but if you do it I'd like to hear the results. Since the hash function takes a key and an initial value, you could try running it with two different initial values and/or keys. This would give you effectively a 128-bit hash, which you could store across two fields in MySQL. I'm guessing that the 64-bit hash will probably be good enough though. I am not understanding why having a hash and the full url in the database would not take care of the collisions. Even if you had 10 collisions for a 16 bit hash (say), if your query was: SELECT ... WHERE hash=thehashvalue AND url='theurl' you would get very fast lookups on the hash and the url comparison would not add much to the query at that point. You could even do a partial index on the url, e.g. KEY( hash, url(200)). b. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Length limit of 500 on primary keys?
I am not understanding why having a hash and the full url in the database would not take care of the collisions. Even if you had 10 collisions for a 16 bit hash (say), if your query was: SELECT ... WHERE hash=thehashvalue AND url='theurl' you would get very fast lookups on the hash and the url comparison would not add much to the query at that point. You could even do a partial index on the url, e.g. KEY( hash, url(200)). b. That would work, but it was my understanding that they want the key itself to take care of uniqueness. If not, then you can do it that way. However, I would not include part of the URL in the index -- see my previous message about the key buffer. Steve Meyers - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Length limit of 500 on primary keys?
Hi! I changed now ha_innobase.h so that InnoDB allows keys up to 7000 bytes in length. The change will be in MySQL-3.23.44 and 4.0.1. Regards, Heikki http://www.innodb.com Steve Meyers wrote: At a previous job, we tested a 32-bit hash function by running it against hundreds of thousands of unique URL's stored in our database. We found one collision. A 64-bit hash is billions of times better (4 billion, to be exact). Good to know. I wonder how many collisions I'd find if I ran it over every URL listed in the directory www.yahoo.com. Which 64 bit hash function did you use? Invent your own, or something off the shelf? We found a public domain one on the net see http://www.burtleburtle.net/bob/hash/evahash.html for some sample code. It's only a 32-bit hash though. However, that same page appears to have instructions for a 64-bit hash function as well, but I haven't tried it at all. I'd be curious to know how many collisions you find hashing all the URL's in yahoo's database :) I don't know how long that would take, but if you do it I'd like to hear the results. Since the hash function takes a key and an initial value, you could try running it with two different initial values and/or keys. This would give you effectively a 128-bit hash, which you could store across two fields in MySQL. I'm guessing that the 64-bit hash will probably be good enough though. I am not understanding why having a hash and the full url in the database would not take care of the collisions. Even if you had 10 collisions for a 16 bit hash (say), if your query was: SELECT ... WHERE hash=thehashvalue AND url='theurl' you would get very fast lookups on the hash and the url comparison would not add much to the query at that point. You could even do a partial index on the url, e.g. KEY( hash, url(200)). b. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Problem with WinMySQLAdmin on NT
At 08:31 22/10/2001 -0700, [EMAIL PROTECTED] wrote: Hi! So why won't WinMySQLAdmin work for a different user? The user in the my.ini file does exist in mysql.user with Host='%' and %_priv ='Y'. The error file contains 'MySql: ready for connections' but none of the other tabbed pages have any information. Unlucky the WinMySQLAdmin uses the user which was inserted at first time and with all the privileges granted. When I did the code I assumed the Administrator user is the one to be used. For example if you remove, the my.ini file, the tool should ask for you the name and password to be used. Regards, Miguel Is this a bug or a feature? ^ Martin Austin martin(at)fsc.co.uk Formal Software Construction Ltd+44 (0)29 2064 6084 (direct voice mail) CBTC+44 (0)29 2064 6080 (main office) Senghenydd Road +44 (0)29 2064 7009 (fax) Cardiff, CF24 4AY, UK The views of the author may not necessarily constitute the views of Formal Software Construction Limited. Nothing in this email shall bind Formal Software Construction Limited in any contract or obligation. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Miguel A. Solórzano [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Mogi das Cruzes - São Paulo, Brazil ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Compile on 3.23.40 OSF1 Digital UNIX 4.0D - HELP PLEASE
Hi, Using $ gcc -v Reading specs from /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0d/3.0/specs Configured with: /misc/gcc-3.0/configure Thread model: single gcc version 3.0 on $ uname -a OSF1 unix V4.0 878 alpha I get this: Making all in mysys make[2]: Entering directory `/applic/mysql.src/mysql-3.23.40/mysys' /bin/sh ../libtool --mode=link gcc -O3 -DDBUG_OFF -D_PTHREAD_USE_D4 -DHAVE_SIGWAIT -o test_charset -DDEFAULT_BASEDIR=\/applic/mysql-3.23.40a\ -DDATADIR=\/applic/mysql-3.23.40a/var\ -DDEFAULT_CHARSET_HOME=\/applic/mysql-3.23.40a\ -DDATADIR=\/applic/mysql-3.23.40a/var\ -DSHAREDIR=\/applic/mysql-3.23.40a/share/mysql\ -DHAVE_CONFIG_H -I./../include -I../include -I.. -I. -O3 -DDBUG_OFF -D_PTHREAD_USE_D4 -DHAVE_SIGWAIT -DMAIN ./test_charset.c libmysys.a ../dbug/libdbug.a../strings/libmystrings.a -lpthread -lmach -lexc -lm -lpthread -lmach -lexc gcc -O3 -DDBUG_OFF -D_PTHREAD_USE_D4 -DHAVE_SIGWAIT -o test_charset -DDEFAULT_BASEDIR=\/applic/mysql-3.23.40a\ -DDATADIR=\/applic/mysql-3.23.40a/var\ -DDEFAULT_CHARSET_HOME=\/applic/mysql-3.23.40a\ -DDATADIR=\/applic/mysql-3.23.40a/var\ -DSHAREDIR=\/applic/mysql-3.23.40a/share/mysql\ -DHAVE_CONFIG_H -I./../include -I../include -I.. -I. -O3 -DDBUG_OFF -D_PTHREAD_USE_D4 -DHAVE_SIGWAIT -DMAIN ./test_charset.c libmysys.a ../dbug/libdbug.a ../strings/libmystrings.a -lpthread -lmach -lexc -lm -lpthread -lmach -lexc /usr/bin/ld: Unresolved: pthread_mutex_destroy pthread_mutex_lock pthread_mutex_unlock pthread_setspecific pthread_cond_destroy pthread_mutexattr_default pthread_mutex_init pthread_condattr_default pthread_cond_init pthread_getspecific collect2: ld returned 1 exit status make[2]: *** [test_charset] Error 1 make[2]: Leaving directory `/applic/mysql.src/mysql-3.23.40/mysys' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/applic/mysql.src/mysql-3.23.40' Please can someone tell me if there is a compile option to get around this. Can I safely use MIT Threads on OSF? Do I need to update the thread libraries? I have read and re-read the OSF section of the manual, but it is very vague as to what will work and what won't. I have successfully compiled 3.23.40 on Solaris Intel and also compiled 3.22.27 on the OSF1 - that version has recently taken to not responding, which is why I am now desparate to get the (what was) latest version up and running. Help!! Quentin Bennett Transport Systems Division Infinity Solutions www: http://www.infinity.co.nz mailto:[EMAIL PROTECTED] Phone: +64 9 358 9720 Fax: +64 9 309 4142 The information contained in this email is privileged and confidential and intended for the addressee only. If you are not the intended recipient, you are asked to respect that confidentiality and not disclose, copy or make use of its contents. If received in error you are asked to destroy this email and contact the sender immediately. Your assistance is appreciated. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Length limit of 500 on primary keys?
On 23-Oct-2001 Steve Meyers wrote: At a previous job, we tested a 32-bit hash function by running it against hundreds of thousands of unique URL's stored in our database. We found one collision. A 64-bit hash is billions of times better (4 billion, to be exact). Good to know. I wonder how many collisions I'd find if I ran it over every URL listed in the directory www.yahoo.com. Which 64 bit hash function did you use? Invent your own, or something off the shelf? We found a public domain one on the net see http://www.burtleburtle.net/bob/hash/evahash.html for some sample code. It's only a 32-bit hash though. However, that same page appears to have instructions for a 64-bit hash function as well, but I haven't tried it at all. I'd be curious to know how many collisions you find hashing all the URL's in yahoo's database :) I don't know how long that would take, but if you do it I'd like to hear the results. Since the hash function takes a key and an initial value, you could try running it with two different initial values and/or keys. This would give you effectively a 128-bit hash, which you could store across two fields in MySQL. I'm guessing that the 64-bit hash will probably be good enough though. To store hash URL's i use : CONV(PASSWORD('$url'),16,10) as a bigint unsigned 2+ million (so far) no collisions. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
failure in binary test
Description: while doing mysql-test-run --local it fails on the binary test with the following message: /usr/compile/mysql-3.23.43/client/.libs/lt-mysqltest: At line 34: Result length mismatch --- *** r/binary.result Wed Oct 3 19:21:17 2001 --- r/binary.reject Tue Oct 23 22:25:47 2001 *** *** 1,13 name - å ä ö concat(*,name,*) - *å* *ä* *ö* min(name) min(concat(*,name,*)) max(name) max(concat(*,name,*)) ! å *å* ö *ö* name ä å --- 1,13 name ä + å ö concat(*,name,*) *ä* + *å* *ö* min(name) min(concat(*,name,*)) max(name) max(concat(*,name,*)) ! ä *ä* ö *ö* name ä å *** *** 20,25 --- 20,26 ä *ä* ö *ö* name ä + å ö name ä while all another tests (when invoked with --force) were passed just fine. How-To-Repeat: mysql was compiled for FreeBSD 4.4-Stable with the following configuration options: CFLAGS=-mpentiumpro -pipe ./configure \ --enable-thread-safe-client \ --enable-assembler \ --without-debug \ --with-charset=cp1251 \ --with-extra-charsets=koi8_ru Fix: Sorry, guys, I'm not developer so far. As far as I can figure out, this is some sort of locale problem and it is really minor one. Submitter-Id: submitter ID Originator:Seva Gluschenko Organization: Cronyx Plus ISP MySQL support: none Synopsis: failure in binary test Severity: non-critical Priority: low Category: mysql Class: sw-bug Release: mysql-3.23.43 (Source distribution) Environment: System: FreeBSD 4.4-STABLE FreeBSD 4.4-STABLE #0: Sun Oct 21 13:01:04 GMT 2001 i386 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc GCC: Using builtin specs. gcc version 2.95.3 20010315 (release) [FreeBSD] Compilation info: CC='gcc' CFLAGS='-mpentiumpro -pipe' CXX='c++' CXXFLAGS='' LDFLAGS='' LIBC: -r--r--r-- 1 root wheel 1246850 Oct 20 13:49 /usr/lib/libc.a lrwxr-xr-x 1 root wheel 9 Oct 20 13:49 /usr/lib/libc.so - libc.so.4 -r--r--r-- 1 root wheel 614348 Oct 20 13:49 /usr/lib/libc.so.4 Configure command: ./configure --enable-thread-safe-client --enable-assembler --without-debug --with-charset=cp1251 --with-extra-charsets=koi8_ru Perl: This is perl, version 5.005_03 built for i386-freebsd - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL with MyODBC Access
I've recently setup MyODBC and MS Access to use a ODBC profile that is global to everyone. What I did was make a new user in MySQL and then create a MyODBC User DSN. I made the links to MySQL in Access using this profile. The problem I'm having is this, when you initially go into MS Access you have to always click on a specific table then close it and begin the task you wish to do. If you do not do this then nothing works. For some odd reason if you try to open a form or a link it will come up with the ODBC dialog box and always seems to have the database name wrong. The database name seems to match the DSN name. Any ideas why this is not working properly for me? If you need any more information please let me know. Oh yeah the part that makes this really odd is that I have a User DSN setup for myself and one other person for administration purposes only. This User DSN seems to work fine on both our machines. Really odd. Also I've noticed that using Access as a front end to MySQL it seems to not bring through data that is using a type of bigint. Is this a limitation of using Access as a front end? If so what other column types would MS Access not support? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Problem compiling MySQL 4.0 with GCC 3.0.1
Hi, I know this problem has already been reported (but I don't remember the solution :( ) : I encounter the following error after installing gcc 3.0.1 and trying to compile MySQL 4.0 : mysqlbinlog.o(.gnu.linkonce.d._ZTV9Log_event+0x14): undefined reference to `__cxa_pure_virtual' mysqlbinlog.o(.gnu.linkonce.d._ZTV9Log_event+0x18): undefined reference to `__cxa_pure_virtual' mysqlbinlog.o(.gnu.linkonce.d._ZTV9Log_event+0x30): undefined reference to `__cxa_pure_virtual' collect2: ld returned 1 exit status gmake[2]: *** [mysqlbinlog] Error 1 What should I do to make MySQL compile ? Thank you ! Jocelyn Fournier Presence-PC - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Help turning on raid on MySQL windows version
Hi, I think that will solve the problem, I created a tablespace without any problems and now I will start porting the data over. Thanks Butch -Original Message- From: Miguel Angel Solórzano [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 10:41 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Help turning on raid on MySQL windows version At 20:29 22/10/2001 -0400, Butch Bean wrote: Hi! I had consulted the MySQL developer Tonu the responsible of the RAID code about the use of RAID on Windows and he said me that wasn't tested it on Win32. Then I will need to do the test and discuss with him the results. However if your problem is the file size, you can use and test the option to use InnoDB tables, this tables uses table space feature and you put the files in different drive location too: innodb_data_file_path=C:\ibdata\ibdata1:2G;D:\ibdata\ibdata2:2G Now I can't to say for you when the RAID test on Win32 will be made. Regards, Miguel Has anybody turned on raid for the windows version? Turning this feature on in Unix appears simple, but what about windows... I have MySQL version 3.23.43 Linux windows and I need them both configured the same way. Butch Bean - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Miguel A. Solórzano [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Mogi das Cruzes - São Paulo, Brazil ___/ www.mysql.com - Please check http://www.mysql.com/Manual_chapter/manual_toc.html; before posting. To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail [EMAIL PROTECTED] instead. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
EMERGENCY - Our production database is crashed
Dear list members, We are running Mysql 3.23 on Redhat Linux 7.1. We have an emergency. This is the first time we have ever had a problem. Our production database suddenly crashed. I have tried to repair the tables with myisamchk commands, -r, -o, etc and nothing works. Here is the output: myisamchk: error: 'journal.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair myisamchk: error: 'journal.MYD' doesn't have a correct index definition. You need to recreate it before you can do a repair Our first choice would be to repair the above tables. But if this is too hard, our next best option would be to just create a new database and restore the data from one of our backups. So then I tried to create a new database. Even that does not work. I enter drop database deptpros and the system just hangs. I then tried create database prod and the system just hangs again. Thank you
Re: EMERGENCY - Our production database is crashed
David Potter [EMAIL PROTECTED] writes: We are running Mysql 3.23 on Redhat Linux 7.1. Which version on MySQL, and where did you get it? -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: EMERGENCY - Our production database is crashed
David Potter wrote: Dear list members, We are running Mysql 3.23 on Redhat Linux 7.1. We have an emergency. This is the first time we have ever had a problem. Our production database suddenly crashed. I have tried to repair the tables with myisamchk commands, -r, -o, etc and nothing works. Here is the output: myisamchk: error: 'journal.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair myisamchk: error: 'journal.MYD' doesn't have a correct index definition. You need to recreate it before you can do a repair Our first choice would be to repair the above tables. But if this is too hard, our next best option would be to just create a new database and restore the data from one of our backups. So then I tried to create a new database. Even that does not work. I enter drop database deptpros and the system just hangs. I then tried create database prod and the system just hangs again. Filesystem corruption or bad memory? Is your filesystem full? (just throwing some ideas around) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: EMERGENCY - Our production database is crashed
Hi! On Oct 23, David Potter wrote: Dear list members, We are running Mysql 3.23 on Redhat Linux 7.1. We have an emergency. This is the first time we have ever had a problem. Our production database suddenly crashed. I have tried to repair the tables with myisamchk commands, -r, -o, etc and nothing works. Here is the output: myisamchk: error: 'journal.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair myisamchk: error: 'journal.MYD' doesn't have a correct index definition. You need to recreate it before you can do a repair This looks like hardware bug or linux kernel bug (there're some in older versions). MySQL, by itself, NEVER writes to .frm file (besides ALTER TABLE and CREATE TABLE). So, as you have .frm file corrupted, it was, most probably, not due to MySQL bug. I'd recommend you to upgrade to the latest linux kernel - especially, if your server is working under high load. Do you have update log for the time of crash ? Regards, Sergei -- MySQL Development Team __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany ___/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: EMERGENCY - Our production database is crashed
Sergei Golubchik [EMAIL PROTECTED] writes: Hi! On Oct 23, David Potter wrote: Dear list members, We are running Mysql 3.23 on Redhat Linux 7.1. We have an emergency. This is the first time we have ever had a problem. Our production database suddenly crashed. I have tried to repair the tables with myisamchk commands, -r, -o, etc and nothing works. Here is the output: myisamchk: error: 'journal.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair myisamchk: error: 'journal.MYD' doesn't have a correct index definition. You need to recreate it before you can do a repair This looks like hardware bug or linux kernel bug (there're some in older versions). MySQL, by itself, NEVER writes to .frm file (besides ALTER TABLE and CREATE TABLE). So, as you have .frm file corrupted, it was, most probably, not due to MySQL bug. I'd recommend you to upgrade to the latest linux kernel - especially, if your server is working under high load. Make that the latest errata kernel. You'd want to be very careful about 2.4.10 and up. There are, however, no known corruption problems in existing 2.4.x kernels supported by Red Hat (flaky hardware excepted) on supported configurations (i.e. no reiserfs). -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: EMERGENCY - Our production database is crashed
Chances are, you need to type myisamchk -o *.MYI as you only want to run myisamchk on the Index file, which is typically the .MYI file. you probably typed myisamchk -o * which is wrong. Try it out. Garrett On Tuesday 23 October 2001 05:10 pm, you wrote: Hi! On Oct 23, David Potter wrote: Dear list members, We are running Mysql 3.23 on Redhat Linux 7.1. We have an emergency. This is the first time we have ever had a problem. Our production database suddenly crashed. I have tried to repair the tables with myisamchk commands, -r, -o, etc and nothing works. Here is the output: myisamchk: error: 'journal.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair myisamchk: error: 'journal.MYD' doesn't have a correct index definition. You need to recreate it before you can do a repair This looks like hardware bug or linux kernel bug (there're some in older versions). MySQL, by itself, NEVER writes to .frm file (besides ALTER TABLE and CREATE TABLE). So, as you have .frm file corrupted, it was, most probably, not due to MySQL bug. I'd recommend you to upgrade to the latest linux kernel - especially, if your server is working under high load. Do you have update log for the time of crash ? Regards, Sergei - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: EMERGENCY - Our production database is crashed
On Tuesday 23 October 2001 13:50, David Potter wrote: Dear list members, We are running Mysql 3.23 on Redhat Linux 7.1. We have an emergency. This is the first time we have ever had a problem. Our production database suddenly crashed. I have tried to repair the tables with myisamchk commands, -r, -o, etc and nothing works. Here is the output: myisamchk: error: 'journal.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair myisamchk: error: 'journal.MYD' doesn't have a correct index definition. You need to recreate it before you can do a repair Our first choice would be to repair the above tables. But if this is too hard, our next best option would be to just create a new database and restore the data from one of our backups. So then I tried to create a new database. Even that does not work. I enter drop database deptpros and the system just hangs. I then tried create database prod and the system just hangs again. Thank you You might want to try running myisamchk with the -k0 arguments. This turns of all the indexes. I don't know if that will cause it to skip the back indexes, but it might. If you can get the .frm and .MYI files for these tables from a backup, that might work too. The .MYI can be out of sync with the data in the table. That is what myisamchk is for. Also, make sure that you are not running myisamchk while the database is running. Later versions might allow that, I can't remember, but earlier ones do not. Once you overwrite the MYI and frm files (_NOT_ the MYD since that has your data!), you can run myisamchk. I would use the -rv flags if the version of MySQL is rather aged. There was a bug a long time ago that was worked around with the -rv flag combination. Just -r would cause data loss :-( Here's the process: 1) assume that a damaged table is A. Get A.MYI from the backup and A.frm from the backup. Call these A_bak.MYI and A_bak.frm. 2) stop the database. 3) make a backup somewhere of the damaged A.MYI. 4) make a backup somewhere of the damaged A.frm. 5) make a backup somewhere of the damaged A.MYD. 6) copy A_bak.MYI over A.MYI. 7) copy A_bak.frm over A.frm. 8) run myisamchk against A. 9) If it worked, do this with the other damaged tables. I'd pick a smallish table to try this on first so that you can see if it is going to work at all. If it doesn't work, you'll probably have to recover from your original backup tapes. Or... If you cannot get the MYI and frm files back from the backup, then follow this process, it _MIGHT_ work (no warranty, void where prohibited by law, may cause cancer in small laboratory animals, not responsible for anything, anywhere): 1) say the table that is damaged is A. Make a new table A_new that has exactly the same fields and indexes in _exactly_ the same order as the original table. 2) stop the database. 3) copy A_new.MYI over A.MYI (after you've made backups of A.MYI of course!). 4) copy A_new.frm over A.frm (again, make those backups first!). 5) run myisamchk -r again. 6) if that does not work, try -o. I would put -v in there too just so that you can get a feeling for what it is doing. make sure that you can save all the output as it will just keep going. If this works, then do it with the other tables that are missing. This is dangerous. I would only use this if you are certain that the backups cannot be used for a complete rebuild or for the trick I suggested above. I assume that you are using MyISAM tables here since you have *.MYD files. MySQL just doesn't corrupt its database much. If you are seeing this kind of corruption, it usually appears to be disk errors, disk controller errors or bad memory (not necessarily in order). Run the memtest86 program that is floating around out there (SuSE has it as a boot option, don't use Red Hat anymore so I can't say for it). Best, Kyle P.S. buy support from mysql.com. You can get a reasonable level of support (email) for less than $200 per _year_. From experience, they are very responsive and helpful. How much money did this database problem lose your company? That $200 sounds cheap doesn't it? -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MicroTelco Services saves money on every Fax: - Fax to email (FREE) - Fax to PSTN based Fax (Up to 95% Savings) - Fax Broadcasting: Send 100s of faxes to fax machines and email addresses in the time it takes to send just one! === So send a fax today and let us know what you think! For more info. visit: www.internetfaxjack.com === - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To
Re: EMERGENCY - Our production database is crashed
On Tuesday 23 October 2001 14:15, Garrett Marone wrote: Chances are, you need to type myisamchk -o *.MYI as you only want to run myisamchk on the Index file, which is typically the .MYI file. you probably typed myisamchk -o * which is wrong. Heh. I think you're right. It does look like this might be his most likely problem... Sigh. Best, Kyle bot fodder: database, SQL, MySQL, whoop whoop whoop -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MicroTelco Services saves money on every Fax: - Fax to email (FREE) - Fax to PSTN based Fax (Up to 95% Savings) - Fax Broadcasting: Send 100s of faxes to fax machines and email addresses in the time it takes to send just one! === So send a fax today and let us know what you think! For more info. visit: www.internetfaxjack.com === - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL-Front can't open some InnoDb tables ***
I'm trying out MySQL-Front on a Win2k machine and it is having a problem opening some of my InnoDb tables. I can open any of my InnoDb tables if I explicitly specify the database name in the Connection window. But if I leave the database name blank I'll see the database tree in the pane on the left. If I try and select one of my InnoDb tables from underneath the database node, I'll get an error window saying MySQL Error - 1016 Can't open file mytable.InnoDB'. (errno: 1). Clicking on the database name says one or more of the InnoDb tables are 0KB. I know there is data in the tables because I can access them in MySQL. This is the same table that I was able to open in MySQL-Front when I specified the database explicitly in the Connection window. So why does MySQL-Front sometimes have a problem opening InnoDb tables? TIA Brent - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
bulk insert / binary data
I'm doing just general feasibility studying of embedding MySQL in a networking product, and I have a question that I haven't been able to find the answer to after a fair bit of looking - is there some way to insert data that is already in INT UNSIGNED form directly into a table, without converting it into ASCII and then having it converted back again by the database? (I know I could use BLOB, but that would lose some of the benefits of integer-ness.) We would be using the C API. This product generates *large* volumes of data, which is currently all in UINT32 . It would seem to be a large waste of scarce CPU resources to have to convert every single column to and from ASCII. (the only issue I could see would be the endian-ness of it, but that could be managed.) Thanks for your help. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Question about left join.
Hi I posted the question below a little over a week ago and I have not had any responses. Can anyone let me know if my email lacked detail and that's why I've had no responses or whether this is a bug? I can create a complete script that creates the tables, populates them and runs the querries and post that if it will help. Thankyou Jeff. --- Hi I have two tables that are basically: users - username details -- id entrydate username subject contents I am trying to retrieve records from the details table of all users who have logged a job. If a user hasn't then I want them to show 0. When I run the left join query below without specifying a date from the details table it works fine as in Example 1 below. When I add the line, and d.entrydate date_add(now(), interval -7 day ) the left join no longer seems to work. Does anyone know what I am doing wrong? This type of query works fine in Oracle, where the left join is replaced by an outer table join on username. Note: Originally I didn't have a natural left join I just had a left join and specified u.username=d.username but had the same results. I know that the two are syntactically the same, but thought it worth mentioning. Example 1. - Nulls returned. - select u.username Who, ifnull(count(d.username),0) Logs from users as u natural left join details as d where u.disabled='N' group by u.username order by 2 desc Who Logs --- bob 9 sarah 8 frank 3 jane 0 jack 0 Example 2. - No Nulls returned. - select u.username Who, ifnull(count(d.username),0) Logs from users as u natural left join details as d where u.disabled='N' and d.entrydate date_add(now(), interval -7 day ) group by u.username order by 2 desc Who Logs --- bob 7 sarah 3 frank 1 Thankyou Jeff. *** This email and any files transmitted with it, are confidential and is intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify the system manager. This footnote also confirms that this email message has been scanned by AUSTAR Communications content and virus scanning applications for the presence of computer viruses. *** - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php = This message has been scanned for viruses by AUSTAR Communication's antivirus and content checking applications. Austar Communications = *** This email and any files transmitted with it, are confidential and is intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify the system manager. This footnote also confirms that this email message has been scanned by AUSTAR Communications content and virus scanning applications for the presence of computer viruses. *** - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
into outfile error
Hello, After logging into mysql and selecting a database, I type select * from song into outfile 'data123.txt'; but receive the following error message: ERROR 1045: Access denied for user: 'avelino@localhost' (Using password: YES) mysql I made sure the user has full permissions to the database using the grant command. Any suggestions on what can be wrong? Thanks, Avelino - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: bulk insert / binary data
At 6:59 PM -0700 10/23/01, Bob Purvy wrote: I'm doing just general feasibility studying of embedding MySQL in a networking product, and I have a question that I haven't been able to find the answer to after a fair bit of looking - is there some way to insert data that is already in INT UNSIGNED form directly into a table, without converting it into ASCII and then having it converted back again by the database? (I know I could use BLOB, but that would lose some of the benefits of integer-ness.) We would be using the C API. No. This product generates *large* volumes of data, which is currently all in UINT32 . It would seem to be a large waste of scarce CPU resources to have to convert every single column to and from ASCII. (the only issue I could see would be the endian-ness of it, but that could be managed.) Thanks for your help. -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
FW: pls help for index problem
-Original Message- From: kmlau [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 9:42 AM To: 'Bill Adams' Subject: RE: pls help for index problem Thanks yr promptly reply !! It seems no any change(improvement) by running explain again after erase quotes. I also ran the command 'myisamchk -a gw.MYI' before sending this consulting mail !! Would U give me more advice ? regards, kmlau -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill Adams Sent: Tuesday, October 23, 2001 11:11 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: pls help for index problem kmlau wrote: I encountered a problem about indexing. I want to add index on timerecord field in table gw (shown as below) to speed up query relating with time. However, I use explain command (explain select * from gw where timerecord = '010902') to analyze the performace. As a result, it seems the query do not use this index. Would U tell me why and how to correct this !! U do not need to specify the timestamp as a string, e.g. remove the quotes: timerecord=10902. But more importantly run 'myisamchk -a' on the index (.MYI) file. Doing both of these will help. b. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: into outfile error
At 10:43 PM -0400 10/23/01, Avelino F wrote: Hello, After logging into mysql and selecting a database, I type select * from song into outfile 'data123.txt'; but receive the following error message: ERROR 1045: Access denied for user: 'avelino@localhost' (Using password: YES) mysql I made sure the user has full permissions to the database using the grant command. Any suggestions on what can be wrong? Said user might have full permissions on the database, but to use SELECT INTO OUTFILE, you also need the FILE privilege, which is a global privilege, not a database-specific one. Most administrators won't grant the FILE privilege lightly. Thanks, Avelino -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: MySQL with MyODBC Access
Hi -Original Message- From: Adam Douglas [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 12:55 PM To: 'David Turner'; '[EMAIL PROTECTED]'; Mysql@Lists. Mysql. Com (E-mail); '[EMAIL PROTECTED]' Subject: MySQL with MyODBC Access I've recently setup MyODBC and MS Access to use a ODBC profile that is global to everyone. What I did was make a new user in MySQL and then create a MyODBC User DSN. I made the links to MySQL in Access using this profile. The problem I'm having is this, when you initially go into MS Access you have to always click on a specific table then close it and begin the task you wish to do. If you do not do this then nothing works. For some odd reason if you try to open a form or a link it will come up with the ODBC dialog box and always seems to have the database name wrong. The database name seems to match the DSN name. Any ideas why this is not working properly for me? If you need any more information please let me know. Oh yeah the part that makes this really odd is that I have a User DSN setup for myself and one other person for administration purposes only. This User DSN seems to work fine on both our machines. Really odd. This is due to invalid connection parameters supplied in the DSN entries. for a particular MyODBC DSN, you might have specified only the valid DSN and other fields you left it as blank, and that's why driver behaves as you explained above. Please refer to the following link, for more information on how to setup a DSN for MyODBC with different connection parameters. http://www.mysql.com/documentation/mysql/bychapter/manual_Clients.html#ODBC_adm inistrator Also I've noticed that using Access as a front end to MySQL it seems to not bring through data that is using a type of bigint. Is this a limitation of using Access as a front end? If so what other column types would MS Access not support? As per the ODBC spec, BIGINT is not a privileged data type with 2.x specifications, so MyODBC doesn't support this. The new MyODBC 3.51 which is going to be released shortly supports BIGINT. For more information about Access--MySQL data types, refer to the following thread: http://lists.mysql.com/cgi-ez/ezmlm-cgi?4:mss:7537:200110:nbhnfhhlmikphfjkncdh Regards, venu -- For technical support contracts, go to https://order.mysql.com __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mr. Venu [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer /_/ /_/\_, /___/\___\_\___/ California, USA ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Formatting Large amounts of Text into Mysql
Hi. I am trying to have type in a story into a form textfield and submit it using PHP into blob formatted field mysql database. When I submit, all the returns are removed and all the text runs together like on ebig paragraph. Is there a way to have mysql or PHP recognize the returns and empty lines from the textarea field and rememeber them so when I call them up from the database the formatting looks just like when I typed it in the text field? Any help would be very much appreciated.Thank you Tim Gales - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
select stmt problem
Hi, I have this mysql statement: select hpnumber,count(*) as counts from Mobile_Ringtone_Manialogs where counts 10 and datesent between '2001-09-24' and '2001-10-24' and (returncode 0 and returncode 10) group by hpnumber order by counts DESC and i Get this following error: Unknown column 'counts' in 'where clause' why is that so??? it works before and now give me this problem. any idea? regards. Teddy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: into outfile error
Hello, I managed to set the file permission and managed to send the output to the mysql database directory used. Do you know if there is a way to make mysql write to a remote directory? Is there a global or local configuration that can be specified where mysql will write to? Regards, Avelino At 10:09 PM 10/23/2001 -0500, you wrote: At 10:43 PM -0400 10/23/01, Avelino F wrote: Hello, After logging into mysql and selecting a database, I type select * from song into outfile 'data123.txt'; but receive the following error message: ERROR 1045: Access denied for user: 'avelino@localhost' (Using password: YES) mysql I made sure the user has full permissions to the database using the grant command. Any suggestions on what can be wrong? Said user might have full permissions on the database, but to use SELECT INTO OUTFILE, you also need the FILE privilege, which is a global privilege, not a database-specific one. Most administrators won't grant the FILE privilege lightly. Thanks, Avelino -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: select ... on empty innobase tables crashes MySQL-Server
On Tue, Oct 23, 2001 at 01:43:32PM +0300, Heikki Tuuri wrote: Hi! Thank you for a detailed bug report. This bug is already fixed in the source release 3.23.43b available from http://www.innodb.com Is there now a test case for it in the MySQL test suite, too? Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 48 days, processed 1,051,760,607 queries (253/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: journaled file system
On Wed, Oct 24, 2001 at 10:54:38AM +0800, Z Julian wrote: I want to use journaled file system on my computer. Can you give me some advice? Furthermore, could journeled file system improve the performance of mysql? If yes, which journeled file system is better for mysql? Thank you~~ :) We've had good luck with ReiserFS. Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 48 days, processed 1,051,983,004 queries (253/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Formatting Large amounts of Text into Mysql
Are you sure it doesn't have the line feeds in the database? Neither MySQL nor PHP will strip them out, unless you do some fancy work to make it do that. I would guess that your real problem is that when you display it in your HTML, it shows up without returns. This is standard HTML practice -- try running the PHP function nl2br() on the data before displaying it. Steve Meyers -Original Message- From: tim gales [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 9:31 PM To: [EMAIL PROTECTED] Subject: Formatting Large amounts of Text into Mysql Hi. I am trying to have type in a story into a form textfield and submit it using PHP into blob formatted field mysql database. When I submit, all the returns are removed and all the text runs together like on ebig paragraph. Is there a way to have mysql or PHP recognize the returns and empty lines from the textarea field and rememeber them so when I call them up from the database the formatting looks just like when I typed it in the text field? Any help would be very much appreciated.Thank you Tim Gales - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php