MySQL
A while ago we chatted about a better MySQL search engine. So, I wrote a script to turn the list emails into web pages, and set these into a directory, then installed the Alkaline search engine, and added www.mysql.com to the list of sites to index. the url is here http://workinout.com:9998/workinout/search.html It should be up most of the time, and over time, I will add improvements. Its fast, and simple to use, and its 100% MySQL related. Comments welcome anytime. Thansk Jim Danforth - 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
Slave on same machine?
Hi, I know, it sounds a bit like a stupid question, but can I run a slave mysqld server on the same machine? The idea of just running a slave for the purpose of bringing it down, each night, to make a backup, is quite appealing. I now use the hotcopy method. Thanks! - 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: Is it normal?
Is it the same in all database servers? Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: gerald_clark [EMAIL PROTECTED] To: Octavian Rasnita [EMAIL PROTECTED] Cc: Stefan Hinz, iConnect (Berlin) [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED] Sent: Friday, January 24, 2003 4:12 PM Subject: Re: Is it normal? Any calculation involving a floating point number will be imprecise. It does not mater what column types are involved. Octavian Rasnita wrote: And does anyone know what column type I should use if I want a precise calculation? I've even tried with text and blob, but they are not working either. Only the int type is precise? Thanks. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: Stefan Hinz, iConnect (Berlin) [EMAIL PROTECTED] To: Octavian Rasnita [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED] Sent: Monday, January 20, 2003 11:42 PM Subject: Re: Is it normal? Octavian, mysql create table test(id float); mysql insert into test values(1.123), (3.1495); mysql select * from test where id=1.123; Empty set (0.00 sec) Shouldn't this last query show me the record that has the id=1.123? Well ... 1.123 is greater than 1.123, see: mysql select id from octavian where id 1.123; ++ | id | ++ | 1.123 | | 3.1495 | ++ 2 rows in set (0.00 sec) Now here's why. Floats are simply not precise: mysql select id*1 from octavian where id 1.123; +-+ | id*1| +-+ | 11230.000257492 | -- | 31494.998931885 | +-+ 2 rows in set (0.00 sec) What query should I use to do this? I leave this one to Paul or one of the other gurus. Regards, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Octavian Rasnita [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Sent: Monday, January 20, 2003 9:34 AM Subject: Is it normal? Hi all, I've tried the following SQL queries: mysql create table test(id float); Query OK, 0 rows affected (0.00 sec) mysql insert into test values(1.123), (3.1495); Query OK, 2 rows affected (0.01 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql select * from test where id=1.123; Empty set (0.00 sec) Shouldn't this last query show me the record that has the id=1.123? What query should I use to do this? Thank you. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [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 - 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
Displaying news across several pages
Hi, I am a beginner in this MySQL thing, and i am trying to figure out how i can split, for example, some news articles i already have in a table, into several pages. On the site i am building, i get the 10 first news and display them. I use SELECT FROM NEWS ... ORDER BY DATE DESC LIMIT 10. Is there any mysql command to select the next 10 items, for example? something like LIMIT from 10 to 20 hehe, i know it sounds weird. :-) Thanks. Pag - 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
permission or config error
Hello, Probably a question that has been asked a million times before, I searched google and it has been brought up before but there didn't seem to be that many solutions and alot fo the time it would just Start working. Anyway,I have just set up my mysql server Server version: 3.23.54 Protocol version: 10 Connection: Localhost via UNIX socket UNIX socket:/var/lib/mysql/mysql.sock and wrote a little php test script to access the database (not php is configured properly and works when it is just plain php but as soon as it (tries to) connect to the database all fails). ? $connection=mysql_connect(localhost,melinda,mypasswd); $connection= mysql_connect(localhost,melinda,mypassswd) or die(Couldn't connect); if($connection) { $msg=success; } ? ? echo $msg; ? The message I get when I connect is: Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/melinda/public_html/test-sql.php on line 2 Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/melinda/public_html/test-sql.php on line 2 Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/melinda/public_html/test-sql.php on line 3 Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/melinda/public_html/test-sql.php on line 3 Couldn't connect I am still trying to understand all the info on access but I did setup the user melinda as follows: mysql use mysql Database changed mysql insert into user (host, user, password) values('localhost', 'melinda',password('mypasswd')); - then flushed privileges mysqladmin -u root -p flush-privileges and I can login to mysql as the user melinda. Is the error message above due the fact that I have not enabled some other permission or it simply due to the fact that the socket is in /var/lib/mysql/mysql.sock not in /tmp/ and if so how do I tell it that the socket file is in /var/lib Many Thanks, Melinda - 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: Need nulls in my join
This one is relatively simple: Drop the WHERE evtphoto.phtusage = 1. SELECT it and then GROUP ON it. -- Loren McDonald AKA MisterrMac Gods Of Music Reviewer/Editor [EMAIL PROTECTED] http://www.GodsOfMusic.com -Original Message- From: Hoffman, Geoffrey [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 7:28 PM To: [EMAIL PROTECTED] Subject: Need nulls in my join I have an SQL query that LEFT JOINs four different tables to a main table, based on several foreign keys. It's returning only stories in a section that have photos, but I need it to return all the stories in a section whether it has a photo or not. I think the problem is in the WHERE evtphoto.phtusage = 1 -- if there's no photo, then there's no phtusage. Should I split this up into two queries, to get all the story IDs for a section/day and then get the photos for the stories in a 2nd query? Or do I need a different join type? Or do I put the WHERE clauses in a different order? Here's the query: SELECT evtstorysection.secid, evtstory.styid, evtstory.styheadline, evtstory.stysummary, evtstory.styintro, evtstory.stypubdate, evtphoto.phturl, evtphoto.phtcaption, evtstoryorder.stoorder, evtlayoutsum.lytstring FROM evtstory LEFT JOIN evtlayoutsumON evtstory.slytid = evtlayoutsum.lytid LEFT JOIN evtstorysection ON evtstory.styid = evtstorysection.styid LEFT JOIN evtstoryorder ON evtstory.styid = evtstoryorder.styid LEFT JOIN evtphotoON evtstory.styid = evtphoto.styid WHERE evtphoto.phtusage = 1 AND evtstorysection.secid = 3 AND evtstoryorder.secid = 3 AND evtstoryorder.stodate = '2003-01-24' AND evtstory.stypubdate = '2003-01-24' AND evtstory.styexpdate '2003-01-24' ORDER BY evtstoryorder.stoorder - 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
Why does mysqld_safe look for mysqld in libexec
Iwhat am I doing wrong: After downloading the binary for mysql 4.09-max for Mac OS 10.2 safe_mysql complains: % sudo bin/mysqld_safe The file /usr/local/mysql/libexec/mysqld doesn't exist or is not executable Please do a cd to the mysql installation directory and restart this script from there as follows: ./bin/mysqld_safe. It's clear that the binary needs no configure so it should be clear to the contained script that it will find mysqld in mysql/bin and not in mysql/libexec! What am I missing. Thanks/h - 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: permission or config error
Melinda Is there a default socket entry in your php.ini (mysql.default_socket) that is pointing to /tmp? Rich -Original Message- From: Melinda Taylor [mailto:[EMAIL PROTECTED]] Sent: 25 January 2003 00:25 To: [EMAIL PROTECTED] Subject: permission or config error Hello, Probably a question that has been asked a million times before, I searched google and it has been brought up before but there didn't seem to be that many solutions and alot fo the time it would just Start working. Anyway,I have just set up my mysql server Server version: 3.23.54 Protocol version: 10 Connection: Localhost via UNIX socket UNIX socket:/var/lib/mysql/mysql.sock and wrote a little php test script to access the database (not php is configured properly and works when it is just plain php but as soon as it (tries to) connect to the database all fails). ? $connection=mysql_connect(localhost,melinda,mypasswd); $connection= mysql_connect(localhost,melinda,mypassswd) or die(Couldn't connect); if($connection) { $msg=success; } ? ? echo $msg; ? The message I get when I connect is: Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/melinda/public_html/test-sql.php on line 2 Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/melinda/public_html/test-sql.php on line 2 Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/melinda/public_html/test-sql.php on line 3 Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/melinda/public_html/test-sql.php on line 3 Couldn't connect I am still trying to understand all the info on access but I did setup the user melinda as follows: mysql use mysql Database changed mysql insert into user (host, user, password) values('localhost', 'melinda',password('mypasswd')); - then flushed privileges mysqladmin -u root -p flush-privileges and I can login to mysql as the user melinda. Is the error message above due the fact that I have not enabled some other permission or it simply due to the fact that the socket is in /var/lib/mysql/mysql.sock not in /tmp/ and if so how do I tell it that the socket file is in /var/lib Many Thanks, Melinda - 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 search engine
A while ago we chatted about a better MySQL search engine. So I wrote a script to turn the list into web pages, and indexed these and www.mysql.com using the alkaline search engine. the url is http://workinout.com:9998/workinout/search.html Over time I will add improvements a. produce a list of useful links, parsed from the emails b. produce a dynamic FAQ page c. summarize problems into a dynamic top ten list d. other useful sorts, filters and regex output, as i think of it. Comments welcome anytime. Thanks Jim Danforth - 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: Displaying news across several pages
when 2 arguments are specified for LIMIT then the first argument is the offset and the second is the max number of rows e.g. below select * from mytable limit 10,10 select * from mytable limit 20,10 Rich -Original Message- From: Pag [mailto:[EMAIL PROTECTED]] Sent: 25 January 2003 05:10 To: Roger Davis; [EMAIL PROTECTED] Subject: Displaying news across several pages Hi, I am a beginner in this MySQL thing, and i am trying to figure out how i can split, for example, some news articles i already have in a table, into several pages. On the site i am building, i get the 10 first news and display them. I use SELECT FROM NEWS ... ORDER BY DATE DESC LIMIT 10. Is there any mysql command to select the next 10 items, for example? something like LIMIT from 10 to 20 hehe, i know it sounds weird. :-) Thanks. Pag - 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[2]: Storeing images in Database
Dobrý den, sexta-feira, 24 de janeiro de 2003, 22:41:47, napsal jste: WRM Since you obviously aren't going to search the images themselves there is WRM no reason to put them into a database. File systems are designed for WRM this. I might suggest using an Id field and then split them into WRM subdirectories based on the 1st or last digit of the ID (0..9). This WRM would reduce the number of files in a given directory which can be a WRM problem with VERY large numbers of files. You can also put them on a WRM totally differnet drive from the database data to increase performance. WRM The cost is bit of setup (have to create the directories) and WRM programming. This should allow the database rows to be uniform in size WRM which should help performance. OK , but my database is only for images... and i want integrate my client application with the Internet page around the world ... What is more easy, one select and get image or a connection to download the image ? The point is this. in my case... the images in sql database is more comfortable , but is it secure ? you loose data using BLOB fields ? please send me a reply to help me in my decision :) The suggestion bout ID in database and store an a file system, it is very interesting , but if i loose the id´s ? atomically i loose the images correct ? Tanks in advance ! sql,query,tnks - ++ Dyego Souza do Carmo ++ Dep. Desenvolvimento - E S C R I B A I N F O R M A T I C A - The only stupid question is the unasked one (somewhere in Linux's HowTo) Linux registred user : #230601 -- $ look into my eyes look: cannot open my eyes - Reply: [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: Fixed table format with VARCHAR
Hi! On Jan 24, Stefan Hinz wrote: Dear gurus, does someone have background information on the following problem (How does MySQL do this?): CREATE TABLE myisamFixed (col VARCHAR(10)) TYPE=MyISAM ROW_FORMAT=FIXED; CREATE TABLE myisamDynamic (col CHAR(10)) TYPE=MyISAM ROW_FORMAT=DYNAMIC; SHOW TABLE STATUS LIKE 'myisam%'; +--+++ | Name | Type | Row_format | +--+++ | myisamDynamic| MyISAM | Dynamic| | myisamFixed | MyISAM | Fixed | +--+++ Regards, -- Stefan Hinz [EMAIL PROTECTED] Gesch?ftsf?hrer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 Did you try 'SHOW CREATE TABLE' for these tables ? :) You'd found that myisamFixed.col is, in fact CHAR(10), and in myisamDynamic.col is VARCHAR(10). The answer to the question (How does ...) is By silent column type conversion. 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: BUG:ALTER TABLE (MySQL 4.1)
Hi Sergei, I just finish to compile the latest source code (Jan 25) from http://mysql.bkbits.net/mysql-4.1 The problem persist. Georg has right i was trying to alter table when the primary key was already defined and i was trying: ALTER TABLE cmdlivrare MODIFY IDCMD INT(9) AUTO_INCREMENT; From mysqld.log: thd=0x865c0e0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... Cannot determine thread, fp=0xbe7fd7d8, backtrace may not be correct. Stack range sanity check OK, backtrace follows: 0x8114188 0x40039951 0x8167b06 0x8167413 0x8180a14 0x81825d8 0x812138f 0x8124d7d 0x811f9a7 0x811f612 0x811ef8d 0x4003376e 0x402687da New value of fp=(nil) failed sanity check, terminating stack trace! ... Some pointers may be invalid and cause the dump to abort... thd-query at 0x865f408 = alter table cmdlivrare modify IDCMD INT(9) AUTO_INCREMENT ...and from resolve_stack_dump: 0x8114188 handle_segfault + 416 0x40039951 _end + 936095697 0x8167b06 _Z11pack_fieldsiR4ListI12create_fieldE + 170 0x8167413 _Z16rea_create_tableP3THDPcP24st_ha_create_informationR4ListI12create_fieldE jP6st_key + 883 0x8180a14 _Z18mysql_create_tableP3THDPKcS2_P24st_ha_create_informationR4ListI12create_ fieldERS5_I3KeyEbbj + 2500 0x81825d8 _Z17mysql_alter_tableP3THDPcS1_P24st_ha_create_informationP13st_table_listR4 ListI12create_fieldERS6_I3KeyERS6_I10Alter_dropERS6 + 2736 0x812138f _Z21mysql_execute_commandP3THD + 2803 0x8124d7d _Z11mysql_parseP3THDPcj + 221 0x811f9a7 _Z16dispatch_command19enum_server_commandP3THDPcj + 859 0x811f612 _Z10do_commandP3THD + 110 0x811ef8d handle_one_connection + 813 0x4003376e _end + 936070638 0x402687da _end + 938384986 Best regards, Gelu _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: Sergei Golubchik [EMAIL PROTECTED] To: Gelu Gogancea [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 3:48 AM Subject: Re: BUG:ALTER TABLE (MySQL 4.1) Hi! On Jan 24, Gelu Gogancea wrote: Hi, I guess is as a bug in ALTER TABLE with MySQL 4.1,compiled from BK TREE on 2003-01-22. Table schema : CREATE TABLE cmdlivrare(IDCMD INT(9) NOT NULL PRIMARY KEY DEFAULT 2000,mUser CHAR(16),Dep CHAR(4),IDCLI INT(16),FactExt CHAR(20),LivrFinish SMALLINT(1),DataIntro DATE,DataIese DATE,INDEX(Dep),INDEX(FactExt),INDEX(IDCLI),INDEX(mUser),INDEX(LivrFinish),I NDEX(DataIntro),INDEX(DataIese)); I wish to alter this table and modify the definition of IDCMD to IDCMD INT(9) AUTO_INCREMENT NOT NULL PRIMARY KEY DEFAULT 3 For this i do : alter table cmdlivrare modify IDCMD INT(9) AUTO_INCREMENT NOT NULL PRIMARY KEY DEFAULT 3; No crash for me on a recent bk tree (Jan 24, that is). Try a fresh pull. 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 - 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
upgrade mySQL
Greetings I'm currently upgrading mySQL v3.23 to mySQL v4.0, the installation of v4.0 was a success,I tried to execute mysql_fix_privilege_tables c:\mysql\binmysql -e mysql_fix_privilege_tables but i keep on getting the error: ERROR 1064 at line 1: You have an error in your SQL syntax. Check the manual that corresponds to your mySQL server version for the right syntax to use near 'mysql_fix_privilege_tables' at line 1 what is the right way of running this script? OS: win98se mySQL: version 4.0.9 -gamma winMySQLAdmin 1.4: started lewell The content of this email when sent is as full as practical. Due to the settling of the words the contents might not appear as full as it was but the weight remains the same. The contents is being sent by weight and not by volume. - 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
How to speed things up in MySQL ?
Hello, While reading this you may think this is off-topic... but please read on.. I'll get on-topic in the end :-)) First of all I have Web Server on which I have a Paradox table with 320 records. I also have a CGI Script (or program if you like) I made in Borland Delphi which I use to access the Table... When I enter the address of my CGI-script in my Internet Browser the following happens: The CGI script on the Web Server is starting. The CGI script reads the SQL command to execute passed on to the script through the HTTP protocol. The CGI script establish connection with the Borland Database Engine (Loading BDE dll's etc..) The CGI script opens/initialize the Paradox Table. The CGI script execute the SQL command sent to it. The CGI script sends back the result of the SQL command to the Browser (HTTP protocol). The CGI script closes down (shutting down db connection etc..). My PC and my Web Server is connected on the same LAN (switched 100 MBit/s) All of the above is completed in 1.5 seconds. ** here the fun begins ** I have now successfully installed MySQL (on the same WebServer) and converted the Paradox Table to MySQL Table type: MyISAM. Database Name: TDD Table Name: DVD This new Table contains the same 320 records using the same field definition as in the Paradox Table. On my Web Server I go into \MySQL\bin\ and start mysql -uroot -p and execute the same SQL command as sent to the Paradox table through the CGI script. see screen dump below for result. SCREEN DUMP ** F:\MySQL\binmysql -uroot -p Enter password: ** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3726 to server version: 4.0.9-gamma-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use tdd Database changed mysql select count(id) as Films, ProductionYear from DVD - group by ProductionYear - order by ProductionYear desc; +---++ | Films | ProductionYear | +---++ |19 | 2002 | |44 | 2001 | |58 | 2000 | |41 | 1999 | |27 | 1998 | |16 | 1997 | |11 | 1996 | | 9 | 1995 | |12 | 1994 | | 8 | 1993 | | 7 | 1992 | | 3 | 1991 | | 7 | 1990 | | 6 | 1989 | | 2 | 1988 | | 6 | 1987 | | 2 | 1986 | | 2 | 1985 | | 6 | 1984 | | 4 | 1983 | | 3 | 1982 | | 3 | 1981 | | 2 | 1980 | | 3 | 1979 | | 2 | 1978 | | 1 | 1976 | | 1 | 1975 | | 2 | 1974 | | 2 | 1973 | | 1 | 1972 | | 1 | 1971 | | 1 | 1970 | | 1 | 1969 | | 1 | 1968 | | 2 | 1965 | | 1 | 1964 | | 1 | 1959 | | 1 | 1940 | | 1 | 1937 | +---++ 39 rows in set (13.32 sec) mysql *** How is this possible ?? 13.32 seconds ??? And this was when I was directly logged on to the Database (via Localhost)! When Using my Paradox table this took 1.5 second through my CGI script over the Intranet. I have another function in my CGI script sending 2 different SQL commands to the Paradox table.. this entire job completes in less than 3 seconds. In MySQL these 2 job takes more than 30 seconds to complete. What can I do to speed this up ? PS: The DVD table containing the 320 records is the only table on the server. (except from the MySQL database and the empy Test Database). Both the Paradox Table and the MySQL server is installed on the same Harddrive so harddisk speed shouldn't be a factor. Appreciate any help to solve the above :-))) Kind Regards Thomas Kvamme [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
How to combine two selects into one ???
Hi! I need to make a select which is the combined result of 2 selects. I assume I could do this in v4 using UNION or in v3 by running 2 select into statements, however I'd prefer to do it in v3.23 and if possible with just one select and just read permissions. The table is like this : mysql desc process; ++---+--+-+- +---+ | Field | Type | Null | Key | Default | Extra | ++---+--+-+- +---+ | timecode | datetime | | | -00-00 00:00:00 | | | systemid | smallint(5) unsigned | | MUL | 0 | | | username | varchar(20) | | | | | | cpuusage | float(4,2)| YES | | NULL | | ++---+--+-+- +---+ It's a table containing unix users and their cpu usage. The table contain more info about processnames memory usage per process etc. etc.. I first make a select to find the 2 users with the most CPU usage : SELECT username, sum(cpuusage) AS sum_cpuusage FROM process WHERE systemid = '2' AND timecode now() - INTERVAL 1 DAY GROUP BY username ORDER BY sum_cpuusage DESC LIMIT 2 I then use the result from this select to make a new select with the format timecode, user1, user2, user3 etc... where user1, user2 etc. is the sum() of these users cpu usage at any given timecode. I use sum because every user can have more than one process active at any given time, and I store all active (cpu using) processes in the database. What I want is the combined output of selects like these (example with 2 users) : SELECT timecode, sum(cpuusage) AS jfn FROM process WHERE systemid = '2' AND username = 'jfn' AND timecode now() - INTERVAL 1 DAY GROUP BY timecode ORDER BY timecode SELECT timecode, sum(cpuusage) AS root FROM process WHERE systemid = '2' AND username = 'root' AND timecode now() - INTERVAL 1 DAY GROUP BY timecode ORDER BY timecode With combined I mean that I want it in the form timecode, jfn, root. How do I rewrite this into one select, and can it be done without having to use features only present in v4, or features that require write access to the database ??? For people who want to test/try the real database, there's a read only web interface at http://statdb.dassic.com/sql.php The 2 queries from the example that I want to combine into one produce useful data, so the question is just to merge them into one, since the goal is to later, using another interface, ask a PHP script to draw a graph with a top 5 of CPU usage among users. To do this I need a output like this : timecode, user1, user2, user3 etc. /Jesper - 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
Segmentation fault when scanning mysqld port
Hello, i just installed MySQL 3.23.55 on a SuSE Linux 8.1 system (compiled myself), and after firing up mysqld and starting a scan (via nmap; my server has no firewall) from another server, i get the following message: /usr/local/mysql/3.23.55/bin/safe_mysqld: line 280: 1757 Segmentation fault $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-locking $err_log 21 Number of processes running now: 1 mysqld process hanging, pid 1760 - killed 030125 15:06:29 mysqld restarted Hope someone can say something to this. -- Manuel Kiessling - 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: BUG:ALTER TABLE (MySQL 4.1)
Gelu Gogancea writes: Hi Sergei, I just finish to compile the latest source code (Jan 25) from http://mysql.bkbits.net/mysql-4.1 The problem persist. Georg has right i was trying to alter table when the primary key was already defined and i was trying: ALTER TABLE cmdlivrare MODIFY IDCMD INT(9) AUTO_INCREMENT; From mysqld.log: Best regards, Gelu _ G.NET SOFTWARE COMPANY Hi! Was it an empty table ir it had rows. Was it corrupt prior to being ALTERed ?? Please send us a dump of the table or if it is big, upload it to the usual place. -- __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com Join MySQL Users Conference and Expo: http://www.mysql.com/events/uc2003/ - 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: How to speed things up in MySQL ?
Sounds weird. Can you e-mail us a 'mysqldump' of the table defination with the data? Thanks, Bhavin. - Original Message - From: Thomas Kvamme [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 7:36 AM Subject: How to speed things up in MySQL ? Hello, While reading this you may think this is off-topic... but please read on.. I'll get on-topic in the end :-)) First of all I have Web Server on which I have a Paradox table with 320 records. I also have a CGI Script (or program if you like) I made in Borland Delphi which I use to access the Table... When I enter the address of my CGI-script in my Internet Browser the following happens: The CGI script on the Web Server is starting. The CGI script reads the SQL command to execute passed on to the script through the HTTP protocol. The CGI script establish connection with the Borland Database Engine (Loading BDE dll's etc..) The CGI script opens/initialize the Paradox Table. The CGI script execute the SQL command sent to it. The CGI script sends back the result of the SQL command to the Browser (HTTP protocol). The CGI script closes down (shutting down db connection etc..). My PC and my Web Server is connected on the same LAN (switched 100 MBit/s) All of the above is completed in 1.5 seconds. ** here the fun begins ** I have now successfully installed MySQL (on the same WebServer) and converted the Paradox Table to MySQL Table type: MyISAM. Database Name: TDD Table Name: DVD This new Table contains the same 320 records using the same field definition as in the Paradox Table. On my Web Server I go into \MySQL\bin\ and start mysql -uroot -p and execute the same SQL command as sent to the Paradox table through the CGI script. see screen dump below for result. SCREEN DUMP ** F:\MySQL\binmysql -uroot -p Enter password: ** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3726 to server version: 4.0.9-gamma-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use tdd Database changed mysql select count(id) as Films, ProductionYear from DVD - group by ProductionYear - order by ProductionYear desc; +---++ | Films | ProductionYear | +---++ |19 | 2002 | |44 | 2001 | |58 | 2000 | |41 | 1999 | |27 | 1998 | |16 | 1997 | |11 | 1996 | | 9 | 1995 | |12 | 1994 | | 8 | 1993 | | 7 | 1992 | | 3 | 1991 | | 7 | 1990 | | 6 | 1989 | | 2 | 1988 | | 6 | 1987 | | 2 | 1986 | | 2 | 1985 | | 6 | 1984 | | 4 | 1983 | | 3 | 1982 | | 3 | 1981 | | 2 | 1980 | | 3 | 1979 | | 2 | 1978 | | 1 | 1976 | | 1 | 1975 | | 2 | 1974 | | 2 | 1973 | | 1 | 1972 | | 1 | 1971 | | 1 | 1970 | | 1 | 1969 | | 1 | 1968 | | 2 | 1965 | | 1 | 1964 | | 1 | 1959 | | 1 | 1940 | | 1 | 1937 | +---++ 39 rows in set (13.32 sec) mysql *** How is this possible ?? 13.32 seconds ??? And this was when I was directly logged on to the Database (via Localhost)! When Using my Paradox table this took 1.5 second through my CGI script over the Intranet. I have another function in my CGI script sending 2 different SQL commands to the Paradox table.. this entire job completes in less than 3 seconds. In MySQL these 2 job takes more than 30 seconds to complete. What can I do to speed this up ? PS: The DVD table containing the 320 records is the only table on the server. (except from the MySQL database and the empy Test Database). Both the Paradox Table and the MySQL server is installed on the same Harddrive so harddisk speed shouldn't be a factor. Appreciate any help to solve the above :-))) Kind Regards Thomas Kvamme [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
Re: Client History
Darren, Where does the mysql client store the query history information? .mysql_history in your home directory, for example. Under Win it doesn't get stored, AFAIK. Regards, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Darren Young [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 12:23 AM Subject: Client History Where does the mysql client store the query history information? I'm referring to the information that it pulls up when you hit the up or down arrow keys. There was a rather complex query that I came up with a while ago and don't feel like 'up arrowing' all night... Thanks, Darren Young mysql, 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 - 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: upgrade mySQL
Lewell, ERROR 1064 at line 1: You have an error in your SQL syntax. Check the manual that corresponds to your mySQL server version for the right syntax to use near 'mysql_fix_privilege_tables' at line 1 The script your speaking of is a Unix shell script, and there is nothing like that in the Windows binary dist, AFAIK. The MySQL 4.0.x setup should set up the new privileges (privilege tables), too. I guess this will only happen when you delete / rename your old mysql database beforehand. I'll send Cc: to Miguel who is in care of setting up the dists at MySQL AB, AFAIK. He should know what to do best to change the priv tables to have the new privs available. Regards, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: pazenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 1:18 PM Subject: upgrade mySQL Greetings I'm currently upgrading mySQL v3.23 to mySQL v4.0, the installation of v4.0 was a success,I tried to execute mysql_fix_privilege_tables c:\mysql\binmysql -e mysql_fix_privilege_tables but i keep on getting the error: ERROR 1064 at line 1: You have an error in your SQL syntax. Check the manual that corresponds to your mySQL server version for the right syntax to use near 'mysql_fix_privilege_tables' at line 1 what is the right way of running this script? OS: win98se mySQL: version 4.0.9 -gamma winMySQLAdmin 1.4: started lewell The content of this email when sent is as full as practical. Due to the settling of the words the contents might not appear as full as it was but the weight remains the same. The contents is being sent by weight and not by volume. - 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: question about date range
Chuck, select * from orderheader where orderid like '$date' ; The $date variable equals 20030124% Am I right to suppose your query doesn't work? Did you try something like: $sql = select * from orderheader where orderid like '$date'; print $sql; in your application? If have not enough information, but a possible bug could be that $date is not what you expect it to be, but rather something like: 20030124\% HTH, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Chuck Barnett [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 24, 2003 6:33 PM Subject: question about date range Hi, I inherited a db that has a varchar(30) column that holds a date/time stamp in the form of MMDDHHmmss (ex: 20030124093952) Well I want to select a range based on the first 8 characters(MMDD). I currently select a single day by select * from orderheader where orderid like '$date' ; The $date variable equals 20030124% What can I do to get this range selection query to work? Thanks, Chuck Barnett - 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: Displaying news across several pages
Pag, as Rich said: select * from mytable limit 10,10 select * from mytable limit 20,10 In your PHP (?) application, you would have this like: select * from mytable limit $start,$range You could set up range (e.g. in config.inc.php) to whatever you want for the site, and you would add $range to $start when the user clicks on next, and substract $range from $start when the user clicks on previous. HTH, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Rich Gray [EMAIL PROTECTED] To: Pag [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 12:03 PM Subject: RE: Displaying news across several pages when 2 arguments are specified for LIMIT then the first argument is the offset and the second is the max number of rows e.g. below select * from mytable limit 10,10 select * from mytable limit 20,10 Rich -Original Message- From: Pag [mailto:[EMAIL PROTECTED]] Sent: 25 January 2003 05:10 To: Roger Davis; [EMAIL PROTECTED] Subject: Displaying news across several pages Hi, I am a beginner in this MySQL thing, and i am trying to figure out how i can split, for example, some news articles i already have in a table, into several pages. On the site i am building, i get the 10 first news and display them. I use SELECT FROM NEWS ... ORDER BY DATE DESC LIMIT 10. Is there any mysql command to select the next 10 items, for example? something like LIMIT from 10 to 20 hehe, i know it sounds weird. :-) Thanks. Pag - 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 birthday not year
Mike, example birthday=1972/02/14 How do i tell mysql to order by the day (14) only so that I can list same birthday in a month in acending order. If your birthdays are stored in a DATE column, your example would be 1972-02-14. In this case, you can use the date functions of MySQL. Here are some examples (my table datum has only one column named datum, type DATE: mysql SELECT * FROM datum ORDER BY DAYOFMONTH(datum); ++ | datum | ++ | 2002-02-08 | | 2003-02-08 | | 1964-12-17 | | 1958-08-29 | ++ 4 rows in set (0.02 sec) mysql SELECT * FROM datum ORDER BY MONTH(datum), DAYOFMONTH(datum); ++ | datum | ++ | 2002-02-08 | | 2003-02-08 | | 1958-08-29 | | 1964-12-17 | ++ 4 rows in set (0.01 sec) HTH, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Mike Doanh Tran [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 24, 2003 11:14 PM Subject: order by birthday not year Hi, I want to use the order by clause to list the birthday field by the birthday not year. How do i do this? example birthday=1972/02/14 How do i tell mysql to order by the day (14) only so that I can list same birthday in a month in acending order. Thanks -- Mike Doanh Tran Shuffle Master Inc. Website: http://internal.shufflemasterrd.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
Re: Windows InnoDB
Darren, Is the InnoDB table type available on Windows? Yes. If you want it to be the default table type, start the server with --default-table-type=innodb. Note that you will have to use a newer version of MySQL ( 3.23.somewhat). In 3.23.x, you will have to enable InnoDB, in 4.0.x, it's enabled by default. HTH, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Darren Young [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 24, 2003 11:03 PM Subject: Windows InnoDB Is the InnoDB table type available on Windows? Darren Young [EMAIL PROTECTED] mysql, 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 - 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
What's wrong with mysql 4.0.9?
Hi all, I have mysql 4.0.9 gama for Windows installed and I have a problem because I cannot set a password for a username. I've tried: mysql grant all on *.* to 'teddy@localhost' identified by 'password'; All went right but I can't access mysql using this newly created account. I can see this new account in mysql.user and there is a password set for it. However, if I try: mysql -u teddy -p ... and give that password it tells me that I don't have access to mysql. Thanks. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [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: Windows InnoDB
Yes, InnoDB is available in the compiled version for Windows. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: Darren Young [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 12:03 AM Subject: Windows InnoDB Is the InnoDB table type available on Windows? Darren Young [EMAIL PROTECTED] mysql, 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 - 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: BUG:ALTER TABLE (MySQL 4.1)
Hi Sinisa, I guess is no need because the problem it's solved now.I don't wish to happened like the last time...and now, i'm little more carrefully. You have right.The data on table was corrupt becuase of previous source code (bk pull on Jan 22).I make ten's of test whith this code based on this problem. Today (Jan 25) i make pull again (Sergei suggest me today) and now it work well after when i fixed the table. Best regards, Gelu _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: Sinisa Milivojevic [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 6:20 PM Subject: Re: BUG:ALTER TABLE (MySQL 4.1) Gelu Gogancea writes: Hi Sergei, I just finish to compile the latest source code (Jan 25) from http://mysql.bkbits.net/mysql-4.1 The problem persist. Georg has right i was trying to alter table when the primary key was already defined and i was trying: ALTER TABLE cmdlivrare MODIFY IDCMD INT(9) AUTO_INCREMENT; From mysqld.log: Best regards, Gelu _ G.NET SOFTWARE COMPANY Hi! Was it an empty table ir it had rows. Was it corrupt prior to being ALTERed ?? Please send us a dump of the table or if it is big, upload it to the usual place. -- __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com Join MySQL Users Conference and Expo: http://www.mysql.com/events/uc2003/ - 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
Cannot connect from WInXp MYSQL server - help
OK, I have a mysql server running on my home server. The main os is Redhat8. I know that Mysql is running on port 3306 as its showing as listening. I ahve opened the tcp port for boh internal and external connections - fione. I ahve also disbaled it to test aswell. Anyway - I have loaded several MYsql clients on my winxp pro pc on my home LAN, eg Dbmanager. I ahve set the settinsg fine, and each time I try and connection I get the error:- Lost connection to mysql durring query. In the loags it says:- Number of processes running now: 1 mysqld process hanging, pid 2522 - killed 030125 17:49:36 mysqld restarted /usr/libexec/mysqld: ready for connections So - its killing the pid, which I assume is my connections. Any ideas on what to look for. Scott www.toptravelsites.net www.myeyes-youreyes.co.uk - 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: Need nulls in my join
On Fri, 2003-01-24 at 20:27, Hoffman, Geoffrey wrote: I have an SQL query that LEFT JOINs four different tables to a main table, based on several foreign keys. It's returning only stories in a section that have photos, but I need it to return all the stories in a section whether it has a photo or not. I think the problem is in the WHERE evtphoto.phtusage = 1 -- if there's no photo, then there's no phtusage. Should I split this up into two queries, to get all the story IDs for a section/day and then get the photos for the stories in a 2nd query? Or do I need a different join type? Or do I put the WHERE clauses in a different order? Here's the query: SELECT evtstorysection.secid, evtstory.styid, evtstory.styheadline, evtstory.stysummary, evtstory.styintro, evtstory.stypubdate, evtphoto.phturl, evtphoto.phtcaption, evtstoryorder.stoorder, evtlayoutsum.lytstring FROM evtstory LEFT JOIN evtlayoutsumON evtstory.slytid = evtlayoutsum.lytid LEFT JOIN evtstorysection ON evtstory.styid = evtstorysection.styid LEFT JOIN evtstoryorder ON evtstory.styid = evtstoryorder.styid LEFT JOIN evtphotoON evtstory.styid = evtphoto.styid LEFT JOIN evtphoto nophoto ON evtstory.styid = nophoto.styid WHERE evtphoto.phtusage = 1 AND Replace above line with: (evtphoto.phtusage = 1 OR nophoto.phtusage IS NULL) AND evtstorysection.secid = 3 AND evtstoryorder.secid = 3 AND evtstoryorder.stodate = '2003-01-24' AND evtstory.stypubdate = '2003-01-24' AND evtstory.styexpdate '2003-01-24' ORDER BY evtstoryorder.stoorder __ / \\ @ __ __@ Adolfo Bello [EMAIL PROTECTED] / // // /\ / \\ // \ // Bello Ingenieria S.A, ICQ: 65910258 / \\ // / \\ / // // / //cel: +58 416 609-6213 /___// // / _/ \__\\ //__/ // fax: +58 212 952-6797 www.bisapi.com //pager: www.tun-tun.com (# 609-6213) - 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: 3.23.54a - Solaris 9/gcc 2.95.3 compile problem
I've run into this if a previous build attempt aborted due to a bad LD_(LIBRARY|RUN)_PATH where I fixed the LD variable, and re-tried the build. Starting with a fresh copy of the source (not distclean, fresh from tarfile), always solved my problem. -=| Ben - Original Message - From: Len Rose [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 19, 2003 8:57 AM Subject: 3.23.54a - Solaris 9/gcc 2.95.3 compile problem Has anyone run into this? I did a search on the web site looking for information before posting, didn't see anything.. 3.23.54a - Compiling with gcc 2.95.3, Solaris 9 sparc.. # snip Making all in sql make all-recursive Making all in share source='sql_lex.cc' object='sql_lex.o' libtool=no \ depfile='.deps/sql_lex.Po' tmpdepfile='.deps/sql_lex.TPo' \ depmode=gcc /bin/bash ../depcomp \ ++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME=\/opt/local\ -DDATADIR=\/var/ data\ -DSHAREDIR=\/opt/local/share/mysql\ -DHAVE_CONFIG_H -I. -I. -I .. -I./../include -I./../regex -I. -I../include -I.. -I. -O3 -DDBUG_OF F -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_RWLOCK_T -c -o sql_lex.o `test -f sql_lex.cc || echo './'`sql_lex.cc sql_lex.cc: In function `void lex_init()': sql_lex.cc:85: `symbols' undeclared (first use this function) sql_lex.cc:85: (Each undeclared identifier is reported only once sql_lex.cc:85: for each function it appears in.) sql_lex.cc:87: `sql_functions' undeclared (first use this function) sql_lex.cc: In function `int find_keyword(LEX *, unsigned int, bool)': sql_lex.cc:168: implicit declaration of function `int get_hash_symbol(...)' sql_lex.cc:168: initialization to `SYMBOL *' from `int' lacks a cast *** Error code 1 make: Fatal error: Command failed for target `sql_lex.o' # snip Thanks Len - 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: 3.23.54a - Solaris 9/gcc 2.95.3 compile problem
Hi.. as of Solaris 8 you should NEVER use LD_*, use crle(1) instead! As to the problem mentioned in my original post, I was able to compile mysql 3.23.54a using an older compiler under Solaris 8 and 9. (and posted that update later that day..) On Sat, Jan 25, 2003 at 01:26:07PM -0500, Ben Goodwin wrote: I've run into this if a previous build attempt aborted due to a bad LD_(LIBRARY|RUN)_PATH where I fixed the LD variable, and re-tried the build. Starting with a fresh copy of the source (not distclean, fresh from tarfile), always solved my problem. -=| Ben - Original Message - From: Len Rose [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 19, 2003 8:57 AM Subject: 3.23.54a - Solaris 9/gcc 2.95.3 compile problem Has anyone run into this? I did a search on the web site looking for information before posting, didn't see anything.. 3.23.54a - Compiling with gcc 2.95.3, Solaris 9 sparc.. [snip] - 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: Client History
Hi, If you start the mysql daemon with option --log then you will find the file with all querys which was executed, in the data directory. Regards, Gelu _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: Stefan Hinz, iConnect (Berlin) [EMAIL PROTECTED] To: Darren Young [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 6:04 PM Subject: Re: Client History Darren, Where does the mysql client store the query history information? .mysql_history in your home directory, for example. Under Win it doesn't get stored, AFAIK. Regards, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Darren Young [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 12:23 AM Subject: Client History Where does the mysql client store the query history information? I'm referring to the information that it pulls up when you hit the up or down arrow keys. There was a rather complex query that I came up with a while ago and don't feel like 'up arrowing' all night... Thanks, Darren Young mysql, 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 - 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: How to speed things up in MySQL ?
Hi. On Sat 2003-01-25 at 13:36:01 +0100, [EMAIL PROTECTED] wrote: [...] mysql select count(id) as Films, ProductionYear from DVD - group by ProductionYear - order by ProductionYear desc; [...] 39 rows in set (13.32 sec) mysql *** How is this possible ?? 13.32 seconds ??? Good question. I do not know the answer, but I can tell you that there is something seriously screwed up. It should only take a fraction of a second. When I run a similar query on my database, it displays 0.00 sec, i.e. it took less than 0.01 secs. The same query on a database with 600.000 records takes about 4.7 secs. And this was when I was directly logged on to the Database (via Localhost)! When Using my Paradox table this took 1.5 second through my CGI script over the Intranet. [...] What can I do to speed this up ? As I said, I am not sure. This is not a question of optimizing your database or queries. Your installation of MySQL does not behave normally. Usually, there is no way any operation on 320 records would take more than at most 0.1 seconds or such. PS: The DVD table containing the 320 records is the only table on the server. (except from the MySQL database and the empy Test Database). Both the Paradox Table and the MySQL server is installed on the same Harddrive so harddisk speed shouldn't be a factor. Harddrive speed shouldn't be a factor at all, as 320 records need so few memory that they usually are kept in memory after first access. Appreciate any help to solve the above :-))) Just to be sure to exclude anything I might not have thought of, can you post the result of EXPLAIN for the select above SHOW CREATE TABLE DVD SHOW INDEX FROM DVD SHOW TABLE STATUS LIKE 'DVD' Is there anything running on the server while you do your tests? Regards, Benjamin. -- [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: How to combine two selects into one ???
On Sat 2003-01-25 at 14:11:06 +0100, [EMAIL PROTECTED] wrote: [...] What I want is the combined output of selects like these (example with 2 users) : SELECT timecode, sum(cpuusage) AS jfn FROM process WHERE systemid = '2' AND username = 'jfn' AND timecode now() - INTERVAL 1 DAY GROUP BY timecode ORDER BY timecode SELECT timecode, sum(cpuusage) AS root FROM process WHERE systemid = '2' AND username = 'root' AND timecode now() - INTERVAL 1 DAY GROUP BY timecode ORDER BY timecode With combined I mean that I want it in the form timecode, jfn, root. How do I rewrite this into one select, and can it be done without having to use features only present in v4, or features that require write access to the database ??? If I understand you correcty, the following should do what you want (untested): SELECT timecode, SUM(IF(username='jfn',cpuusage,0)), SUM(IF(username='root',cpuusage,0)) FROM process WHEREsystemid = 2 AND timecode now() - INTERVAL 1 DAY AND username in ('jfn', 'root') GROUP BY timecode ORDER BY timecode Note that it will be somewhat slower than two seperate queries, I think. For people who want to test/try the real database, there's a read only web interface at http://statdb.dassic.com/sql.php The 2 queries from the example that I want to combine into one produce useful data, so the question is just to merge them into one, since the goal is to later, using another interface, ask a PHP script to draw a graph with a top 5 of CPU usage among users. To do this I need a output like this : timecode, user1, user2, user3 etc. For that application, I do not see why the output of something like SELECT timecode, user, SUM(cpuusage) FROM process WHEREsystemid = 2 AND timecode now() - INTERVAL 1 DAY AND username in ('jfn', 'root') GROUP BY timecode, user ORDER BY timecode, user is not enough. That is easily post-processed in the application. HTH, Benjamin. -- [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: Need nulls in my join
Oopssorry. That should have been GROUP BY and not GROUP ON That's what I get for answering a post at 2am. :) -- Loren McDonald AKA MisterrMac [EMAIL PROTECTED] This one is relatively simple: Drop the WHERE evtphoto.phtusage = 1. SELECT it and then GROUP ON it. -- Loren McDonald AKA MisterrMac - 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: Segmentation fault when scanning mysqld port
On Sat 2003-01-25 at 14:16:35 +0100, [EMAIL PROTECTED] wrote: Hello, i just installed MySQL 3.23.55 on a SuSE Linux 8.1 system (compiled myself), and after firing up mysqld and starting a scan (via nmap; my server has no firewall) from another server, i get the following message: /usr/local/mysql/3.23.55/bin/safe_mysqld: line 280: 1757 Segmentation fault $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-locking $err_log 21 Number of processes running now: 1 mysqld process hanging, pid 1760 - killed 030125 15:06:29 mysqld restarted Hope someone can say something to this. Try a pre-compiled binary? Without testing, I simply presume that such an obvious bug would not stay long. So your binary looks shaky. Okay, I tested against the older 3.23.49 and cannot reproduce this. HTH, Benjamin. -- [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: Replication between MySql and MS Sql Server
Look into a product called SQLPorter. http://www.realsoftstudio.com I used it once for a MySQL to MSSQL migration project, but you could go in the other direction. If I remember correctly, I think it includes a scheduling feature. -bill On Tue, Jan 21, 2003 at 01:15:01PM -, John Lodge wrote: Hello all, I wonder if anyone has set up a MySql database to mirror one running on MS Sql Server. Although this sounds like an odd requirement, I have a project where this would be extremely useful. Can anyone give me any suggestions as to where to find out more information on this subject. I have done some searching on Google and in the FAQ, and have not come up with anything that I have found useful. Any comments greatly appreciated, Thanks, John Lodge John Lodge Software Engineer Redwood Technologies Limited T +[44] (0)1344 304 344 F +[44] (0)1344 304 345 M +[44] (0)794 122 1422 E [EMAIL PROTECTED] W www.redwoodtech.com Email Disclaimer The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this email are subject to the limitations of Redwood Technologies Limited's standard terms and conditions of contract. - 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: Need nulls in my join
Unfortunately I tried to implement what you suggested, but in my case it didn't work. I have stories that can have zero or more photos, one or more author, one or more sections, and one or more active dates. Trying to join all those items together using your suggestion actually did return stories with no photo, but I would then get 3 copies of a story that had 3 photos, and 6 copies of a 2-photo story that appears on 3 days. What I really need is mysql 4's SELECT blah WHERE (SELECT blah) subselect feature, but that's not an option either due to the host I'm using. I ended up writing a simpler query get all the unique story id's for a section, then doing a foreach loop in PHP to query for all the additional data for the story where ID = $loopindex. I'm sure there's a supermysqlguru out there who cringes when you issue a bunch of queries in a PHP loop, but it works fine for now. Thanks though - I'm sure I'll use your suggestion somewhere in the app I'm working on. Geoff -Original Message- From: Loren McDonald [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 25, 2003 1:41 PM To: Hoffman, Geoffrey; [EMAIL PROTECTED] Subject: RE: Need nulls in my join Oopssorry. That should have been GROUP BY and not GROUP ON That's what I get for answering a post at 2am. :) -- Loren McDonald AKA MisterrMac [EMAIL PROTECTED] This one is relatively simple: Drop the WHERE evtphoto.phtusage = 1. SELECT it and then GROUP ON it. -- Loren McDonald AKA MisterrMac - 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
moving users/privileges
Hi, I am upgrading mysql from 3.23.23 to .55 on a brand new server and I don't how to move over the users/password and privileges so all the logins are the same. Can anyone help? thanks, Mogenns --- Registration Resources Online Event Registration Made Simple --- http://www.regresources.com Toll Free: 877-932-2622 x1 503-655-6813 x1 (Voice) | 503-655-6907 (Fax) --- - 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
weird comparison problem
This msg keeps bouncing off the list. First off, thanks for the hint on displaying several pages of news. :-) Am having a bit of a weird problem with a SELECT on my MYSQL database: If i use this: SELECT * FROM tablehere WHERE userid = '$uid' AND password = '$pwd' with $uid and $pwd being vars from a login form, and Miguel being userid on the table, i can login if i type miguel on the form. No matter if i type uppercase or lowercase, it always logs in, how can that be? Miguel is != to miguel. (but if i misspel it, it fails, as it should :-) How can i make a correct check with upper case distinction? Thanks Pag - 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: How to combine two selects into one ???
-Original Message- From: Benjamin Pflugmann [mailto:[EMAIL PROTECTED]] Sent: sábado, 25 de enero de 2003 21:38 To: Jesper Frank Nemholt Cc: [EMAIL PROTECTED] Subject: Re: How to combine two selects into one ??? [clip] If I understand you correcty, the following should do what you want (untested): SELECT timecode, SUM(IF(username='jfn',cpuusage,0)), SUM(IF(username='root',cpuusage,0)) FROM process WHEREsystemid = 2 AND timecode now() - INTERVAL 1 DAY AND username in ('jfn', 'root') GROUP BY timecode ORDER BY timecode Note that it will be somewhat slower than two seperate queries, I think. Thanks, it did exactly what I wanted :-) The other example you listed has the problem that my application, or rather the PHP script that generates the graphics, only works if the output is organized as one timecode followed by a number of values for each row. /Jesper - 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: Cannot connect from WInXp MYSQL server - help
Scott, most probably, you've got a glibc problem on your Red Hat box. Try upgrading to a newer version of glibc, and if the problem (mysqld dies when trying to connect from anywhere else than localhost) has gone, I was right :) (There was a very similar question a couple of days ago on this list. I don't know if the Red Hat problem is exactly the same as the SuSE problem I could solve by updating glibc, but the symptom is the same.) Regards, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Scott Lewis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 6:51 PM Subject: Cannot connect from WInXp MYSQL server - help OK, I have a mysql server running on my home server. The main os is Redhat8. I know that Mysql is running on port 3306 as its showing as listening. I ahve opened the tcp port for boh internal and external connections - fione. I ahve also disbaled it to test aswell. Anyway - I have loaded several MYsql clients on my winxp pro pc on my home LAN, eg Dbmanager. I ahve set the settinsg fine, and each time I try and connection I get the error:- Lost connection to mysql durring query. In the loags it says:- Number of processes running now: 1 mysqld process hanging, pid 2522 - killed 030125 17:49:36 mysqld restarted /usr/libexec/mysqld: ready for connections So - its killing the pid, which I assume is my connections. Any ideas on what to look for. Scott www.toptravelsites.net www.myeyes-youreyes.co.uk - 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:count in subselect problem
Well it all depends which version of mysql you are using... versions prior to 4 don't support sub-select.. -- Stijn Van Rompaey [EMAIL PROTECTED] writes: Return-Path: [EMAIL PROTECTED] Received: from mx11.nyc.untd.com (mx11.nyc.untd.com [10.140.24.71]) by maildeliver03.nyc.untd.com with SMTP id AAA9DDMXAABM9SBJ for [EMAIL PROTECTED] (sender [EMAIL PROTECTED]); Fri, 24 Jan 2003 16:22:40 -0500 (EST) Received: from web.mysql.com (web.mysql.com [213.136.49.183]) by mx11.nyc.untd.com with SMTP id AAA9DDMW9AUWDGJA for [EMAIL PROTECTED] (sender [EMAIL PROTECTED]); Fri, 24 Jan 2003 16:22:39 -0500 (EST) Received: (qmail 27937 invoked by uid 7797); 24 Jan 2003 15:18:00 - Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org) List-ID: mysql.mysql.com Precedence: bulk List-Help: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Post: mailto:[EMAIL PROTECTED] List-Subscribe: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Received: (qmail 27923 invoked from network); 24 Jan 2003 15:18:00 - Message-ID: 00b601c2c3bb$cae633a0$c031e0d5@testrk98 From: Stijn Van Rompaey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: count in subselect problem Date: Fri, 24 Jan 2003 16:18:04 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600. X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600. 1st problem: SELECT F.id, F.title, F.description, F.created, (select count(*) from forum F, topic T where F.id=T.forum_id AND T.reply_id=0 ) count1, (select count(*) from forum F, topic T where F.id=T.forum_id ) count2 from forum F, topic T where F.id=T.forum_id AND T.reply_id=0 GROUP BY F.id 2nd problem: SELECT T.title, T.id, P.nick, (select count(*) from topic where reply_id = T.reply_id) replies FROM topic T, profile P WHERE T.author_id=P.id AND T.forum_id=1 and reply_id=0; what is wrong with these queries? - 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: Need nulls in my join
Hi. On Sat 2003-01-25 at 14:25:14 -0400, [EMAIL PROTECTED] wrote: On Fri, 2003-01-24 at 20:27, Hoffman, Geoffrey wrote: [...] It's returning only stories in a section that have photos, but I need it to return all the stories in a section whether it has a photo or not. I think the problem is in the WHERE evtphoto.phtusage = 1 -- if there's no photo, then there's no phtusage. [...] You simply have to move that condition from the WHERE clause to the appropriate ON clause (and drop the part you put in to handle the case without photo): SELECT evtstorysection.secid, [...] FROM evtstory LEFT JOIN evtlayoutsum ON evtstory.slytid = evtlayoutsum.lytid LEFT JOIN evtstorysection ON evtstory.styid = evtstorysection.styid LEFT JOIN evtstoryorderON evtstory.styid = evtstoryorder.styid LEFT JOIN evtphoto ON evtstory.styid = evtphoto.styid AND evtphoto.phtusage = 1 WHERE evtstorysection.secid = 3 AND evtstoryorder.secid = 3 AND evtstoryorder.stodate = '2003-01-24' AND evtstory.stypubdate = '2003-01-24' AND evtstory.styexpdate '2003-01-24' ORDER BY evtstoryorder.stoorder HTH, Benjamin. -- [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: How to speed things up in MySQL ?
Hi Bhavin. Thanks for taking interest in my problem... Here is the table definition as requested. I'm sorry I could take a full dump... Each record consist of approx 600 KB (just as in the Paradox table) so the file would be very big. (200 MB). Kind Regards Thomas Kvamme [EMAIL PROTECTED] BEGIN *** -- MySQL dump 9.07 -- -- Host: localhostDatabase: tdd - -- Server version 4.0.9-gamma-nt -- -- Table structure for table 'dvd' -- CREATE TABLE dvd ( ID int(11) NOT NULL auto_increment, Title varchar(100) default NULL, ProductionYear varchar(4) default NULL, TagLine varchar(200) default NULL, NorwegianTitle varchar(100) default NULL, NorwegianTagLine varchar(200) default '', Director varchar(100) default '', Story varchar(100) default '', Producer varchar(100) default '', Genre varchar(100) default '', Production varchar(200) default '', Distribution varchar(200) default '', NorwegianDistribution varchar(200) default '', ScreenFormat varchar(50) default '16:9 Anamorphic Widescreen', AspectRatio varchar(10) default '2:35:1', DVDDiscType char(2) default '9', DVDRegion char(1) default '2', RunningTime time default '00:00:00', IMDB varchar(20) default '', Starring blob, SoundTracks blob, Subtitles blob, SpecialFeatures blob, Comments blob, PlotOutline blob, FullCredits longblob, Cover longblob, THXCertified enum('False','True') default 'False', DDEX enum('False','True') default 'False', DTS enum('False','True') default 'False', MPEG enum('False','True') default 'False', Recommended enum('False','True') default 'False', Added datetime default '-00-00 00:00:00', Updated datetime default '-00-00 00:00:00', PRIMARY KEY (ID), KEY Added (Added), KEY Title (Title,ProductionYear), KEY NorwegianTitle (NorwegianTitle,ProductionYear) ) TYPE=MyISAM; * END - Original Message - From: Bhavin Vyas [EMAIL PROTECTED] To: Thomas Kvamme [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 5:15 PM Subject: Re: How to speed things up in MySQL ? Sounds weird. Can you e-mail us a 'mysqldump' of the table defination with the data? Thanks, Bhavin. - Original Message - From: Thomas Kvamme [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 7:36 AM Subject: How to speed things up in MySQL ? Hello, While reading this you may think this is off-topic... but please read on.. I'll get on-topic in the end :-)) First of all I have Web Server on which I have a Paradox table with 320 records. I also have a CGI Script (or program if you like) I made in Borland Delphi which I use to access the Table... When I enter the address of my CGI-script in my Internet Browser the following happens: The CGI script on the Web Server is starting. The CGI script reads the SQL command to execute passed on to the script through the HTTP protocol. The CGI script establish connection with the Borland Database Engine (Loading BDE dll's etc..) The CGI script opens/initialize the Paradox Table. The CGI script execute the SQL command sent to it. The CGI script sends back the result of the SQL command to the Browser (HTTP protocol). The CGI script closes down (shutting down db connection etc..). My PC and my Web Server is connected on the same LAN (switched 100 MBit/s) All of the above is completed in 1.5 seconds. ** here the fun begins ** I have now successfully installed MySQL (on the same WebServer) and converted the Paradox Table to MySQL Table type: MyISAM. Database Name: TDD Table Name: DVD This new Table contains the same 320 records using the same field definition as in the Paradox Table. On my Web Server I go into \MySQL\bin\ and start mysql -uroot -p and execute the same SQL command as sent to the Paradox table through the CGI script. see screen dump below for result. SCREEN DUMP ** F:\MySQL\binmysql -uroot -p Enter password: ** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3726 to server version: 4.0.9-gamma-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use tdd Database changed mysql select count(id) as Films, ProductionYear from DVD - group by ProductionYear - order by ProductionYear desc; +---++ | Films | ProductionYear | +---++ |19 | 2002 | |44 | 2001 | |58 | 2000 | |41 | 1999 | |27 | 1998 | |16 | 1997 | |11 | 1996 | | 9 | 1995 | |12 | 1994 | | 8 | 1993 | | 7 | 1992 | | 3 | 1991 | | 7 | 1990 | | 6 | 1989 | | 2 | 1988 | |
good manner for handling multiple languages dynamic websites
Hello, I have, for the first time, a website to do in several languages. I'll do a variable replacement whereever needed, with several lang files (as I've seen so many times in open source PHP applications) but I am wondering how in sql I could do for translating items' names.. I explain : I have a site in english, where the user posts an ad, when he has to choose the color of his object, he chooses RED I will store RED,BLUE,GREEN,etc. in a table 'color' so I can build a dropdown list for the user to choose from well now, if a visitor browse the ads in french. I'd like the color to read 'rouge' not 'red'. How should I go about that, database items ? Cheers if you see what sort of problem I am facing right now. Damien, - 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
Charset and French Diacritic Characters
Hello everybody, I'm french and use MySQL 3.23.40 on the Windows environment. And I have a problem with the special french characters (é, è, ê, à, â, etc.)... I want that the search queries are insensitive to those special characters. So that, for example, the é character is handled as the e character. and the query élégant finds elegant. A very common problem I think, but until now I have no simple solution (and find nothing interesting on the Net) ! I read the MySQL manual about the charsets and their handling. It seeems that, for a given charset, sorting, upper casing and lower casing are done according to the configuration stored into the charset.conf file... (with the 4 arrays ctype[ ], to_lower[ ], to_upper[ ] and sort_order[ ]). By default, the charset used by my MySQL is Latin1. According to the Latin1.conf file (and the sort_order[ ] array), the é character is sorted (and compared) as the e character... But it does not work ! WHY ? Obviously, there is something that I don't understand, but what ? What can I do ? What should I do to obtain that the queries are insensitive to french characters ? Any help will be appreciated ! Best Regards ! Xavier LENOIR - 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
Workable solution: writing program to communicate with remote internet MySQL server
Hello All, Just thought I'd report back with what seems to be a simple, elegant solution to my previous inquiry re: writing a program to connect with the MySQL server that powers my internet site from my desktop PC. Yesterday I downloaded the latest release of PHP (ver 4.3.0) and, while reading the announcements and release notes, I noticed that PHP appears to be positioning itself as not only a dynamic environment for web site development (and one amply provided with functionality to connect to MySQL), but also as a serious contender for the local desktop scripting jobs, presumably in response to the growing popularity of packages such as Perl / Python / Ruby / etc for desktop tasks. To this end it appears the PHP team have been developing a command line interface flavour of PHP to complement the popular web server flavour. The CLI flavour appears to run oblivious to your local web server environment and presumably is available even if you don't have Apache / IIS / etc installed or configured to serve PHP pages (though, I must admit I haven't had a chance to test whether this is the case). And the great thing about THAT, from my perspective, is that communicating from my desktop PC to my web site's MySQL server on my host's machines is as simple as: $db = mysql_pconnect(mydomainname.com, myusername, myusernamepassword); In the same script I can easily connect to both my local machine's MySQL server and my host's remote MySQL server, compare recordsets retrieved from both and fire synchronizing update / insert / delete statements in response to any differences. As a bonus, I can fire PHP CLI scripts from my box's task scheduler, so I can write scripts to automatically update my remote server in quiet times of the morning, or hourly and so on. I'd also like to thank the several people who communicated with me off-list re: possible solutions to my list question on this topic. All of your suggested solutions were helpful and appreciated. Regards and best wishes, Murray Wells, Urban Legend Web Design (ABN 18 635 979 727) - 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: moving users/privileges
In the last episode (Jan 25), Mogenns Gilmour said: Hi, I am upgrading mysql from 3.23.23 to .55 on a brand new server and I don't how to move over the users/password and privileges so all the logins are the same. Can anyone help? Just copy the basedir/mysql database files from the old server to the new one. -- Dan Nelson [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: How to speed things up in MySQL ?
Hi again, Just did another test which I find very interesting Using the Paradox table instead of the MySQL table I managed to load each and every record search through every field (including all the text in all the blob field) in just 6 seconds. and still doing a simple group SELECT GROUP BY on the same table in MySQL takes 13 seconds... still can't belive it. -- Thomas - Original Message - From: Bhavin Vyas [EMAIL PROTECTED] To: Thomas Kvamme [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 5:15 PM Subject: Re: How to speed things up in MySQL ? Sounds weird. Can you e-mail us a 'mysqldump' of the table defination with the data? Thanks, Bhavin. - Original Message - From: Thomas Kvamme [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 7:36 AM Subject: How to speed things up in MySQL ? Hello, While reading this you may think this is off-topic... but please read on.. I'll get on-topic in the end :-)) First of all I have Web Server on which I have a Paradox table with 320 records. I also have a CGI Script (or program if you like) I made in Borland Delphi which I use to access the Table... When I enter the address of my CGI-script in my Internet Browser the following happens: The CGI script on the Web Server is starting. The CGI script reads the SQL command to execute passed on to the script through the HTTP protocol. The CGI script establish connection with the Borland Database Engine (Loading BDE dll's etc..) The CGI script opens/initialize the Paradox Table. The CGI script execute the SQL command sent to it. The CGI script sends back the result of the SQL command to the Browser (HTTP protocol). The CGI script closes down (shutting down db connection etc..). My PC and my Web Server is connected on the same LAN (switched 100 MBit/s) All of the above is completed in 1.5 seconds. ** here the fun begins ** I have now successfully installed MySQL (on the same WebServer) and converted the Paradox Table to MySQL Table type: MyISAM. Database Name: TDD Table Name: DVD This new Table contains the same 320 records using the same field definition as in the Paradox Table. On my Web Server I go into \MySQL\bin\ and start mysql -uroot -p and execute the same SQL command as sent to the Paradox table through the CGI script. see screen dump below for result. SCREEN DUMP ** F:\MySQL\binmysql -uroot -p Enter password: ** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3726 to server version: 4.0.9-gamma-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use tdd Database changed mysql select count(id) as Films, ProductionYear from DVD - group by ProductionYear - order by ProductionYear desc; +---++ | Films | ProductionYear | +---++ |19 | 2002 | |44 | 2001 | |58 | 2000 | |41 | 1999 | |27 | 1998 | |16 | 1997 | |11 | 1996 | | 9 | 1995 | |12 | 1994 | | 8 | 1993 | | 7 | 1992 | | 3 | 1991 | | 7 | 1990 | | 6 | 1989 | | 2 | 1988 | | 6 | 1987 | | 2 | 1986 | | 2 | 1985 | | 6 | 1984 | | 4 | 1983 | | 3 | 1982 | | 3 | 1981 | | 2 | 1980 | | 3 | 1979 | | 2 | 1978 | | 1 | 1976 | | 1 | 1975 | | 2 | 1974 | | 2 | 1973 | | 1 | 1972 | | 1 | 1971 | | 1 | 1970 | | 1 | 1969 | | 1 | 1968 | | 2 | 1965 | | 1 | 1964 | | 1 | 1959 | | 1 | 1940 | | 1 | 1937 | +---++ 39 rows in set (13.32 sec) mysql *** How is this possible ?? 13.32 seconds ??? And this was when I was directly logged on to the Database (via Localhost)! When Using my Paradox table this took 1.5 second through my CGI script over the Intranet. I have another function in my CGI script sending 2 different SQL commands to the Paradox table.. this entire job completes in less than 3 seconds. In MySQL these 2 job takes more than 30 seconds to complete. What can I do to speed this up ? PS: The DVD table containing the 320 records is the only table on the server. (except from the MySQL database and the empy Test Database). Both the Paradox Table and the MySQL server is installed on the same Harddrive so harddisk speed shouldn't be a
Re: upgrade mySQL
In the last episode (Jan 25), pazenko said: I'm currently upgrading mySQL v3.23 to mySQL v4.0, the installation of v4.0 was a success,I tried to execute mysql_fix_privilege_tables c:\mysql\binmysql -e mysql_fix_privilege_tables but i keep on getting the error: ERROR 1064 at line 1: You have an error in your SQL syntax. Check the manual that corresponds to your mySQL server version for the right syntax to use near 'mysql_fix_privilege_tables' at line 1 what is the right way of running this script? I don't know if there's a windows version if it. It's a shell script. If you have cygwin installed, try running sh mysql_fix_privilege_tables -- Dan Nelson [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: What's wrong with mysql 4.0.9?
At 11:35 +0200 1/25/03, Octavian Rasnita wrote: Hi all, I have mysql 4.0.9 gama for Windows installed and I have a problem because I cannot set a password for a username. I've tried: mysql grant all on *.* to 'teddy@localhost' identified by 'password'; The user name and hostname must be quoted separately: 'teddy'@'localhost' sql, 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
Re: Is it normal?
At 20:32 +0200 1/24/03, Octavian Rasnita wrote: Is it the same in all database servers? It's in the nature of digital devices to represent continuous values inaccurately. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: gerald_clark [EMAIL PROTECTED] To: Octavian Rasnita [EMAIL PROTECTED] Cc: Stefan Hinz, iConnect (Berlin) [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED] Sent: Friday, January 24, 2003 4:12 PM Subject: Re: Is it normal? Any calculation involving a floating point number will be imprecise. It does not mater what column types are involved. Octavian Rasnita wrote: And does anyone know what column type I should use if I want a precise calculation? I've even tried with text and blob, but they are not working either. Only the int type is precise? - 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: Slave on same machine?
At 5:07 +0100 1/25/03, Mark wrote: Hi, I know, it sounds a bit like a stupid question, but can I run a slave mysqld server on the same machine? Sure. They have to be using different ports, of course. The idea of just running a slave for the purpose of bringing it down, each night, to make a backup, is quite appealing. I now use the hotcopy method. Thanks! - 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
Needed: Working VB6 example of DAO DSN LESS connection using MyODBC to MySQL preferably with passthruquery
This message intended for MyODBC questions list. Hello VB6, MySQL, and DAO developers, A very simple example of my problem: Dim ws As Workspace Dim conn As Connection Dim str As String Set ws = DBEngine.CreateWorkspace(testing, , , dbUseODBC) str = odbc;driver={MySQL ODBC 3.51 Driver}; _ SERVER=localhost; _ DATABASE=test; _ UID=;PWD=;OPTION=3 Set conn = ws.OpenConnection(test, dbDriverNoPrompt, False , str) 'this last line errors with ' -- Run-time error '3146' - ODBC--Call Failed. 'if I use: ' Set conn = ws.OpenConnection(test, dbDriverPrompt, False , str) 'and just select OK on the ODBC Connection Manager ' everything work properly - I can't figure out why. ' Maybe because this turns my connection into a DSN connection. I'm using all the latest and gratest installs on a MS WIndows 2000. Does anyone know OFFICIALLY if the DAO DSN LESS openconnection is supposed to work or not? If so, could you please post hyperlink for all to share? Can anyone please test this OpenConnection on their PC? Can you get it to work? If so, Could you please post the working code here for all to share? Does anyone have DAO DSN LESS openconnection code working? If so, Could you please post your working code here for all to share? I'm interested in working/tested/proven code examples. Also, could someone please point me in the right direction for setting the passthruquery flag? Where do I set the flag? MySQL or maybe in the connection settings? If you don't know what DSN LESS means then please post your question in another thread. If you want to discuss ADO over DAO please post your question in another thread. Thanks, Barry G. Sumpter - 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: How to speed things up in MySQL ?
Add an index to ProductionYear. If that doesn't speed things up to significantly less than a second from the command line, I'd check how MySQL is set up. Fred Steinkopf - Original Message - From: Thomas Kvamme [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 7:36 AM Subject: How to speed things up in MySQL ? Hello, While reading this you may think this is off-topic... but please read on.. I'll get on-topic in the end :-)) First of all I have Web Server on which I have a Paradox table with 320 records. I also have a CGI Script (or program if you like) I made in Borland Delphi which I use to access the Table... When I enter the address of my CGI-script in my Internet Browser the following happens: The CGI script on the Web Server is starting. The CGI script reads the SQL command to execute passed on to the script through the HTTP protocol. The CGI script establish connection with the Borland Database Engine (Loading BDE dll's etc..) The CGI script opens/initialize the Paradox Table. The CGI script execute the SQL command sent to it. The CGI script sends back the result of the SQL command to the Browser (HTTP protocol). The CGI script closes down (shutting down db connection etc..). My PC and my Web Server is connected on the same LAN (switched 100 MBit/s) All of the above is completed in 1.5 seconds. ** here the fun begins ** I have now successfully installed MySQL (on the same WebServer) and converted the Paradox Table to MySQL Table type: MyISAM. Database Name: TDD Table Name: DVD This new Table contains the same 320 records using the same field definition as in the Paradox Table. On my Web Server I go into \MySQL\bin\ and start mysql -uroot -p and execute the same SQL command as sent to the Paradox table through the CGI script. see screen dump below for result. SCREEN DUMP ** F:\MySQL\binmysql -uroot -p Enter password: ** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3726 to server version: 4.0.9-gamma-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use tdd Database changed mysql select count(id) as Films, ProductionYear from DVD - group by ProductionYear - order by ProductionYear desc; +---++ | Films | ProductionYear | +---++ |19 | 2002 | |44 | 2001 | |58 | 2000 | |41 | 1999 | |27 | 1998 | |16 | 1997 | |11 | 1996 | | 9 | 1995 | |12 | 1994 | | 8 | 1993 | | 7 | 1992 | | 3 | 1991 | | 7 | 1990 | | 6 | 1989 | | 2 | 1988 | | 6 | 1987 | | 2 | 1986 | | 2 | 1985 | | 6 | 1984 | | 4 | 1983 | | 3 | 1982 | | 3 | 1981 | | 2 | 1980 | | 3 | 1979 | | 2 | 1978 | | 1 | 1976 | | 1 | 1975 | | 2 | 1974 | | 2 | 1973 | | 1 | 1972 | | 1 | 1971 | | 1 | 1970 | | 1 | 1969 | | 1 | 1968 | | 2 | 1965 | | 1 | 1964 | | 1 | 1959 | | 1 | 1940 | | 1 | 1937 | +---++ 39 rows in set (13.32 sec) mysql *** How is this possible ?? 13.32 seconds ??? And this was when I was directly logged on to the Database (via Localhost)! When Using my Paradox table this took 1.5 second through my CGI script over the Intranet. I have another function in my CGI script sending 2 different SQL commands to the Paradox table.. this entire job completes in less than 3 seconds. In MySQL these 2 job takes more than 30 seconds to complete. What can I do to speed this up ? PS: The DVD table containing the 320 records is the only table on the server. (except from the MySQL database and the empy Test Database). Both the Paradox Table and the MySQL server is installed on the same Harddrive so harddisk speed shouldn't be a factor. Appreciate any help to solve the above :-))) Kind Regards Thomas Kvamme [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/
RE: good manner for handling multiple languages dynamic websites
Bear in mind that I've never attempted a multilingual website, but the first thought that I had when I read your post was to have a table name extension that gets appended based on the user's language choice/locale/whatever: $langext = _en;// english // $langext = _de; // german // $langext = _fr; // french etc. $sql = SELECT *.* FROM dropdownitem.$langext. ; All other things being equal this way, you'd have duplicated tables but little else in your app. dropdownitem_en dropdownitem_de dropdownitem_fr categories_en categories_de categories_fr If you have the ability to make the entire db this way, (create database yourapp_en, yourapp_de, yourapp_fr, etc.) it may be simpler, but depends on your host... I know I cant create dbs, only tables in one db for the domain. Good Luck! Geoff D I have, for the first time, a website to do in several languages. D I'll do a variable replacement whereever needed, with several D lang files (as D I've seen so many times in open source PHP applications) D the color of his object, he chooses RED D I will store RED,BLUE,GREEN,etc. in a table 'color' so I can build a D dropdown list for the user to choose from D D well now, if a visitor browse the ads in french. I'd like the D color to read D 'rouge' not 'red'. D D How should I go about that, database items ? - 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: Charset and French Diacritic Characters
Hello Xavier, can't you do the transforming of your keywords before doing the query ? to transform all special characters in php it would be : $keywords = strtr($keywords,éè^éëàãâä,_); add other special characters and a JOKER sign in mysql '_' for each. Cheers, Damien - 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: error with 4.0.9 c API or user
how-to-repeat: compile a c program use mysqlclient 4.0.9. Below is the makefile and output from running make Makefile: CC = gcc INCLUDES = -I/usr/include/mysql LIBS = -L/usr/lib/mysql -lmysqlclient -lm all: listener main.o: main.c common.h $(CC) -c $(INCLUDES) main.c common.o: common.c common.h $(CC) -c $(INCLUDES) common.c listener: main.o common.o $(CC) -o listener main.o common.o $(LIBS) clean: rm -f listener main.o common.o I am getting the following message when submitting the following: [sam@linux sam]$ make gcc -o listener main.o common.o -L/usr/lib/mysql -lmysqlclient -lm /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress': my_compress.o(.text+0xaa):undefined reference to `uncompress' /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc': my_compress.o(.text+0x13c): undefined reference to `compress' collect2: ld returned 1 exit status make: *** [listener] Error 1 Please advise sam - 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