Re: Binary data
Barry, This can be done using normal insert/update statements. You only have to 'escape' the binary zero, the backslash and the quotes (' or ") out; suppose jpg contains the binary data, the following code will do the trick: (pseudo code:) for (i=length(jpg); i--; i0) { if (jpg[i] in [#0, '\', , '"'] ) { jpg=jpg[1..i-1] + '\' + jpg[i..length(jpg)] }; Original Message - From: "Barry Radloff" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 7:55 AM Subject: Binary data hi I am pretty new at this and would like to know how does one store a binary blob to the mysql DB ie I would like to store a jpeg to the db Thanks Barry Radloff RD Media24 - 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: Auto-Increment - how can I avoid repeating IDs?
Rus wrote: That's strange. I thought that auto_increment field not suppose to use same value. May be it's problem connected with transaction. Check doc's on COMMIT. Try to set AUTOCOMMIT=1 It's real. Here is a demonstration. First, the table definition... Auto_increment fields will re-use values for ISAM tables (i.e. tables created in versions before 3.23 or being created with TYPE=ISAM). This behaviour was changes with the introduction of MyISAM tables (introduced in v. 3.23). See also http://www.bitbybit.dk/mysqlfaq/faq.html#ch6_0_0 / Carsten +-+--+--+-+-++ | Field | Type | Null | Key | Default | Extra | +-+--+--+-+-++ | vik_ID | int(10) unsigned | | PRI | 0 | auto_increment | | vikname | varchar(255) | | | || +-+--+--+-+-++ And here is a demonstration of the behavior. It is pretty weird: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 22 to server version: 3.22.32 Type 'help' for help. mysql select * from Vik; ++-+ | vik_ID | vikname | ++-+ | 1 | Da man | | 2 | Da sow | ++-+ 2 rows in set (0.01 sec) mysql delete from Vik where vik_ID=2; Query OK, 1 row affected (0.00 sec) mysql select * from Vik; ++-+ | vik_ID | vikname | ++-+ | 1 | Da man | ++-+ 1 row in set (0.00 sec) mysql insert into Vik (vikname) VALUES ('George'); Query OK, 1 row affected (0.00 sec) mysql select * from Vik; ++-+ | vik_ID | vikname | ++-+ | 1 | Da man | | 2 | George | ++-+ 2 rows in set (0.00 sec) mysql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - 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: Binary data
hi I am pretty new at this and would like to know how does one store a binary blob to the mysql DB ie I would like to store a jpeg to the db http://www.bitbybit.dk/mysqlfaq/faq.html#ch7_13_0 http://www.bitbybit.dk/mysqlfaq/faq.html#ch14_1_0 / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq - 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
table history or tracabitity
Hi all ! I have a problem : I have a table "my_table". desc my_table : FieldType NullKeyDefaultExtra mytable_sidint(11) auto_increment value double (6.2) this is the table sturcture 2 weeks ago Today the table structure is this one : FieldType NullKeyDefaultExtra mytable_sidint(11) auto_increment value int(11) I would like to know when the fields value has been changed and by wich user ? Does it exist a trace or an history of the tables in mysql database ? If yes, how do do it ? regards jv
MySQL On Windows2000
I have installed MySQL (MySQL-Shareware-3.22_34-WIN) on Windows 9X, and everything is working properly. And I have just tried to install it on Windows2000. The installation run without error. But when I try to up the server by typing mysqld, the server don't up. Can't MySQL server run on Win2000? - 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
resolve_stack_dump
first was an error message in log file ... mysqld got signal 11; The manual section 'Debugging a MySQL server' tells you how to use a stack trace and/or the core file to produce a readable backtrace that may help in finding out why mysqld died Attemping backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong stack range sanity check, ok, backtrace follows 0x2ab204d7 0x812ca95 0x812d595 0x81330a2 0x8133145 0x8133145 0x8133145 0x8133d50 0x8132de3 0x8106d55 0x80ec485 0x80ebd8d 0x80c5163 0x80c811a 0x80c321a 0x80c2797 stack trace successful as in documentation I've done # resolve_stack_dump -s mysql.sym -n last.stack and this is an answer .. does anybody have an idea what can I do with this ? db:/raid # resolve_stack_dump -s mysql.sym -n last.stack 0x2ab204d7 _end + 580057983 0x812ca95 _nisam_key_cmp + 1337 0x812d595 _nisam_bin_search + 137 0x81330a2 w_search + 190 0x8133145 w_search + 353 0x8133145 w_search + 353 0x8133145 w_search + 353 0x8133d50 _nisam_ck_write + 60 0x8132de3 nisam_write + 243 0x8106d55 write_row__7ha_isamPc + 101 0x80ec485 write_record__FP8st_tableP12st_copy_info + 501 0x80ebd8d mysql_insert__FP3THDP13st_table_listRt4List1Z4ItemRt4List1Zt4List1Z4Item15enum_duplicates13thr_lock_type + 1077 0x80c5163 mysql_execute_command__Fv + 5403 0x80c811a mysql_parse__FP3THDPcUi + 206 0x80c321a do_command__FP3THD + 1278 0x80c2797 handle_one_connection__FPv + 679 Jan Matis - 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: AND on a many to many table, with arbitrary ANDs
I think you could use 'WHERE catid IN' For example, on PHP $catlist="1,2,3,4,5"; ... select ... where ... catid in ($catlist) And of course you should use category id in web form instead category name. - Original Message - From: Beasley, Julien [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 7:50 AM Subject: AND on a many to many table, with arbitrary ANDs Hello everyone, I am in the process of building a search engine on a database. I have two tables that have a many-to-many relationship: A story table and a category table. Story Table: --- id | story| --- 1 | Alice in Wonderland 2 | Peter Pan 3 | Pokemon's adventure 4 | Tale of Two cities 5 | War and Peace ..etc.. Category Table: -- id | category| -- 1 | Children 2 | Classics 3 | Tolstoy ..etc.. ` Storycategories Table: -- storyid | catid | - 1 | 1 1 | 2 2 | 1 2 | 2 3 | 1 4 | 2 5 | 2 5 | 3 ..etc.. From my (admittedly dim) understanding of SQL, this is how one is supposed to organize a many-to-many relationship. So peter pan is listed as 1 (childrens) and 2 (classics). I am writing a web interface to do searches for stories. In my web interface, you have something like this: --- []Classics []Childrens []Tolstoy []Fiction ... Search Categories: (x) match all categories ( ) match any category --- In order to build a query that matches ALL categories, I use aliasing. To do a search on stories that are Children AND Classics, I make two instances of each table as shown in the example below. select S.story from stories_tbl S, categories_tbl C1, storycategories_tbl O1, categories_tbl C2, storycategories_tbl O2 where S.id = O1.storyid and O1.catid = C1.id and C1.category like "Children" and S.id = O2.storyid and O2.catid = C2.id and C2.category like "Classic" group by story This query works fine. My problem arises when I have many categories to choose from. If I check many of the categories boxes, and select match all categories, my program builds a query with a large amount of tables, I get an error like this: Error 1116: Too many tables. MySQL can only use 32 tables in a join My guess is that there is a limit of 32 tables in a join, and that my use of aliasing here ends up violating the 32 table limit. Even worse is when I make a query that has a little less than 32 tables. This won't give an error, but will leave a process running on the machine that consumes 100% cpu. After a while, this process will render the database unusable, and no one can use the database until the process is killed! So to clarify, the query that ends up being built looks like this: select S.story from stories_tbl S, categories_tbl C1, storycategories_tbl O1, categories_tbl C2, storycategories_tbl O2 categories_tbl Cn, storycategories_tbl On where S.id = O1.storyid and O1.catid = C1.id and C1.category like "Children" and S.id = O2.storyid and O2.catid = C2.id and C2.category like "Classic" ... S.id = On.storyid and On.catid = Cn.id and Cn.category like "" group by story This query fails when "n" is around 16. My question is, how can I build a query that will support an arbitrary number of ANDs on a many to many relationship? I'd like to be able to do a search on stories that are "Children AND Classics AND Tolstoy AND Category N" where N is fairly large (hundred or so).. Is there any way to do this? Am I using aliasing incorrectly? Those of you that have made it in reading this far, thank you :). I appreciate your attention and any assistance you might lend me in this matter. Julien Beasley - 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
resolve_stack_dump once more again
stack 0x2ab204d7 0x2aba4017 0x2aba3744 0x815ae9f 0x80b8fb3 0x80bec45 0x80be385 0x2ab60213 0x8089f41 db:/raid # resolve_stack_dump -s mysql.sym -n stack 0x2ab204d7 _end + 580057983 0x2aba4017 _end + 580597439 0x2aba3744 _end + 580595180 0x815ae9f my_malloc + 31 0x80b8fb3 vio_new + 27 0x80bec45 handle_connections_sockets__FPv + 917 0x80be385 main + 2657 0x2ab60213 _end + 580319419 0x8089f41 _start + 33 and there is too often something like New value of ebp failed sanity check terminating backtrace Number of processes running now: 0 010131 11:15:33 mysqld restarted /opt/mysql-3.23.32/libexec/mysqld: ready for connections any hints what can I do ? Jan Matis - 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: Backup?
While on the subject of backup scripts - Someone had asked on a message board for my webhost about whether a script existed for backing up a MySQL database, and, rotating backups. I couldn't find anything that did everything that he asked, so I wrote something myself. It's written in Perl and uses mysqldump since the person didn't have a shell account, much less root, on the MySQL server. It's not the greatest example of Perl programming, and it's only written to backup a single database, but hey, I didn't spend more than 2 hours on it. I've used it myself on some of my databases for the past 5 months with no problems. I just never got around to tweaking it... I have to get out of the habit of treating these sorts of things as trivial. Here is the script - http://www.trickortreat.org/mysql_backup.txt Basic usage - create a directory for the database backups, edit some variables in the script and create a cron job. And here is an example of a crontab file for using the script - http://www.trickortreat.org/mysql_backup_cron.txt Mike Willey [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: Mysqld eats up RAM and CPU
Hi Jan, your problems may OR may not be resolved by upgrading your Linux(?) system to kernel 2.4x, glibc2.2x and MySql to 2.32.30. I haven't been able to get a confirmation from the MySQL people that this actualy solves the problem - it is however clear that it is the dual CPUs that are causing the problems(for me anyway). I saw someone one the list that solved his problems by upgrading the BIOS on the RAID controller...I've tried this and it made noe difference for me. Now that kernel 2.4.1 has arrived I may be able to do the upgrade myself (there was some unresolved problems with INTEL pro100 ethernet cards).. /rune On Tue, 30 Jan 2001, Matis, Jan wrote: what about this ? 2*PII 450 MHZ 1G RAM data on hardware raid port= 3306 socket = /tmp/mysql.sock user= mysql skip-locking set-variable= key_buffer=16M set-variable= max_allowed_packet=1M set-variable= thread_stack=128K set-variable= wait_timeout=150 set-variable= max_connections=768 set-variable = record_buffer=12k set-variable = net_buffer_length=12k set-variable = sort_buffer=12k set-variable = table_cache=12 I've never had more than 512 conections ... but sometimes mysql looks really slow ... ant load goes up to 40 do U have some ideas ? Jan - 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 -- Rune Hansen [EMAIL PROTECTED] Viventus AS Liaveien 11, 1411 Kolbotn +4766812280/86 "It's a damn poor mind that can only think of one way to spell a word." --Andrew Jackson - 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
Choice of BLOB or store in a directory
I would much appreciate to hear from experienced mySQL practitioners on the following: I have a large relation in mind (strictly fixed length for performance) with potentially 1-3 million entries. Associated with each of these rows i have a variable number of blobs. I would not consider storing them in the table itself for obvious performance and other reasons but i have choices and i would like all your opinions on them : A) Would you store them in a single relation? B) Because of max table size would you consider one table for each possible kind of blob? C) Consider storing them as files in directories? D) If recommending (A/B) which table type is recommended? In particular has anyone experience on the choice between (B) (C) on performance grounds? e.g. how does directory search compare to an index in mySQL? Regards, Dave. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: AND on a many to many table, with arbitrary ANDs
I don't think that solves his problem, since he wants to know AND, not OR... the closest thing I could get to was using select into... although it seems like it might be possible with a left join, i just can't figure out how. one of the things that I thought of with select into was to select count and the story name from the story,category, and storycategories join on their respective ids, then used IN ('Classics','Childrens') and grouped by story, yielding something like: Peter Pan | 2 Alice in Wonderland | 2 Pokemon | 1 War and Peace | 1 Tale of Two Cities | 1 then selecting from that subset for count = 2; if anyone can think of a way to do it with left joins, or a way to do it without select into, i'd be very curious to see the solution :0 cheers, Javier -Original Message- From: Rus [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 2:11 AM To: [EMAIL PROTECTED] Subject: Re: AND on a many to many table, with arbitrary ANDs I think you could use 'WHERE catid IN' For example, on PHP $catlist="1,2,3,4,5"; ... select ... where ... catid in ($catlist) And of course you should use category id in web form instead category name. - Original Message - From: Beasley, Julien [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 7:50 AM Subject: AND on a many to many table, with arbitrary ANDs Hello everyone, I am in the process of building a search engine on a database. I have two tables that have a many-to-many relationship: A story table and a category table. Story Table: --- id | story| --- 1 | Alice in Wonderland 2 | Peter Pan 3 | Pokemon's adventure 4 | Tale of Two cities 5 | War and Peace ..etc.. Category Table: -- id | category| -- 1 | Children 2 | Classics 3 | Tolstoy ..etc.. ` Storycategories Table: -- storyid | catid | - 1 | 1 1 | 2 2 | 1 2 | 2 3 | 1 4 | 2 5 | 2 5 | 3 ..etc.. From my (admittedly dim) understanding of SQL, this is how one is supposed to organize a many-to-many relationship. So peter pan is listed as 1 (childrens) and 2 (classics). I am writing a web interface to do searches for stories. In my web interface, you have something like this: --- []Classics []Childrens []Tolstoy []Fiction ... Search Categories: (x) match all categories ( ) match any category --- In order to build a query that matches ALL categories, I use aliasing. To do a search on stories that are Children AND Classics, I make two instances of each table as shown in the example below. select S.story from stories_tbl S, categories_tbl C1, storycategories_tbl O1, categories_tbl C2, storycategories_tbl O2 where S.id = O1.storyid and O1.catid = C1.id and C1.category like "Children" and S.id = O2.storyid and O2.catid = C2.id and C2.category like "Classic" group by story This query works fine. My problem arises when I have many categories to choose from. If I check many of the categories boxes, and select match all categories, my program builds a query with a large amount of tables, I get an error like this: Error 1116: Too many tables. MySQL can only use 32 tables in a join My guess is that there is a limit of 32 tables in a join, and that my use of aliasing here ends up violating the 32 table limit. Even worse is when I make a query that has a little less than 32 tables. This won't give an error, but will leave a process running on the machine that consumes 100% cpu. After a while, this process will render the database unusable, and no one can use the database until the process is killed! So to clarify, the query that ends up being built looks like this: select S.story from stories_tbl S, categories_tbl C1, storycategories_tbl O1, categories_tbl C2, storycategories_tbl O2 categories_tbl Cn, storycategories_tbl On where S.id = O1.storyid and O1.catid = C1.id and C1.category like "Children" and S.id = O2.storyid and O2.catid = C2.id and C2.category like "Classic" ... S.id = On.storyid and On.catid = Cn.id and Cn.category like "" group by story This query fails when "n" is around 16. My question is, how can I build a query that will support an arbitrary number of ANDs on a many to many relationship? I'd like to be able to do a search on stories that are "Children AND Classics AND Tolstoy AND Category N" where N is fairly large (hundred or so).. Is there any way to do this? Am I using aliasing incorrectly? Those of you that have made it in reading this far, thank you :). I appreciate your attention and any assistance
MYODBC E_FAIL DELPHI
Hello all, I am using Delphi 5 + MyODBC (ADO) I have a TADOQuery connected to the ODBC data source. This is my SQL string : SELECT tnCUSTOMERS.fnADDRESS1, tnCUSTOMERS.fnADDRESS2, tnCUSTOMERS.fnPSC, tnCUSTOMERS.fnCOMPANY, tnCUSTOMERS.fnICO, tnCUSTOMERS.fnDIC, tnINVOICES.fnDATUM_SPLATNOSTI, tnINVOICES.fnFAKTURA_CISLO, tnINVOICES.fnCASTKA, tnINVOICES.fnDPH, tnINVOICES.fnKONSTANTNI, tnINVOICES.fnINTERNI, tnINVOICES.fnPAID, tnINVOICES.fnDATE_PAID FROM tnINVOICES INNER JOIN tnCUSTOMERS ON tnINVOICES.fnCUSTOMER_CODE = tnCUSTOMERS.fnINDEX WHERE tnINVOICES.fnPAID = 0 When I ADOQuery.Open and I DO NOT have any visual controls connected via a DATASOURCE all is okay. When I attach a datasource and a datagrid, I then get an E_FAIL error. In my SQL statement I return the fields that of of datetime (MySQL datatypes). If I remove all reference to these three fields then all is okay. My question is how can I return date or datetime to my Delphi app and display it in a control. Kind regards Phil curtis --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.228 / Virus Database: 109 - Release Date: 17-01-2001 - 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
Limitation of database size
Hello, I have the problem: There is server with directory size quotes for users and user's access to his own MySQL database. Problem: every user can use unlimited disc space by creating objects in his database. How can i limit size of each database? I think, it's very useful thing, but i haven't found any solution. Please, help! Denis Osadchy. [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
Mysqld does not stay running
Description: Mysqld does not stay running - safe_mysqld produces this output on the console: Starting mysqld daemon with databases from /var/lib/mysql 010128 20:09:46 mysqld ended from the log file: 010128 20:09:46 mysqld started 010128 20:09:46 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 010128 20:09:46 mysqld ended The path to host.frm is: /var/lib/mysql/mysql/host.frm How-To-Repeat: run safe_mysqld Fix: Get it to point to the right place, but I have not been able to Submitter-Id: Wayne Renshaw Originator: root Organization: Independent MySQL support: none Synopsis: Using latest Red Hat RPM - maybe that is the problem !! Severity: It is keeping me from using MySQL! Priority: medium - { This is probably a dead easy one } Category: mysql Class: support Release: mysql-3.23.29-gamma (Source distribution) Environment: HP Pavilion 6635, Red Hat 7 machine, os, target, libraries (multiple lines) System: Linux redcat.wolf 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 2731 (Red Hat Linux 7.0) Compilation info: CC='gcc' CFLAGS='-O2 -march=i386 -mcpu=i686' CXX='c++' CXXFLAGS='-O2 -march=i386 -mcpu=i686' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 11 Dec 5 22:56 /lib/libc.so.6 - libc-2.2.so -rwxr-xr-x1 root root 4825002 Nov 19 10:53 /lib/libc-2.2.so -rw-r--r--1 root root 22607104 Aug 30 18:15 /usr/lib/libc.a -rw-r--r--1 root root 178 Aug 30 18:15 /usr/lib/libc.so Configure command: ./configure i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --without-debug --without-readline --enable-shared --with-extra-charsets=complex --without-bench --localstatedir=/var/lib/mysql --with-unix-socket-path=/var/lib/mysql/mysql.sock --with-mysqld-user=mysql --with-extra-charsets=all - 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: Finding the 'field names'
hi Jamie I' not too sure about the fields for the tables but I think a better way to implement this is to seperate the items from the options hence you have three tables instead of one,ie table 1 *product_id, (other product fields) table 2 *option_id, name, value, ...(whatever you need) table 3 *+product_id, *+option_id Explanation: Table 1 is used to hold data about the product, ie data that is relevant to the product only. table 2 is used to keep track of the various options that you require. Table 3 will be used to link the product to an option. This way you can alter your options,add or delete, without changing your tables all the time, remember to to try and keep only unique data in a table otherwise you end up duplicating things. Also maintenance becomes a pain(my opinion) regards Barry -Original Message- From: Jamie [mailto:[EMAIL PROTECTED]] Sent: 31 January 2001 02:25 To: Mysql@Lists. Mysql. Com Subject: Finding the 'field names' I was wondering what the SQL command is to find the filed names of a database once it has been created. I'm trrying to write a script that will allow 'options' table to be created where there is an ID fiield for the product then fields representing each of the avalible options eg red blue green which are going to be a boolean variable. I'm hopeing that this is the best way tyo do this as each product can have multiple options and there may even be more option fields added at a later date (which is why I need to be able to find them) My table design: ___ | Product_ID | Red | Blue | Green | Yellow | A4 | A5 | |--||-|--|---|--|--| |_12345678_|__+__|_|__+__|__+___||| |_75487345_|_|__+__|___+_|__|_+__|__+_| |_43657322_|_|_|_|__||| |_12355578_|__+__|_|__+__|__+___||| |_66635678_|_|__+__|__+__|__+___|_+__|| - 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: one error when I run the Mysql++ sample
Hensen Yi writes: I got a error when I run the sample file of Mysql++ , the file is simple1.cc I compile use below command: g++ -g -o mysimple simple1.cc /usr/lib/libsqlplus.so -L/usr/lib/mysql -I/usr/include/mysql/ -lmysqlclient -lnsl -lz -crypt -lsocket -lm and I did not got any erro in compile and link, however when I run mysimple I got error: Error: Can't connect to local MySQL server through socket '/temp/mysql.sock'(111). So could you help to slove my problem? Thank you very much Hensen Hi! You have to eiether change the source or create /etc/my.cnf where you would define socket file in the [client] options header, as described in our manual. Regards, Sinisa __ _ _ ___ == MySQL AB /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic /*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED] /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus /*/ /*/ /*/\*\_/*/ \*\_/*/ |*| /*/^^^\*\^^^ /*/ \*\Developers Team - 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
MyODBC can't initialize character set problem ...
Hi I'm trying to compile to MySQL latin2 sorting and cp1250_latin2 character set conversion. I've compiled mysql-3.23.31 with these configure options: --without-debug \ --without-readline \ --enable-shared \ --with-extra-charsets=complex \ --without-bench \ --localstatedir=/var/lib/mysql \ --with-unix-socket-path=/var/lib/mysql/mysql.sock \ --with-mysqld-user="mysql" \ --with-extra-charsets=all \ --with-charset=latin2 I #define DEFINE_ALL_CHARACTER_SETS in convert.cc. I connect to the server with MyODBC 2.50.36 and I get error: -- [TCX] [MyODBC] Can't initialize character set 9 (path: c:\mysql\share\charsets) (#2019) -- and I can't connect - of course. There is no directory c:\mysql in default MyODBC Win95 installation ... What am I doing wrong ? -- Bartlomiej Czardybon, Dzial obslugi serwerow PIK-Net Sieci Rozlegle Toszecka 102, Gliwice Poland, +48 32 338-33-00 czar AT pik-net.pl - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Selecting games which a given user can join
Hi there! I'm new to SQL and I can't figure out a query which would give me the result I need. What I want to do is this: I have table that stores names of players and number of the game they play (one player can play more games concurrently). Other users can join the game. For given user I want to display the games which he can join. The only condition is that the user can't join any game which he already plays. If I have this +-+-+ | gid | user| +-+-+ | 1 | jack| | 1 | john| | 1 | peter | | 1 | richard | | 2 | john| | 2 | richard | | 3 | peter | | 4 | jack| | 4 | peter | | 5 | peter | | 5 | john| +-+-+ then for jack I want numbers 2, 3, 5 but not 4; for peter it should be 2 and no other. I'll appreciate your advice! zbynek - 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
newbie Q: MySQL and EJB
I am new to EJB, so it may be a stupid one, but: Can MySQL be used for CMP or the database has to suport transactions? Thanks, laszlo - 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 select the 10 last items from a table?
Try sorting in DESCending order. SELECT * FROM item ORDER BY id DESC LIMIT 10; -Tilghman -- "There cannot be a crisis today. My schedule is already full." --Henry Kissinger -Original Message- From: Remco van den Berg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 17:29 On Tue, Jan 30, 2001 at 11:48:22PM +0300, Rus wrote: May be it could work SELECT * FROM item ORDER BY ID LIMIT count(*)-10,10 mysql SELECT id FROM lid ORDER BY ID LIMIT count(*)-10,10; ERROR 1064: You have an error in your SQL syntax near 'count(*)-10,10' at line 1 or SELECT * FROM SELECT * FROM item ORDER BY ID DESC LIMIT 10 ORDER BY ID mysql select * from select * from lid order by id DESC limit 10 order by id; ERROR 1064: You have an error in your SQL syntax near 'select * from lid order by id DESC limit 10 order by id' at line 1 I think you have to make use of at least two queries. One to get MAX(id) and one for the actual query: mysql select MAX(id) from lid; +-+ | MAX(id) | +-+ | 489 | +-+ 1 row in set (0.00 sec) mysql select id from lid order by id limit 479,10; But that only works when all id's up to the last one exist. If you delete records from the table calculating 479 by substracting 10 from MAX(id) doesn't work. So, the only solution left, I can think of, is to make use of an temporary table (in memory) to store the results of your query which are in the wrong order. And then query the temporary table to get right order. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SQL: row-to-column-conversion in 1 query
Hi there, I really get nuts Macromedia Generator needs COLUMNS to create a chart. But data to be visualized is stored in one ROW (whole record). Therefore I need a SQL- query which generates one column out of one row like: my wish:my source: ++ | capt. | ++... | 10|+---+---+---+ ++- SQL- query - | 10| 20| 30|... | 20|+---+---+---+ ++... | 30| ++ ... Every help is appreciated - otherwhise I really will fell the pain.. Thanks in advance Leo - 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 select the 10 last items from a table?
On Wed, Jan 31, 2001 at 08:00:23AM -0600, The Tilghman wrote: Try sorting in DESCending order. SELECT * FROM item ORDER BY id DESC LIMIT 10; -Tilghman People, Thanks for all the answers, but the question was: "How to get the last 10 items in incrementing order." Please read thread before answering. -Remco - 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: Running two Makes
%% "Evan James Dembskey" [EMAIL PROTECTED] writes: ejd I believe that MySQL needs to be compiled with GNU make. I have ejd to install MySQL on a Dec Alpha running Digital UNIX V4.0D ejd (Rev. 878). There are a number of apps running on the Dec that ejd require the native make to work. So - is it possible to install ejd Gnu make onto teh Dec in a way that it does not interfere at all ejd with the rest of the system? If so, how do I do it? Easy. Check the INSTALL file that comes with GNU make. You can configure it to (a) install in different directories, (b) install with different names (often people install it as "gmake" rather than just "make"), or (c) both. Also, make is a simple program; you can just rename it after you install it if you don't want to bother with the ./configure options. It won't hurt anything to do that. -- --- Paul D. Smith [EMAIL PROTECTED] Find some GNU make tips at: http://www.gnu.org http://www.paulandlesley.org/gmake/ "Please remain calm...I may be mad, but I am a professional." --Mad Scientist - 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 select the 10 last items from a table?
Remco van den Berg wrote: On Wed, Jan 31, 2001 at 08:00:23AM -0600, The Tilghman wrote: Try sorting in DESCending order. SELECT * FROM item ORDER BY id DESC LIMIT 10; -Tilghman People, Thanks for all the answers, but the question was: "How to get the last 10 items in incrementing order." Please read thread before answering. -Remco I've been reading the thread. You were told how to get the last 10 records. That is the only way to get them. Unfortunately, that means they will be in reverse order. You must be reading them into an array somewhere, so you can easily access them in either order once you have stored them. - 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: MyODBC can't initialize character set problem ...
On Wed, Jan 31, 2001 at 02:25:14PM +0100, Bartlomiej Czardybon wrote: -- [TCX] [MyODBC] Can't initialize character set 9 (path: c:\mysql\share\charsets) (#2019) -- There is no directory c:\mysql in default MyODBC Win95 installation ... In MyODBC Readme file there is a sentence: --- Some common problems: [cut] - If you are connecting to a server with a character set that isn't compiled into the MySQL client library (the defaults are: latin1 big5 czech euc_kr gb2312 gbk sjis tis620 ujis ) then you need to install the mysql character definitions from the charsets directory into the c:\mysql\share\charsets. --- What does the author mean by 'you need to install the mysql character definitions fro the charsets directory into the c:\mysql\share\charsets ? I've just done it (copied 'charsets' directory from unix server path: /usr/share/mysql/charsets) but it still does not work ... :( TIA for any help, -- Bartlomiej Czardybon PIK-Net Sieci Rozlegle e-mail: czar AT pik-net.pl BC374-RIPE - 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 select the 10 last items from a table?
I think the only way to do it is first get the amount of items: SELECT COUNT(*) FROM item; if you use PHP, store the count in a variable called $count. subtract 10 from count: $limit = 10; if($count $limit) { $limit = $count; } $count = $count - 10; if($count 0) { $count = 0; } then do the following: SELECT * FROM item ORDER BY id LIMIT $count,$limit; Tim Samshuijzen At 09:03 31-1-2001 -0600, you wrote: Remco van den Berg wrote: On Wed, Jan 31, 2001 at 08:00:23AM -0600, The Tilghman wrote: Try sorting in DESCending order. SELECT * FROM item ORDER BY id DESC LIMIT 10; -Tilghman People, Thanks for all the answers, but the question was: "How to get the last 10 items in incrementing order." Please read thread before answering. -Remco I've been reading the thread. You were told how to get the last 10 records. That is the only way to get them. Unfortunately, that means they will be in reverse order. You must be reading them into an array somewhere, so you can easily access them in either order once you have stored them. - 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: wait_timeout?
On Wed, 31 Jan 2001, Andrew Benham wrote: I'm glad it's not just me. I have 2 v3.22.32 servers running under HP-UX 10.20 Both servers are being used by FCGI processes on the web with persistant connections to the database servers. Ok, I'll join in on this. I have servers running Slackware 7.1 with v3.22.28-gamma servers (yes, I'll upgrade), and I had to let persistent connections go because of this. It seems, things are extremely sluggish as soon as I reach 100+ connections (and this is a dual PIII/700 with 1Gb RAM and my-huge.cnf) and the connections tend to stay around. Good luck with hunting it down, thou' :-) Regards, Jan-Aage -- Mr. Jan-Aage Bruvoll Managing Director Bruvoll Brains in Bits, 7a Neal's Yard, London WC2H 9DP, UK Office: +442072408283 Cell: +4792492482 Fax: +4792571158 - 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 select the 10 last items from a table?
This works: select * from db.table A, db.table B WHERE A.id=B.id order by B.id,A.id desc limit 10; regards rene - Original Message - From: "Remco van den Berg" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 3:15 PM Subject: Re: How to select the 10 last items from a table? On Wed, Jan 31, 2001 at 08:00:23AM -0600, The Tilghman wrote: Try sorting in DESCending order. SELECT * FROM item ORDER BY id DESC LIMIT 10; -Tilghman People, Thanks for all the answers, but the question was: "How to get the last 10 items in incrementing order." Please read thread before answering. -Remco - 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: mysql_fetch_row blocks my computer...
That syntax seems correct. Make sure you have defined Row as: MYSQL_ROW Row; Yes this is a structure, not a pointer. and that result is defined as MYSQL_RES *result; Yes it is a pointer. printf("\n\t%u %4s",j,Row); ---YOUR problem seems to be here! change Row to Row[0] and see if that works! This is sure, this line is wrong and must be Row[#], but the programs does not reach to this line, it hangs before in the "mysql_fetch_row(result)" line... I have updated to the latest mysql and recompiled it, and now works ok, so there was a bug in compilation of the old mysql or a bug of the library... Thanks for your help. -- Gonzalo Aguilar. Madrid, Espaa (Spain) | Reymad Studios | [EMAIL PROTECTED] | Privado| [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
Please help!
Someone please help me. This query has always worked until now, now all of a sudden I get a weird error: SELECT DISTINCT(signup_date), COUNT(*) AS count, CONCAT(SUBSTRING(MONTHNAME(signup_date),1,3), ' ', DAYOFMONTH(signup_date), ', ', YEAR(signup_date)) AS signup_date_display FROM members GROUP BY signup_date ORDER BY signup_date DESC; ERROR 1030: Got error 127 from table handler Does anyone know what could be wrong? - 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
Lasso for SQL/Linux
I've noted that Lassolite is available for MySql on Linux. I'd like to know if anyone knows about when a full Lasso version for Linux/SQL will be available for purchase. /Peter - 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
Second email asking for assistance!
I sent this email two days ago and haven't heard from anyone Date: Mon, 29 Jan 2001 14:51:30 -0500 To: [EMAIL PROTECTED] From: Sanam Azeem [EMAIL PROTECTED] Subject: Error during make... Hello, We're installing Mysql source mysql-3.23.8-alpha on AIX 4.3.3.0. We were able to run configure without a problem but have problem once make is run, we receive the following errors: "net.c", line 109.9: 1506-045 (S) Undeclared Identifier net. "net.c", line 114.18: 1506-045 (S) Undeclared Identifier nettype. "net.c", line 118.11: 1506-045 (S) Undeclared Identifier fd. make: The error code from the last command is 1. Stop. make: The error code from the last command is 1. Stop. make: The error code fromt the last command is 2. Stop. Kindly assist us with this at your earliest convenience, we would like to proceed with the installation ASAP. Thank you for your help in advance. Sanam Azeem (212) 678-5636 - 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: Running two Makes
"EJD" == Evan James Dembskey [EMAIL PROTECTED] writes: EJD is it possible to install Gnu make onto teh Dec in a way that it does not EJD interfere at all with the rest of the system? If so, how do I do it? When you install gnu make, call it "gmake". Then run "gmake" when you need it. - 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: Second email asking for assistance!
I don't know if this is a solution, but you could try using the latest stable source code 3.23.32 and see if it fixed the problem. We're installing Mysql source mysql-3.23.8-alpha on AIX 4.3.3.0. We were able to run configure without a problem but have problem once make is run, we receive the following errors: - 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: myODBC time problems in Access
I'm trying to remember... yes I did have that problem. It's fixed now. I think you just need to have a primary key that is auto_incremented and the newest MyODBC. At 06:49 PM 1/30/2001 -0800, Gregory King wrote: Im trying to use myodbc to enter some data through MS access. The problem is, when I link to the table it shows the data in my data formatted fields all messed up. The data in the mysql table is fine, it is something the odbc driver or access is doing. I read on the Egroup that Scott Baker was having a simular problem in September, but I didnt see any responses to his request for help. - Scott Baker - Webster Internet - Network Technician 503.266.8253 - [EMAIL PROTECTED] "Children today are tyrants. They contradict their parents, gobble their food, and tyrannize their teachers." - Socrates - 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-3.23.32/client/mysql.cc
Hello! On a Sun with SunOS ai001273 5.6 Generic_105181-13 sun4u sparc SUNW,Ultra-30 I configured ./configure --prefix=/opt/ZITP7.33 --enable-shared --with-pthread --with-low-memory --enable-assembler --enable-thread-safe-client --with-mysqld-user=www --without-readline --with-extra-charsets=german1 --with-berkeley-db-includes=/opt/ZITP7.33/include with envvars from setenv CC gcc setenv CFLAGS "-Wa,-xarch=v8plusa -O6 -mcpu=v9 -mtune=ultrasparc" setenv CXX gcc setenv CXXFLAGS "-Wa,-xarch=v8plusa -O6 -mcpu=v9 -mtune=ultrasparc -felide-constructors -fno-exceptions -fno-rtti" compilation stops with: gmake[2]: Entering directory `/opt/www/Diele/mysql-3.23.32/client' gcc -DUNDEF_THREADS_HACK -I./../include -I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -Wa,-xarch=v8plusa -O6 -mcpu=v9 -mtune=ultrasparc -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -DHAVE_RWLOCK_T -c mysql.cc mysql.cc: In function `int com_status(String *, char *)': mysql.cc:2190: integer constant out of range mysql.cc:2190: warning: decimal integer constant is so large that it is unsigned gmake[2]: *** [mysql.o] Error 1 gmake[2]: Target `all' not remade because of errors. gmake[2]: Leaving directory `/opt/www/Diele/mysql-3.23.32/client' 2182 2183 if ((status=mysql_stat(mysql)) !mysql_error(mysql)[0]) 2184 { 2185char *pos,buff[40]; 2186ulong sec; 2187pos=strchr(status,' '); 2188*pos++=0; 2189tee_fprintf(stdout, "%s\t\t\t", status);/* print label */ 2190if ((status=str2int(pos,10,0,LONG_MAX,(long*) sec))) 2191{ 2192 nice_time((double) sec,buff,0); 2193 tee_puts(buff, stdout); /* print nice time */ 2194 while (*status == ' ') status++; /* to next info */ 2195} 2196if (status) 2197{ 2198 tee_putc('\n', stdout); 2199 tee_puts(status, stdout); 2200} 2201 } During compilation of mysql-3.23.32/client/mysql.cc these actual def's are valid: gcc -DUNDEF_THREADS_HACK -I./../include -I../include -I./.. -I.. -DDBUG_OFF -Wa,-xarch=v8plusa -O6 -mcpu=v9 -mtune=ultrasparc -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -DHAVE_RWLOCK_T -c mysql.cc -E -dD -v -o mysql.ccp Reading specs from /appl/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs gcc version 2.95.2 19991024 (release) /appl/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/cpp -lang-c++ -v -I./../include -I../include -I./.. -I.. -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__OPTIMIZE__ -dD -D__sparc_v9__ -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) -DUNDEF_THREADS_HACK -DDBUG_OFF -DHAVE_RWLOCK_T mysql.cc -o mysql.ccpo GNU CPP version 2.95.2 19991024 (release) (sparc) Solaris' /usr/include/limits.h do correctly: #define LONG_MIN(-2147483647L-1L) #define LONG_MAX2147483647L #define ULONG_MAX 4294967295UL #define LLONG_MIN (-9223372036854775807LL-1LL) #define LLONG_MAX 9223372036854775807LL #define ULLONG_MAX 18446744073709551615ULL but then gcc's /appl/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/include/limits.h are included: #define __LONG_MAX__ 9223372036854775807L #define LONG_MIN (-LONG_MAX-1) #define LONG_MAX __LONG_MAX__ #define ULONG_MAX (LONG_MAX * 2UL + 1) #define __LONG_LONG_MAX__ 9223372036854775807LL #define LONG_LONG_MIN (-LONG_LONG_MAX-1) #define LONG_LONG_MAX __LONG_LONG_MAX__ #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1) and finally mySQL's ../include/global.h: #define HAVE_LONG_LONG 1 #define LONGLONG_MIN((long long) 0x8000LL) #define LONGLONG_MAX((long long) 0x7FFFLL) and finally gcc sees line #2190 as: if ((status=str2int(pos,10,0,9223372036854775807L ,(long*) sec))) Gcc's /appl/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/include/limits.h reads: 76 /* Minimum and maximum values a `signed long int' can hold. 77 (Same as `int'). */ 78 #ifndef __LONG_MAX__ 79 #if defined (__alpha__) || defined (__sparc_v9__) || defined (__sparcv9) 80 #define __LONG_MAX__ 9223372036854775807L 81 #else 82 #define __LONG_MAX__ 2147483647L 83 #endif /* __alpha__ || sparc64 */ 84 #endif 85 #undef LONG_MIN 86 #define LONG_MIN (-LONG_MAX-1) 87 #undef LONG_MAX 88 #define LONG_MAX __LONG_MAX__ 89 90 /* Maximum value an `unsigned long int' can hold. (Minimum is 0). */ 91 #undef ULONG_MAX 92 #define ULONG_MAX
MySql - JSP - Please help
I am running mySql 3.23.32 on Redhat 7, with Apaache and Tomcat Jakarta 3.2.1 and for database connection i use mm.mysql.jdbc-1.2c Here is my problem I have got MySql to run fine but when i try to interfaec it over the web i get te follwoing error error 500 javax.servlet.ServletException: Server configuration denies access to data source The jsp page it self has code that is as follows %@ page language="java" import="java.sql.*" % html code here % Class.forName("org.gjt.mm.mysql.Driver"); Connection myConn = DriverManager.getConnection("jdbc:mysql:///test_db1?user=Usernamepassword=password"); Statement stmt = myConn.createStatement(); ResultSet myResultSet = stmt.executeQuery("select * from test_tb1"); Is the a problem with mySql user permissions, or tomcat, or JDBC driver or what else. All help is greatelly appreciated! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Binary data
If your using PHP there is an article here on doing it with PHP3, it works on 4 as well. HTH http://www.phpbuilder.com/columns/florian19991014.php3 Dave W. -Original Message- From: Barry Radloff [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 10:56 PM To: '[EMAIL PROTECTED]' Subject:Binary data hi I am pretty new at this and would like to know how does one store a binary blob to the mysql DB ie I would like to store a jpeg to the db Thanks Barry Radloff RD Media24 - 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
Excel-MySQL
Not sure if this was ever asked, but I'm fighting a dilemma over here and the answer to this greatly affects what I'll end up doing: I know I can PULL FROM an MySQL database (sitting on a Limix box) INTO MS Excel. And that works great. However, I'm looking for a way to go the other way around, FROM Excel TO MySQL. Upper Management has a lot of data (mainly price sheets) written in Excel right now. Files that are actively modified. And I'm looking for a solution to have them just be able to publish the new changes straight into the MySQL DB (and I don't want to have them export the excel sheets into delimited text files for me to re-import into the DB, but I'm looking more for an automated way, just like pulling data from the DB into Excel) AMK4 -- W | | I haven't lost my mind; it's backed up on tape somewhere. | ~ Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. .eFax 248.671.0909 http://www.pcraft.com . 3550 Arapahoe Ave #6 .. . . . . Boulder, CO 80303, USA - 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
Are all SQL-databases based on the same query-language?
Hi, I have only used MySQL. Today I read that all SQL use the same query-language, so if you program something, e.g. in PHP, you can also use is with other SQL-databases, with perhaps minor adjustments for the database-connections. Is this true? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- - 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
can I select from one table only where some records exist in anothertable?
Sorry, that's not a very good formulation of the question. I have 2 tables, and I want to retrieve data from records in table A only if there are corresponding records in B. I don't care what's in the records in table B: all I want to know is which items in A _have_ records in B. If I do: select distinct A.this, A.that from A, B where A.key=B.key order by A.key then the join produces zillions of records and the query takes ages. Similarly if I do select distinct A.this, A.that from A left join B on A.key=B.key where B.key is not null it takes ages. I guess if I could somehow apply 'limit 1' to the join, so that I just get any one record from B (I don't care which record: after all I'm not using data from B) then it would go like greased lightning, but I can't see how to express that in mySQL SQL. Is this one of those things that can't be done without sub-selects? Something like: select A.this A.that from A where (select count(*) from B where B.key=A.key)0 (I'm not sure if that's valid SQL, but I hope it conveys my meaning.) regards, -- John Stumbles [EMAIL PROTECTED] I.T. Services Centre, University of Reading http://www.rdg.ac.uk/~visstmbl +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ never generalise - 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: Excel-MySQL
Try Mascon's CopyPaste or Import Export: http://www.scibit.com/Mascon -Original Message- From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]] Sent: 31 January 2001 20:19 To: MySQL Mailing List Subject: Excel-MySQL Not sure if this was ever asked, but I'm fighting a dilemma over here and the answer to this greatly affects what I'll end up doing: I know I can PULL FROM an MySQL database (sitting on a Limix box) INTO MS Excel. And that works great. However, I'm looking for a way to go the other way around, FROM Excel TO MySQL. Upper Management has a lot of data (mainly price sheets) written in Excel right now. Files that are actively modified. And I'm looking for a solution to have them just be able to publish the new changes straight into the MySQL DB (and I don't want to have them export the excel sheets into delimited text files for me to re-import into the DB, but I'm looking more for an automated way, just like pulling data from the DB into Excel) AMK4 -- W | | I haven't lost my mind; it's backed up on tape somewhere. | ~ Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. .eFax 248.671.0909 http://www.pcraft.com . 3550 Arapahoe Ave #6 .. . . . . Boulder, CO 80303, USA - 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: Are all SQL-databases based on the same query-language?
SQL itself is not the way the data is stored. SQL stands for Structured Query Language and is a way of retrieving and modifying/adding records. If you write your SQL carefuly, yes you can use it pretty much "as is" on any SQL system. There are little changes and such however that every SQL server makes to the ASNI SQL standards. Somethings will work on one, but not another. Just be careful when writing your syntax and you should be fine. - Original Message - From: "SED" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 10:26 AM Subject: Are all SQL-databases based on the same query-language? Hi, I have only used MySQL. Today I read that all SQL use the same query-language, so if you program something, e.g. in PHP, you can also use is with other SQL-databases, with perhaps minor adjustments for the database-connections. Is this true? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- - 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
MyODBC - but how?
I have just installed MyODBC on my machine (Windows ME) and everything is working fine, but I've looked through the manual and I can't find anything showing commands on how to connect to other databases. Can someone point me in the right direction? Thanks. John Halladay - 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
Can I have two (or more) different SQL-databases on the same server?
Hi, Can I have two (or more) different SQL-databases running at the same time on the same server (or same computer)? Does it varies between the systems? And if I can, are they all available to PHP at the same time? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- - 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: Are all SQL-databases based on the same query-language?
SQL is a language that is based on standards that are modified every so often. So, yes, in general there are SQL statements that you put together will work with Access, MSSQL, Informix, DB2, and Oracle, etc. But *THE* key issue is that each DBMS application has it's own hooks that are native the vendor's implementation. MySQL's version of SQL doesn't support sub-selects as of yet, for now, but Oracle and SQL Server do. On the flip side, mySQL's version of SQL has better regular expression support than SQL Server. Access' version of SQL is a little bizarre because it requires you to use * instead of % in LIKE clauses, (unless M$ has changed it). I think it's somewhat polluted. Aside from minor adjustments for db connections, you're in decent shape. -Original Message- From: Eric Fitzgerald [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 10:40 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Are all SQL-databases based on the same query-language? SQL itself is not the way the data is stored. SQL stands for Structured Query Language and is a way of retrieving and modifying/adding records. If you write your SQL carefuly, yes you can use it pretty much "as is" on any SQL system. There are little changes and such however that every SQL server makes to the ASNI SQL standards. Somethings will work on one, but not another. Just be careful when writing your syntax and you should be fine. - Original Message - From: "SED" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 10:26 AM Subject: Are all SQL-databases based on the same query-language? Hi, I have only used MySQL. Today I read that all SQL use the same query-language, so if you program something, e.g. in PHP, you can also use is with other SQL-databases, with perhaps minor adjustments for the database-connections. Is this true? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- - 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
Replication Problem - Bug with master.info?
Description: Replication problem. When I restart my slave server, it is unable to connect to the master. It says it cannot find the log file on the server. I noticed that it looks like the log file it's looking for looks correct but it has has a Line-Feed included in it. I tried fixing the master.info file to remove the line-feed, but it keeps putting it back in there. The only fix I found was to run this SQL command on the slave: CHANGE MASTER TO MASTER_LOG_FILE='server-bin.001'; After running that it works fine, until I restart mysql on the slave again. How-To-Repeat: Set up two master-slave servers and restart mysql on the slave. Fix: Temporary fix: run the SQL command listed above. Submitter-Id: submitter ID Originator:Philip Gatt Organization: MySQL support: [none | licence | email support | extended email support ] Synopsis: Replication problem Severity: critical Priority: high Category: mysql Class: sw-bug Release: mysql-3.23.32 (Official MySQL RPM) Server: /usr/bin/mysqladmin Ver 8.14 Distrib 3.23.32, for pc-linux-gnu on i686 Copyright (C) 2000 MySQL AB MySQL Finland AB TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version 3.23.32 Protocol version10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 20 min 29 sec Threads: 1 Questions: 2627 Slow queries: 0 Opens: 60 Flush tables: 1 Open tables: 2 Queries per second avg: 2.138 Environment: System: Linux localhost 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 2731 (Red Hat Linux 7.0) Compilation info: CC='egcs' CFLAGS='-O6 -fomit-frame-pointer -mpentium' CXX='egcs' CXXFLAGS='-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mpentium' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 14 Oct 2 13:02 /lib/libc.so.6 - libc-2.1.92.so -rwxr-xr-x1 root root 4776568 Aug 30 17:56 /lib/libc-2.1.92.so -rw-r--r--1 root root 22607104 Aug 30 17:15 /usr/lib/libc.a -rw-r--r--1 root root 178 Aug 30 17:15 /usr/lib/libc.so Configure command: ./configure --disable-shared --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --enable-assembler --with-mysqld-user=mysql --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/ --with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql --infodir=/usr/info --includedir=/usr/include --mandir=/usr/man --without-berkeley-db '--with-comment=Official MySQL RPM' - 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: Second email asking for assistance!
Just because you send a message doesn't mean it's gonna get answered!! Have you successfully installed a non alpha version of the db? On 31 Jan 2001 11:09:33 -0500, Sanam Azeem wrote: I sent this email two days ago and haven't heard from anyone Date: Mon, 29 Jan 2001 14:51:30 -0500 To: [EMAIL PROTECTED] From: Sanam Azeem [EMAIL PROTECTED] Subject: Error during make... Hello, We're installing Mysql source mysql-3.23.8-alpha on AIX 4.3.3.0. We were able to run configure without a problem but have problem once make is run, we receive the following errors: "net.c", line 109.9: 1506-045 (S) Undeclared Identifier net. "net.c", line 114.18: 1506-045 (S) Undeclared Identifier nettype. "net.c", line 118.11: 1506-045 (S) Undeclared Identifier fd. make: The error code from the last command is 1. Stop. make: The error code from the last command is 1. Stop. make: The error code fromt the last command is 2. Stop. Kindly assist us with this at your earliest convenience, we would like to proceed with the installation ASAP. Thank you for your help in advance. Sanam Azeem (212) 678-5636 - 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
To thread or not to thread this is the question ..........
Hi, I have a problem with mysql 3.23.30 (binary distribution) and Slackware 7. Runnining different programs that access to database, the numbers of mysqld grow up. But when a single program exit, the number of mysqld processes should decrease by one. This works on RedHat 7.0 with the same mySQL distribution, but on Slackware 7 the number of mysqld never goes down, and they keep the maximum memory used in the last big query. So I tried to compile the last source distribution 3.23.32 on Slackware 7, but I got the same thing. I know that the mysqld should be threads not processes, and the memory used should be shared with all running mysqld, but something does not work properly. Do you think that the version of libpthread-0.8.so on Slackware 7 could be the cause ? (RedHat 7.0 has the libpthread-0.9.so). I cannot upgrade the OS now, and I think that is not a nice idea moving on the fly libpthread-0.9.so from RedHat to Slackware (the system is up and there are 102 users connected !!!). Could someone help me ? Thanks in advance. marcello - marcello giovagnoli Logical System s.r.l. Via Rocco Scotellaro 23 60035 JESI AN ITALY e-mail: [EMAIL PROTECTED] - - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
1146 - The error number from the ODBC data source.
Hi there, I'm using MySQL 2.50.36.nt from Visual FoxPro 6.0 SP4. The OS is Windows 2000 Professional. I've created a database with a remote view. The remote view was generated using the Wizard. I selected MySQL from used Available Data Sources. The remote view of the table demo from the MySQL database guthyrenker is added to the database in all its' glory. When I try to do the same programmatically it fails miserably. CREATE SQL VIEW Command: CREATE SQL VIEW my_remote_view REMOTE ; CONNECTION MySQL ; AS SELECT * FROM demo The following is the results from the AERROR(gaerror) Function: Gaerror[1, 1]: 1526 Gaerror[1, 2]: Connectivity error: [TCX][MyODBC]Table 'guthyrenker.demo' doesn't exist Gaerror[1, 3]: [TCX][MyODBC]Table 'guthyrenker.demo' doesn't exist Gaerror[1, 4]: S1000 Gaerror[1, 5]: 1146 Gaerror[1, 6]: 1 Gaerror[1, 7]: .NULL. The following table describes the contents of each element when an ODBC error numbered 1526 occurs. |--+-| | Element |Description | | number | | |--+-| | 1| Numeric. Contains 1526. | |--+-| | 2| Character. The text of the error| | | message.| |--+-| | 3| Character. The text of the ODBC error | | | message.| |--+-| | 4| Character. The current ODBC SQL state. | |--+-| | 5| Numeric. The error number from the ODBC | | | data source.| |--+-| | 6| Numeric. The ODBC connection handle.| |--+-| | 7| The null value. | |--+-| What am I doing wrong? Thanks in advance, Ed E. - 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: row-to-column-conversion in 1 query
Re: Can I have two (or more) different SQL-databases on the same server?
A database server can contain multiple databases. On 31 Jan 2001 19:01:02 +, SED wrote: Hi, Can I have two (or more) different SQL-databases running at the same time on the same server (or same computer)? Does it varies between the systems? And if I can, are they all available to PHP at the same time? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- - 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: Once again ... row to column conversion
Yeah, you should really change the way the database is setup but you could also do something like this. Have perl return an array and just do a foreach on the array and that will give you all the values of each column on the row, without you knowing how many rows there are. Even if your not using perl you can still do it in other languages. On 31 Jan 2001 12:10:36 -0800, Eric Fitzgerald wrote: Change the way it's stored in the table. Seriously, if the data is stored in a single row, there is no way via SQL (not defined in standards, not available in any SQL server implementation I've seen either), then the program has to convert that into columns. The standard mysql utility is capable of doing this, and you can do it in your program. If you want to use the mysql CLI, do something like this: mysql --execute='SELECT fields FROM table WHERE condition' --vertical dbname Otherwise write your program to do it. - Original Message - From: "leo.putz" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 11:50 AM Subject: Once again ... row to column conversion Sorry for having to post the same problem a second time - but by now I'm really at a loss. Is there really no one out there to give me a hint? I need the output of a query result (all query information is in one row) in one column (!). So, e.g., if you have all temperature lows in one row, how can I retrieve the data in form of one column? THANKS! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - 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: Can I have two (or more) different SQL-databases on the same server?
SED wrote: Hi, Can I have two (or more) different SQL-databases running at the same time on the same server (or same computer)? Does it varies between the systems? And if I can, are they all available to PHP at the same time? Regards, Sumarlidi Einar Dadason See "create database" in the manual (search for it) you can have as many databases as youant (within reason) on the same server. Not only can you access them all from php but you can run queries that access multiple databases in the same query.. See the manual but basicaly you can do select * from db1.tablea, db2.tableb blah - 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
Slackware AND mySQL 3.23.32 memory problems ....
Hi, I'm sorry, for my previus question "To thread or not to thread " but now all it's OK. :) Looking at /etc/my.cnf, i could see two variables: set-variable= thread_cache=8 set-variable= thread_concurrency=8 # Try number of CPU's*2 this should set the edge to the maximum threads up to 8 and the mysqld running daemons are, at least, 8 !(is'nt it ?) And the process size, or thread size, decrease when the program goes down with 3.23.32. Regards marcello - 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
Increasing number of processes
I need to run more mysql processes than the default of 3. Where is this configured? Thanks, CC - 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: Connectivity to MySQL DB
Hi, I installed MyODBC and even configured it. MySQL db running on Solaris is running under the root user. While defining the DSN using MyODBC in the username I tried putting root user and the password for the same but I keep getting error "can't connect to MySQL Server". The instance for MySQL is running. Is there any way to test the login process. I can logon MySQL db on using machine. Basically we are planning to user Actualte report writing tool and MySQL db. If you know any body using combination please let me know. Thanks. Sanjeev - Original Message - From: Quentin Bennett [EMAIL PROTECTED] To: 'Sanjeev Kabra' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 30, 2001 6:45 PM Subject: RE: Connectivity to MySQL DB Hi, You don't need a special process - the MySQL ODBC driver talks directly to the mysqld already running on Solaris. Regards Quentin -Original Message- From: Sanjeev Kabra [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 31 January 2001 11:58 To: [EMAIL PROTECTED] Subject: Connectivity to MySQL DB Hi Everybody, I have installed MySQL on Solaris and have even setup the connectivity using MyODBC on windows. I would like to know what I have to execute on Solaris like listener process for Oracle so that when I connect from windows environment I can connect to the database running on Solaris. Thanks in advance. Sanjeev. The information contained in this email is privileged and confidential and intended for the addressee only. If you are not the intended recipient, you are asked to respect that confidentiality and not disclose, copy or make use of its contents. If received in error you are asked to destroy this email and contact the sender immediately. Your assistance is appreciated. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySql - JSP - Please help - URGENT
I am running mySql 3.23.32 on Redhat 7, with Apaache and Tomcat Jakarta 3.2.1 and for database connection i use mm.mysql.jdbc-1.2c Here is my problem I have got MySql to run fine but when i try to interfaec it over the web i get te follwoing error error 500 javax.servlet.ServletException: Server configuration denies access to data source The jsp page it self has code that is as follows %@ page language="java" import="java.sql.*" % html code here % Class.forName("org.gjt.mm.mysql.Driver"); Connection myConn = DriverManager.getConnection("jdbc:mysql:///test_db1?user=Usernamepassword=password"); Statement stmt = myConn.createStatement(); ResultSet myResultSet = stmt.executeQuery("select * from test_tb1"); Is the a problem with mySql user permissions, or tomcat, or JDBC driver or what else. All help is greatelly appreciated! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Queries upon queries
We're looking at moving a web-based application currently built with Microsoft Access and Cold Fusion to a real database platform. I've only just started poking around mySQL, so I'm not really up on its capabilities. One of the things this application relies on fairly heavily is stored queries (aka stored procedures and/or views, depending on what platform you're coming from). There are sometimes five or six layers of SQL, with one query using other queries for their data, between the tables and what the user eventually sees. Poking around the documentation, it appears that mySQL doesn't support that sort of thing. Do I have that right, or am I missing something important? Even if I can't get deeply layered queries with mySQL, is there a relatively painless way of building them with some other tool (say, php or perl and the appropriate modules)? Am I likely to get a significant boost to performance if I keep Access in the middle for queries but move the tables to mySQL? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MyODBC - but how?
You just create a DSN in the control panel, and tell your ODBC compliant software to use that data source. At 11:46 AM 1/31/2001 -0700, John Halladay wrote: I have just installed MyODBC on my machine (Windows ME) and everything is working fine, but I've looked through the manual and I can't find anything showing commands on how to connect to other databases. Can someone point me in the right direction? Thanks. John Halladay - Scott Baker - Webster Internet - Network Technician 503.266.8253 - [EMAIL PROTECTED] "Children today are tyrants. They contradict their parents, gobble their food, and tyrannize their teachers." - Socrates - 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: Auto-Increment - how can I avoid repeating IDs?
That's nice :) - Original Message - From: Harald Fuchs [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 8:34 PM Subject: Re: Auto-Increment - how can I avoid repeating IDs? In article 009f01c08b0f$c85bbec0$be66bcd4@ruscomp, [EMAIL PROTECTED] ("Rus") writes: That's strange. I thought that auto_increment field not suppose to use same value. Even worse, it's documented :-) If you delete the row containing the maximum value for an `AUTO_INCREMENT' column, the value will be reused with an ISAM table but not with a `MyISAM' table. If you delete all rows in the table with `DELETE FROM table_name' (without a `WHERE') in `AUTOCOMMIT' mode, the sequence starts over for both table types. - 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: too many connections
"Jesse E. Stay II" wrote: I seem to have run into a problem lately where all of the sudden my server keeps giving me "too many connections" errors, locking anyone out of the site. I have set max_connections to 210, which shouldn't matter anyway because we haven't had any more users than usual accessing the site. The only thing that has changed since then is the programming (using Apache::DBI in Perl to connect). Does anyone have any ideas what type of programming errors may be causing this? I do a mysqladmin processlist, and it appears that the processes seem to stay right up around 80, and don't seem to go much below that number - why is that? Any help would be extremely helpful - my boss is about ready to switch to Oracle, and I don't want to have to do that by all means. -Jesse Stay Maybe you are not closing your connections. - 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: Once again ... row to column conversion
If i get it right, you should use CONCAT - Original Message - From: leo.putz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 10:50 PM Subject: Once again ... row to column conversion Sorry for having to post the same problem a second time - but by now I'm really at a loss. Is there really no one out there to give me a hint? I need the output of a query result (all query information is in one row) in one column (!). So, e.g., if you have all temperature lows in one row, how can I retrieve the data in form of one column? THANKS! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - 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: Starting server on Sun Solaris
Hi, When you say 'hangs', what do you mean? Does CTRL-C work? Does the server have to be killed with kill -9? Are you running the program in the background? # bin/safe_mysqld If so, can mysql CLI connect to the running server? Regards quentin -Original Message- From: David Birchfield [mailto:[EMAIL PROTECTED]] Sent: Thursday, 1 February 2001 15:57 To: [EMAIL PROTECTED] Subject: Starting server on Sun Solaris Hi all, I have completed the installation of MySQL on Solaris 8, but when I run safe_mysqld the machine just hangs after giving the prompt: "Starting mysqld daemon with databases from /usr/local/mysql/var" it seems to go ahead and write /tmp/mysql.sock but stalls after that. thanks for any troubleshooting help! Best, David -- david birchfield http://music.columbia.edu/~dab http://mojobisquits.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 The information contained in this email is privileged and confidential and intended for the addressee only. If you are not the intended recipient, you are asked to respect that confidentiality and not disclose, copy or make use of its contents. If received in error you are asked to destroy this email and contact the sender immediately. Your assistance is appreciated. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: ER/Studio
i too am interested, especially for the Mac. pleasepleasepleaseplease At 5:14 PM -0800 1/31/01, David Wilde wrote: Has anyone ever been able to get ER/Studio to work with MySQL? Are there any other database design tools such as ER/Studio that support MySQL directly? Is this a project for sourceforge :) Thanks, Dave W. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - 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.server script
Hi, Each time I install mysql from a binary release that I have created, I have to modify safe_mysqld so that it can be called from mysql.server. This is because safe_mysqld checks to see if it knows what is going on before checking the command line args to see where things should be. Shouldn't this be fixed. so that mysql.server can call safe_mysqld 'out of the box'? Regards Quentin Bennett Transport Systems Division Infinity Solutions Phone: + 64 9 358 9720 Fax : + 64 9 309 4142 mailto:[EMAIL PROTECTED] http://www.infinity.co.nz The information contained in this email is privileged and confidential and intended for the addressee only. If you are not the intended recipient, you are asked to respect that confidentiality and not disclose, copy or make use of its contents. If received in error you are asked to destroy this email and contact the sender immediately. Your assistance is appreciated. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Newbie question
Don't know for sure with Mac, but if it's the same as *nix, it means you haven't started the mysql server yet. Once you start it, the socket file will automatically be created. The manual explains this. - Original Message - From: "Peter Likidis" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 12:25 Subject: Newbie question I hope this hasn't been asked before but I have asked in multiple NGs etc and no one seems to know how to answer it. I have gone through the instructions on setting up MYSQL on the server (MacOS X). The problem is there is no socket. I have no idea what I did wrong. I cannot find a socket file anywhere so I'm assuming one was never created. I have set the /tmp directory for writing so it can be created. But alas still doesn't help. So how do I create /tmp/mysqld.sock??? - 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: MyODBC - but how?
No, mysql cannot connect to other database servers, it can't even connect to other mysql servers except through replication. John Halladay wrote: Connecting to the tables in MySQL works fine. For example I can connect to the MySQL tables using MS Access. I would like to know if it is possible to connect to the tables of another database from MySQL. So instead of going from MS Access to MySQL I would go from MySQL to an AS400. Do I somehow use the command CONNECT [] to change the database? -Original Message- From: Scott Baker To: John Halladay; MySQL List (E-mail) Sent: 1/31/2001 2:09 PM Subject: Re: MyODBC - but how? You just create a DSN in the control panel, and tell your ODBC compliant software to use that data source. At 11:46 AM 1/31/2001 -0700, John Halladay wrote: I have just installed MyODBC on my machine (Windows ME) and everything is working fine, but I've looked through the manual and I can't find anything showing commands on how to connect to other databases. Can someone point me in the right direction? Thanks. John Halladay - Scott Baker - Webster Internet - Network Technician 503.266.8253 - [EMAIL PROTECTED] "Children today are tyrants. They contradict their parents, gobble their food, and tyrannize their teachers." - Socrates - 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
Virtual memory exhausted making mysqlgui
Hi, I'm trying to make mysqlgui on Linux 6.x. I have the following problem and any advice will be welcome: g++ -O3 -g -pipe -fforce-mem -fforce-addr -I. -I../mysql++-1.7.8/sqlplusint -I../mysql-3.23.26/include -c do_sql.cc do_sql.cc: In function `static void Sinisa_je_blesav::table_callback(class Sinisa_je_blesav *, void *)': do_sql.cc:542: virtual memory exhausted cpp: output pipe has been closed make: *** [do_sql.o] Error 1 TIA Petras
Re: Can I have two (or more) different SQL-databases on the same server?
Gosh, this list is broken. No reply-to to the list... Had to manually forward this message because I saw that only after I send the message to SED So sprach SED am Wed, Jan 31, 2001 at 07:01:02PM -: Can I have two (or more) different SQL-databases running at the same time on the same server (or same computer)? Does it varies between the systems? Yes, for example installing postgre and mysql is no problem. And yes, they are available in PHP at the same time, you just need to switch your mysql_connect to pg_connect and mysql_query to pg_exec. But be sure to read the different sections in the PHP manual, there are some minor differences. And also make sure that you PHP installation supports all the different databases. On Mandrake (that's what I'm using and most familiar with) this simply involves installing the right rpm packages, ie. php_mysql and php_pgsql in this case. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die guenstige Art an Linux Distributionen zu kommen Uptime: 1 day 1 hour 24 minutes - 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
too many connections
I seem to have run into a problem lately where all of the sudden my server keeps giving me "too many connections" errors, locking anyone out of the site. I have set max_connections to 210, which shouldn't matter anyway because we haven't had any more users than usual accessing the site. The only thing that has changed since then is the programming (using Apache::DBI in Perl to connect). Does anyone have any ideas what type of programming errors may be causing this? I do a mysqladmin processlist, and it appears that the processes seem to stay right up around 80, and don't seem to go much below that number - why is that? Any help would be extremely helpful - my boss is about ready to switch to Oracle, and I don't want to have to do that by all means. -Jesse Stay - 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 syncronize two mysql databases ?
On Wed, Jan 31, 2001 at 08:08:11PM +0100, [EMAIL PROTECTED] wrote: HI. i want to syncronize two databases (one locally at my place, one at my isp) with the same tables/fields. like i call every xx houres a script and then the things i delete or add gets added and deleted at my isp too or the other way arround. is there allready a tool who does this ? Why not use MySQL's built in replication? -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 328-7878Fax: (408) 530-5454 Cell: (408) 439-9951 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Selecting games which a given user can join
That's what I would have suggested as well, but I tried that on a test table and it returned all t2.id's in t2. Julien Beasley Bridge News Asia Applications Specialist -Original Message- From: Rus [SMTP:[EMAIL PROTECTED]] Sent: Thursday, February 01, 2001 10:26 AM To: [EMAIL PROTECTED] Subject: Re: Selecting games which a given user can join select t2.id from gamers t1,games t2 where t1.user="jack" and t2.idt1.gid group by t2.id Original Message - From: zbynek [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 4:31 PM Subject: Selecting games which a given user can join Hi there! I'm new to SQL and I can't figure out a query which would give me the result I need. What I want to do is this: I have table that stores names of players and number of the game they play (one player can play more games concurrently). Other users can join the game. For given user I want to display the games which he can join. The only condition is that the user can't join any game which he already plays. If I have this +-+-+ | gid | user| +-+-+ | 1 | jack| | 1 | john| | 1 | peter | | 1 | richard | | 2 | john| | 2 | richard | | 3 | peter | | 4 | jack| | 4 | peter | | 5 | peter | | 5 | john| +-+-+ then for jack I want numbers 2, 3, 5 but not 4; for peter it should be 2 and no other. I'll appreciate your advice! zbynek - 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
synopsis of the problem (one line)
Description: How-To-Repeat: Fix: Submitter-Id: submitter ID Originator:palmy@TT Organization: MySQL support: [none | licence | email support | extended email support ] Synopsis: Severity: Priority: Category: mysql Class: Release: mysql-3.23.32 (Source distribution) Environment: System: Linux myserver 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 13 Feb 1 04:39 /lib/libc.so.6 - libc-2.1.3.so -rwxr-xr-x1 root root 4101324 Mar 1 2000 /lib/libc-2.1.3.so -rw-r--r--1 root root 20272704 Mar 1 2000 /usr/lib/libc.a -rw-r--r--1 root root 178 Mar 1 2000 /usr/lib/libc.so Configure command: ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --with-gnu-ld --with-pthread --enable-static=no --enable-shared=no Perl: This is perl, version 5.005_03 built for i386-linux - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysql and security?
On Fri, Jan 05, 2001 at 12:10:55AM -0800, Jeremy D. Zawodny wrote: Is it possible to make a mysql database safe to publish it via an CD so that noone could read it even if he has good knowledges about mysql What good would publishing a database be if nobody can read it? Perhaps you want to distribute a CD full of databases, and people buy access to specific databases. access = password It means that you don't have to create a different CD for each database, and therefore don't have to ship multiple CDs. I know some government department does that with Australian geographical maps. They send you the CD, which contains all the maps, but you have to pay to unlock the maps you need. Or at least I think that's how it works. :) 2 Regards, /|/| / | - 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
Database/table encryption
I'm working for a company that has a paranoid client, and the client wants their database to be 'secure'. By 'secure' they mean that even if someone gains root access on the server, the data in the database can't be compromised (obtained). I can think of a couple of ways to do this, but I don't know if they're practical. The first is to have MySQL store the tables and such in an encrypted fashion, at the file layer. The second is to have the application encrypt the data when storing it in the database, and decrypt it when retrieving it. In this case, perhaps PGP could be used to do the encryption/decryption? PGP (or GnuPG) would be good, because it would only require a password from the user when decrypting. However, I suspect that the overhead in calling PGP/GnuPG for each record would be prohibitive. Perhaps there's a PGP/GnuPG Perl module that doesn't require PGP or GnuPG to be installed? (ie: has all code implemented internally, in Perl or C) Can anyone else offer any alternative suggestions, or some guidance? 2 Regards, /|/| / | - 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: Can I have two (or more) different SQL-databases on the same server?
If you mean databases others have already replied. If you mean multiple instances of the mysql server then that is also a yes. I haven't tried but I do know you have to specify a different port for the 2nd instance. This is also in the manual. - Original Message - From: "SED" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 3:01 Subject: Can I have two (or more) different SQL-databases on the same server? Hi, Can I have two (or more) different SQL-databases running at the same time on the same server (or same computer)? Does it varies between the systems? And if I can, are they all available to PHP at the same time? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- - 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
Problem setting up separate MySQL server - some queries sleepuntil PHP times out
Hi, I am trying to setup a new MySQL server where I am working. The old one was on a machine with Apache/PHP4 and worked fine but recently MySQL was placing a big load on this machine so we decided to move it to its own server. I've set it up fine on a machine with Red Hat 7, MySQL 3.23.32 and it all works fine locally. SOME queries work fine from the web server to the new MySQL server and go through instantly, but others seem to be hanging. I've been testing it with the most intensive database we had on the old system. When you execute a large query on the old server ( Red Hat 6.2 / MySQL 3.22.32 ), if you watched the processlist the query was working away for about 10 seconds ( you could see the info field changing working through the query ) and then it would return the results. On the new server however, the queries seem to hang and sit in sleep mode. If you watch the processlist very carefully they are executing one 'line' of the query but then jumping back into sleep mode. Some of these large queries will eventually complete but more often they just time out. Other, simpler queries work fine on both the new and old MySQL servers. The large queries I've been using are just large select type statements, theres a couple of examples below. The queries are nested in the PHP because I need to perform tests/actions on the results from the first level of results before generating the next level. SELECT memcats.MemberNumber FROM memcats,members WHERE memcats.Category='".$category."' AND memcats.MemberNumber=members.MemberNumber ORDER BY members.Plan DESC,members.Name SELECT * FROM members WHERE MemberNumber=".$crow['MemberNumber']." AND ACTIVE=1 ORDER BY Name SELECT State,RegionID,Locality FROM regionpcodes WHERE Postcode=".$row['Postcode'] SELECT Region FROM regions WHERE ID=".$prow['RegionID'] Heres a sample processlist: Id User Host db Command Time State Info 4 root localhost Sleep 5409 34 root www.acenet.com.au ccare Sleep 4 35 root www.acenet.com.au ccare Sleep 0 36 root www.acenet.com.au mysql Query 0 SHOW PROCESSLIST Numbers 34 and 35 are examples of this, every few seconds they will reset their 'time' field value as well, this seems to be when they execute one step of the actual query. Heres the system variables: Variable_name Value ansi_mode OFF back_log 50 basedir / binlog_cache_size 32768 character_set latin1 character_sets latin1 big5 czech euc_kr gb2312 gbk sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5 concurrent_insert ON connect_timeout 5 datadir /var/lib/mysql/ delay_key_write ON delayed_insert_limit 100 delayed_insert_timeout 300 delayed_queue_size 1000 flush OFF flush_time 0 have_bdb NO have_gemini NO have_innobase NO have_isam YES have_raid NO have_ssl NO init_file interactive_timeout 28800 join_buffer_size 131072 key_buffer_size 67104768 language /usr/share/mysql/english/ large_files_support ON locked_in_memory OFF log OFF log_update OFF log_bin OFF log_slave_updates OFF long_query_time 10 low_priority_updates OFF lower_case_table_names 0 max_allowed_packet 1048576 max_binlog_cache_size 4294967295 max_connections 100 max_connect_errors 10 max_delayed_threads 20 max_heap_table_size 16777216 max_join_size 4294967295 max_sort_length 1024 max_tmp_tables 32 max_write_lock_count 4294967295 myisam_recover_options OFF myisam_sort_buffer_size 8388608 net_buffer_length 1047552 net_read_timeout 30 net_retry_count 10 net_write_timeout 60 open_files_limit 0 pid_file /var/lib/mysql/mysql.acenet.com.au.pid port 3306 protocol_version 10 record_buffer 8384512 query_buffer_size 0 safe_show_database OFF server_id 0 skip_locking ON skip_networking OFF skip_show_database OFF slow_launch_time 0 socket /var/lib/mysql/mysql.sock sort_buffer 33554424 table_cache 512 table_type MYISAM thread_cache_size 0 thread_stack 65536 timezone EST tmp_table_size 1048576 tmpdir /tmp/ version 3.23.32 wait_timeout 300 And heres the runtime info: Variable_name Value Aborted_clients 0 Aborted_connects 0 Bytes_received 1170124 Bytes_sent 1701389 Connections 43 Created_tmp_disk_tables 0 Created_tmp_tables 1 Created_tmp_files 0 Delayed_insert_threads 0 Delayed_writes 0 Delayed_errors 0 Flush_commands 1 Handler_delete 0 Handler_read_first 2 Handler_read_key 9873 Handler_read_next 8967 Handler_read_prev 0 Handler_read_rnd 1501 Handler_read_rnd_next 9361243 Handler_update 0 Handler_write 838 Key_blocks_used 46 Key_read_requests 20693 Key_reads 46 Key_write_requests 0 Key_writes 0 Max_used_connections 4 Not_flushed_key_blocks 0 Not_flushed_delayed_rows 0 Open_tables 9 Open_files 16 Open_streams 0 Opened_tables 15 Questions 28688 Select_full_join 0 Select_full_range_join 0 Select_range 0 Select_range_check 0 Select_scan 4587 Slave_running OFF Slave_open_temp_tables 0