output to csv
Hi Folks, I'm running a batch command in win2K: cmd mysql batch-file output.txt In the batch file, can I specify that values are separated by commas instead of tabs? Cheers, Steve - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 c api
hi all i hope that some one send me a programme illustrating how to access to mysql database with c api .. ahmed Portail mobile DIALY! visitez www.dialy.net DIALY! mobile portal visit www.dialy.net - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 c api
ahmed writes: hi all i hope that some one send me a programme illustrating how to access to mysql database with c api .. ahmed Please don't repost just because you didn't like the answers you got the first time. Someone pointed you to C sources, and there are plenty of those available on the net. The easiest to find would of course be for the client programs that come with mysql. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql c api
On Tue, 4 Sep 2001, ahmed wrote: i hope that some one send me a programme illustrating how to access to mysql database with c api .. I run a site that has a free e-mail forwarding service. The following program is what runs .qmail-default. #define HOST localhost #define USER username #define PASSWORD password #define DATABASE database #include mysql.h #include stdio.h #include stdlib.h /* Returns 1 if s contains any UNSAFE characters. * Returns 0 otherwise. */ #define UNSAFE ;`'\|*?~^()[]{}$\n\r int unsafe(char *s) { char *p = s; while (*p) { if (strchr(UNSAFE, *p)) { return 1; } p++; } return 0; } /* This program is called by ~/.qmail-default. It queries the MySQL * database to forward the e-mail to someone. */ main() { MYSQL mysql; MYSQL_RES *result; MYSQL_ROW row; char *user, query[255], email[255], buf[8192]; FILE *pipe; mysql_init(mysql); if (!mysql_real_connect(mysql, HOST, USER, PASSWORD, DATABASE, 0, NULL, 0)) { fprintf(stderr, Failed to connect to database: Error: %s\n, mysql_error(mysql)); exit(111); } user = getenv(EXT); sprintf(query, SELECT email FROM records WHERE login='%s', user); if (mysql_query(mysql, query)) { fprintf(stderr, Unable to query database: %s\n, mysql_error(mysql)); exit(111); } result = mysql_store_result(mysql); if (!mysql_num_rows(result)) { printf(There is no user '%s' registered here.\n, user); exit(100); } row = mysql_fetch_row(result); if (!row[0] || !*row[0]) { printf(User '%s' has not setup a forwarding address.\n, user); exit(100); } strcpy(email, row[0]); if (unsafe(email)) { printf(User '%s' has a forwarding address containing unsafe characters (%s).\n, user, email); exit(100); } /* Everything checks out. Forward the message. */ sprintf(query, /var/qmail/bin/forward %s, email); if (pipe = popen(query, w)) while (fgets(buf, sizeof(buf), stdin)) fputs(buf, pipe); exit (0); } - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
limit and order by issuselimit and order by issuse
hello, I am trying to use limit and order by in the same query for paging of records. But faceing the problem that query does not return any row. After removing of limit every thing is working fine. Is it really a bug. Any solution. mysql version 3.23.38 regards, shahzad - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: limit and order by issuse
On Tue, 4 Sep 2001 [EMAIL PROTECTED] wrote: I am trying to use limit and order by in the same query for paging of records. But faceing the problem that query does not return any row. After removing of limit every thing is working fine. Is it really a bug. Any solution. Going by what you have told me, I'm thinking that your LIMIT statement may be incorrect. Show us what the query you are executing is so that we can see what is happening; I don't have enough information to answer your question right now. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 no important buffer overflow in mysql client
[EMAIL PROTECTED] writes: The problem occurs in the function my_strdup() in an repnz scans ... stuff.If you give a input of more than 82 characters to mysql client as the database name the client will overflow. This is not a big problem since it isn't setuid. hmm... mysql -u user -phmm `perl -e 'print Ax100'` fix the my_strdup function shit stuff Submitter-Id:submitter ID Originator:Renato F. Lima Organization: Cimcorp Telnet MySQL support: none Synopsis: A little overflow Severity:non-critical with no setuid(the default) Priority: low Category:mysql Class:sw-bug Release: mysql-3.22.32 (Source distribution) Environment: System: FreeBSD chronoz.telnet.com.br 4.1.1-RELEASE FreeBSD 4.1.1-RELEASE #2: Sun Jun 17 23:06:35 BRT 2001 [EMAIL PROTECTED]:/usr/src/sys/compile/MYKERNEL i386 Some paths: /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Using builtin specs. gcc version 2.95.2 19991024 (release) Compilation info: CC='gcc' CFLAGS='' CXX='gcc' CXXFLAGS='' LDFLAGS='' Configure command: ./configure --with-unix-socket-path=/var/tmp/mysql.sock --with-low-memory --with-mit-threads=yes Perl: This is perl, version 5.005_03 built for i386-freebsd Hi! This function has been replaced since. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MyODBC, DBUG and multi-threaded clients
Peter Duffy writes: Hi Sinisa, Do you know of any which are specifically accessed by multi-threaded client applications via ODBC? (If so, I'd really like to know, so that I can try to get hold of copies of the client applications to test in my own environment.) As you very well know, it is completely irrelevant what kind of multi-threaded program it is. Those function perform the same regardless if programs listents to the socket or write to the socket. DBUG functions have got nothing to do with that. There are many such programs utilizing DBUG functions, like mysqlmanagers in tool directory of 4.0. Then several GUI clients. Practically dozens of them. Some of those GUI clients utilizing ODBC. Do some research on your side. I'm sorry about your experiences with mpatrol. As I've said, I find it superb: it has already been of enormous assistance in fixing memory leaks, and in the current situation it gave me information that I could not have gained otherwise. Also, I've always found the author of mpatrol to be highly responsive and helpful. I have not used dmalloc. Best regards, Peter Oh, I had no problems by authors of either mpatrol and dmalloc. I just got reply that my problems lie beyond scopes of their programs and that they will do it one day when they have time, which is OK. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: On Redhat 7.1
Trond Eivind Glomsrød writes: Tony Bibbs [EMAIL PROTECTED] writes: 7.1 doesn't install php with mysql support enabled. Yes, we did. FYI, redhat is doing this because postgres is no their prefered DBMS. Can't understand why they don't just compile support for both in. We do compile in support for MySQL, but it's in the php-mysql package - just as at support for PostgreSQL is in php-pgsql. -- Trond Eivind Glomsrød Red Hat, Inc. Just a small note from our side. We from MySQL have not noticed a single and slightest inclination of Red Hat towards PostgreSQL so far, when it comes to RH distros. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Cannot do mysql_query INSERT on Field type varchar that contains
[EMAIL PROTECTED] writes: an apostrophe Description: If I try to INSERT data containing an apostrophe into a Field defined as mediumtext it works ok. However, if I try to insert the same data into a Field defined as varchar, the INSERT fails. And, it not only doesn't work...it does nothing at all...no error message of any kind. How-To-Repeat: mysql_query(INSERT INTO reply (subj,message) VALUES('$subj','$message')); where subj is defined as varchar(50) and message is defined as mediumtext Set the value of subj to You're Great and message to anything. Fix: Either change the Field type to mediumtext (blob) or do a value=addslashes(value) before the INSERT. Please read our manual on escaping your strings. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Newbie with mysql
Hi, I've got a question that i'm sure that it is easy to solve. I've installed mysql in Redhat Linux 7.0 and it is working fine. I've also installed PHP module so i can make PHP pages. I've tried to do a small page that connects to mysql server but this error appears: Warning: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /var/www/html/prueba.php on line 4 The code that I use for accesing the page is: $link = mysql_pconnect ('localhost','root','') I'm not sure if it is a PHP error or a MySQL server configuration problem. I didn't change anything on MySQL, so perhaps, I have to change something. Any idea? Thanks in advance. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 with mysql
Can you log on with mysql -u* -p If you can then there is some thing up with you php install? If you can not then look at the mysql db and at users to see if you have permissions.. Simon -Original Message- From: Antonio Ortega Sancho [mailto:[EMAIL PROTECTED]] Sent: 04 September 2001 11:53 To: Mysql (E-mail) Subject: Newbie with mysql Hi, I've got a question that i'm sure that it is easy to solve. I've installed mysql in Redhat Linux 7.0 and it is working fine. I've also installed PHP module so i can make PHP pages. I've tried to do a small page that connects to mysql server but this error appears: Warning: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /var/www/html/prueba.php on line 4 The code that I use for accesing the page is: $link = mysql_pconnect ('localhost','root','') I'm not sure if it is a PHP error or a MySQL server configuration problem. I didn't change anything on MySQL, so perhaps, I have to change something. Any idea? Thanks in advance. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 crashing/stopping in ABRIASOFT's installation
Hi, Could some one tell me how to find out what is wrong with the MySQL as it stops working after a minute or two on a machine running Win98SE. the Mysql is installed by the Merlin Server installer of Abriasofts. I include the report if it tells anyone anything, to me it is bit gibberish. This Report was made using the WinMySQLadmin 1.0 Tool 4.9.2001 14:27:45 Description: How-To-Repeat : Fix: Synopsis : Submitter-Id : Originator : Organization : MySQL support : [none | licence | email support | extended email support ] Severity : [non-critical | serious | critical ] Priority : [low | medium | high ] Category : [mysqld, mysql client, C, PHP, PERL, ...] Class : [ sw-bug | doc-bug | change-request | support ] OS Platform: Win 95 or Win 98 detected Machine description: Compiler : VC++ 6.0 Architecture : i686 Total Memory : 130,564 MB RAM My.ini File [mysqld] basedir=C:/OHJELMATIEDOSTOT/ABRIA MERLIN/MYSQL datadir=C:/OHJELMATIEDOSTOT/ABRIA MERLIN/MYSQL/data Server Status Values Server Info3.23.36 Host Info localhost via TCP/IP Client Info3.23.33 Proto Info 10 Aborted_clients1 Aborted_connects 0 Bytes_received 0 Bytes_sent 0 Connections5 Created_tmp_disk_tables0 Created_tmp_tables 0 Created_tmp_files 0 Delayed_insert_threads 0 Delayed_writes 0 Delayed_errors 0 Flush_commands 1 Handler_delete 0 Handler_read_first 1 Handler_read_key 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 Handler_read_rnd_next 9 Handler_update 0 Handler_write 0 Key_blocks_used0 Key_read_requests 0 Key_reads 0 Key_write_requests 0 Key_writes 0 Max_used_connections 2 Not_flushed_key_blocks 0 Not_flushed_delayed_rows 0 Open_tables3 Open_files 6 Open_streams 0 Opened_tables 8 Questions 71 Select_full_join 0 Select_full_range_join 0 Select_range 0 Select_range_check 0 Select_scan0 Slave_running OFF Slave_open_temp_tables 0 Slow_launch_threads0 Slow_queries 0 Sort_merge_passes 0 Sort_range 0 Sort_rows 0 Sort_scan 0 Table_locks_immediate 5 Table_locks_waited 0 Threads_cached 0 Threads_created4 Threads_connected 3 Threads_running1 Uptime 256 Variables Values ansi_mode OFF back_log 50 basedirc:\ohjelmatiedostot\abria merlin\mysql\ 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 concurrent_insert ON connect_timeout5 datadirc:\ohjelmatiedostot\abria merlin\mysql\data\ delay_key_writeON delayed_insert_limit 100 delayed_insert_timeout 300 delayed_queue_size 1000 flush OFF flush_time 1800 have_bdb NO have_geminiNO have_innobase NO have_isam YES have_raid NO have_ssl NO init_file interactive_timeout28800 join_buffer_size 131072 key_buffer_size8388600 language c:\ohjelmatiedostot\abria merlin\mysql\share\english\ large_files_supportON logOFF log_update OFF log_binOFF log_slave_updates OFF long_query_time10 low_priority_updates OFF lower_case_table_names 1 max_allowed_packet
User account
Hi all. I am beginner in mysql. I have installed mysql 3.23 under linux, and i want create one user for accessing to mysql. I have created the user: gestor. If i am root when i execute: mysql i recived a error message: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) How can i add a new user? Thank you for your helps. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 crashing/stopping in ABRIASOFT's installation
You are probably running MySQL version build for different Windows version. Please download and try a latest Windows binary. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
synopsis of the problem (one line)
Description: How-To-Repeat: Fix: Submitter-Id: submitter ID Originator:root 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 was 2.2.18 #1 Wed Jan 24 12:28:55 GMT 2001 i586 unknown Architecture: i586 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/i486-suse-linux/2.95.2/specs gcc version 2.95.2 19991024 (release) Compilation info: CC='gcc' CFLAGS='-O2 -m486' CXX='c++' CXXFLAGS='-O2 -m486' LDFLAGS='' LIBC: -rwxr-xr-x1 root root 1382179 Jan 19 2001 /lib/libc.so.6 -rw-r--r-x1 root root 2585872 Jan 19 2001 /usr/lib/libc.a -rw-r--r-x1 root root 178 Jan 19 2001 /usr/lib/libc.so -rw-r--r-x1 root root 851660 Jan 19 2001 /usr/lib/libc-client.a lrwxrwxrwx1 root root 19 Jul 5 19:06 /usr/lib/libc-client.so - libc-client.so.2000 -rwxr-xr-x1 root root 714876 Jan 19 2001 /usr/lib/libc-client.so.2000 Configure command: ./configure --enable-shared --enable-assembler --infodir=/usr/share/info --libdir=/usr/lib --libexecdir=/usr/sbin --localstatedir=/var/lib/mysql --mandir=/usr/share/man --prefix=/usr --sysconfdir=/etc --with-mysqld-user=mysql --without-debug --datadir=/usr/share --includedir=/usr/include --with-extra-charsets=complex --with-unix-socket-path=/var/lib/mysql/mysql.sock --without-berkeley-db - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Use of the MySQL logo - licensing agreement
Ed Carp writes: My point, and I believe Ed's point, is that I'm not clear on use of the MySQL logo in my software, printed material, etc. What concerns me is that the new logo licensing stuff is so restrictive, *anyone* who even displays the logo on a web site (powered by MySQL) has to get WRITTEN PERMISSION to do so from MySQL AB. I'm uncomfortable with that, particularly since it's free advertising for MySQL, and the way I look at it, anyone who displays the logo on their web site (except for blatantly trying to rip off MySQL in some way) is doing MySQL a favor, and it seems particularly ungrateful to the developer community to force them to jump through all kinds of hoops to do MySQL a favor. Does that make any sense? I'm not trying to slam MySQL, I'm just concerned about displaying the logo on a web site that says powered by MySQL or modifying the logo like folks used to do to produce all kinds of cool enhancements to the name MySQL. Hi Ed, Our people responsible for legal matters are trying hard to come with some better policy. A policy that would do as much as possible for MySQL community , while preventing possible abuses. As soon as our team has a policy, it will be make known to entire MySQL community. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
multithread problem
hi~ i'm trying to write a simple multithread client program on turbo linux.just to manipulate some tables in mysql.but i encounter a confusing problem. the main thread of the program is just to insert data to table A continuously which has an auto_increment field named ID. after each insertion, i use last_insert_id() to get the new ID value. At the same time,the main thread will create a thread occasionally when some conditions are met. what the new thread do is only to drop some other table B and then exit. but when the program is running, sometimes the last_insert_id() returns 0 although the corresponding insertion succeeded, sometimes the drop table query of the new thread fails,and the error message is Error: 2013 (Lost connection to MySQL server during query). what's wrong? i've heard something about mysqlclient_r or mysql thread_safe client library, do i have to use them? then how? please help please mail your reply to me: [EMAIL PROTECTED] thanks! P.S. in my program, each thread has an exclusive connection to mysql server. === TOM163 ×Ý ºá ÓÊ Á¬ »· Èý ÖØ ÉÍ µÚÒ»ÉÍ£ºÉÏÍø¿¨ºÍÓÎÏ·¹âÅÌ µÚ¶þÉÍ£ºÊÖ»úºÍÓÎÏ·¹âÅÌ µÚÈýÉÍ£ºµçÄÔ¡¢ÊýÂëÏà»ú¡¢ÊýÂëÉãÏñÍ· ÏêÇéÇëä¯ÀÀ http£ºhttp://chat.163.net/fsb/top10.html ¡ª¡ªV I P . 1 6 3 . N E T Èà Äã Ïí ÊÜ ¸ü Íê ÃÀ µÄ E-mail ·þ Îñ === - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: multithread problem
Piggy writes: hi~ i'm trying to write a simple multithread client program on turbo linux.just to manipulate some tables in mysql.but i encounter a confusing problem. the main thread of the program is just to insert data to table A continuously which has an auto_increment field named ID. after each insertion, i use last_insert_id() to get the new ID value. At the same time,the main thread will create a thread occasionally when some conditions are met. what the new thread do is only to drop some other table B and then exit. but when the program is running, sometimes the last_insert_id() returns 0 although the corresponding insertion succeeded, sometimes the drop table query of the new thread fails,and the error message is Error: 2013 (Lost connection to MySQL server during query). what's wrong? i've heard something about mysqlclient_r or mysql thread_safe client library, do i have to use them? then how? please help please mail your reply to me: [EMAIL PROTECTED] thanks! P.S. in my program, each thread has an exclusive connection to mysql server. Yes, you need to have a thread safe client. On Windows it can be built with VC++ 6.0. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
macosx install
hello, I have installed MySQL 3.23 on Mac OS X 10.0.4 . I now have to change the ownership of the newly installed MySQL databases ( /usr/local/var ) to the mysql user that I have created in NetInfo Manager , in order to start up the database system. But my system does not have the chown utility installed (for security reasons, I guess). Where can I get this utility so I can install it on my system? Is there any other way to change the ownership of these files (from root)? any other suggestions? Thanks very much for your help. Bruce Perry [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: limit and order by issuse
Thanks for quick response. Here is my query: SELECT articleId,arttitle,artsourceId,artstatus,artauthorId,arteventdate,artpre ss,artpageno,artrankId,artabstract, artfulltext,artisdisplay,arteditionId,arttypeid,artsubjectid , asubjectId,asubjectname , FLOOR((TO_DAYS(CURRENT_DATE()) - TO_DAYS(arteventdate))/365.25) as dif , atypeId, atypename, authorId, autname , sourceId, srcname ,usrfname ,usrlname from article ,asubject ,atype ,author, source left join user on user.userId = article.user where artstatus!='N' and artsourceId = sourceId and authorId = artauthorId and arttypeid = atypeId and asubjectId=artsubjectid and artauthorid=145 order by articleId desc limit 1 , 20 - When my application in php is getting data from mysql it gets some rows. And show no error. [ mysql_error() show no error] - When I run same query on phpmyadmin query prompt, it gives an error with no description. - If I remove limit portion of query, then show there is no error even on phpmyadmin. There is no syntax error in query. I am using nusphere with MySQL Version 3.23.38 and php Version 4.0.1 There must some thing wrong limit portion of query. Regards, shahzad -Original Message- From: Philip Mak [mailto:[EMAIL PROTECTED]] On Behalf Of Philip Mak Sent: Tuesday, September 04, 2001 3:25 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: limit and order by issuse On Tue, 4 Sep 2001 [EMAIL PROTECTED] wrote: I am trying to use limit and order by in the same query for paging of records. But faceing the problem that query does not return any row. After removing of limit every thing is working fine. Is it really a bug. Any solution. Going by what you have told me, I'm thinking that your LIMIT statement may be incorrect. Show us what the query you are executing is so that we can see what is happening; I don't have enough information to answer your question right now. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
3.23 and DELETRE FROM very long.
Bonjour, With 3.22 I used to do some queries like DELETE FROM TABLE. And this was very rapid as Mysql only deletes and re-create the files. I knew that DELETE was very long with InnoDB because it has to clear all the table space used by the table from which you DELETE. But I'm surprised to see that it's very long with MyISAM too ! When I do a DELETE FROM TABLE (without any where) on a big table, it takes many minutes. And if I look at the table files, while the table is empty, the files are still very big. The only way to reduce space used by the table is OPTIMIZE. Is this normal ? Is this a difference between ISAM an MyISAM ? I saw no notice about that in the documentation ... Regards, Alex. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: 3.23 and DELETRE FROM very long.
BAUMEISTER Alexandre writes: Bonjour, With 3.22 I used to do some queries like DELETE FROM TABLE. And this was very rapid as Mysql only deletes and re-create the files. I knew that DELETE was very long with InnoDB because it has to clear all the table space used by the table from which you DELETE. But I'm surprised to see that it's very long with MyISAM too ! When I do a DELETE FROM TABLE (without any where) on a big table, it takes many minutes. And if I look at the table files, while the table is empty, the files are still very big. The only way to reduce space used by the table is OPTIMIZE. Is this normal ? Is this a difference between ISAM an MyISAM ? I saw no notice about that in the documentation ... Regards, Alex. Have you tried TRUNCATE command ?? -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: limit and order by issuse (fwd)
[table sql stupid spam filter] On Tue, 4 Sep 2001, [EMAIL PROTECTED] wrote: order by articleId desc limit 1 , 20 That will cause no rows to be returned if there are less than 20 results. Use this instead: ORDER BY articleId DESC LIMIT 0, 20 It starts counting at 0 instead of 1. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: On Redhat 7.1
I guess where it can get confusing is when a stock RH7.1 install with PHP doesn't have mysql support enabled but postgresql is. To the uninformed user like me who doesn't care to know the individual RPMS in the distro it is easy to make that, obviously wrong, assumption when, by default, the php-postgres RPM is installed. On a lighter note, I am glad to know the php-mysql RPM is on the RH discs...makes future installs a tad bit easier. Sorry for causing such a stir, --Tony On Tue, 4 Sep 2001, Sinisa Milivojevic wrote: Trond Eivind Glomsrød writes: Tony Bibbs [EMAIL PROTECTED] writes: 7.1 doesn't install php with mysql support enabled. Yes, we did. FYI, redhat is doing this because postgres is no their prefered DBMS. Can't understand why they don't just compile support for both in. We do compile in support for MySQL, but it's in the php-mysql package - just as at support for PostgreSQL is in php-pgsql. -- Trond Eivind Glomsrød Red Hat, Inc. Just a small note from our side. We from MySQL have not noticed a single and slightest inclination of Red Hat towards PostgreSQL so far, when it comes to RH distros. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: On Redhat 7.1
Tony Bibbs writes: I guess where it can get confusing is when a stock RH7.1 install with PHP doesn't have mysql support enabled but postgresql is. To the uninformed user like me who doesn't care to know the individual RPMS in the distro it is easy to make that, obviously wrong, assumption when, by default, the php-postgres RPM is installed. On a lighter note, I am glad to know the php-mysql RPM is on the RH discs...makes future installs a tad bit easier. Sorry for causing such a stir, --Tony Truly, no problems. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: 3.23 and DELETRE FROM very long.
Alex, DELETE FROM yourtable now deletes individually each row when InnoDB is enabled, also for MyISAM tables. For InnoDB the reason is that a consistent read may come to read the table: dropping the table and recreating it is not acceptable if we want a consistent read to the table. I think Monty did not want to change the code, and therefore it is the same for MyISAM if InnoDB is enabled. In 4.0 the TRUNCATE command will empty the table quickly by dropping and recreating the table, both for InnoDB and MyISAM tables. Regards, Heikki BAUMEISTER Alexandre writes: Bonjour, With 3.22 I used to do some queries like DELETE FROM TABLE. And this was very rapid as Mysql only deletes and re-create the files. I knew that DELETE was very long with InnoDB because it has to clear all the table space used by the table from which you DELETE. But I'm surprised to see that it's very long with MyISAM too ! When I do a DELETE FROM TABLE (without any where) on a big table, it takes many minutes. And if I look at the table files, while the table is empty, the files are still very big. The only way to reduce space used by the table is OPTIMIZE. Is this normal ? Is this a difference between ISAM an MyISAM ? I saw no notice about that in the documentation ... Regards, Alex. Have you tried TRUNCATE command ?? -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com --- - - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Query Question
I'm doing a query like: select Title from inv where Title LIKE '%TOMMY%' OR Content LIKE '%TOMMY%' OR Notes LIKE '%TOMMY%' order by Title What I need is to have the results that match Title LIKE '%TOMMY%' to appear first and then the rest. I have been doing 2 separate queries and filtering the first results from the second in a script. I would like to do this with a single query. Can that be done? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 Data problem...
ISD and ISM files are not portable across platforms. THe proper way to transfer these files is to mysqldump the database, and run the output through mysql on the target machine. MYD and MYI files, however are platform independant. You could also convert to this format before copying to a new machine. Brian E. Lozier wrote: Well I made quite the mistake and I'm hoping someone can help me out! I had a RH Linux 6.1 box running MySQL (not exactly sure what version anymore). I took all the files from the mysql/data directory and backed them up. Then I wiped the server and installed FreeBSD. I then installed the latest version of MySQL. I then dropped all the backup files into the mysql/data directory on the new machine. Surprise, surprise - only the table definitions and some random data was extracted from the files (not the full database). The old files are *.frm, *.ISD, and *.ISM; the new files are *.frm, *.MYD, and *.MYI if that makes a difference. So I then installed MySQL on my windows box and am having the same problems (was going to do a mysqldump if it worked). However, I can open up the files and SEE the data I want to get to with a text editor (garbled but it's there). I'm wondering, is there any possible way to get this data out of these files? It's very important :( The only other option I see is re-installing RH Linux 6.1, trying to figure out which version of MySQL I had installed, installing it, then trying a dump on the data (if it works). I really, really hope I don't have to do that. Thanks in advance to anyone who can help me out! Brian The Massassi Temple http://www.massassi.net/ How should I know if it works? That's what beta testers are for. I only coded it. - Linus Torvalds - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Gerald L. Clark [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: Query Question
hi. select Title, IF(Title LIKE %TOMMY%, 1, 0) as check from inv where... ... order by check desc; hth. -ravi. -Original Message- From: Carl Schrader [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 04, 2001 10:30 AM To: [EMAIL PROTECTED] Subject: Query Question I'm doing a query like: select Title from inv where Title LIKE '%TOMMY%' OR Content LIKE '%TOMMY%' OR Notes LIKE '%TOMMY%' order by Title What I need is to have the results that match Title LIKE '%TOMMY%' to appear first and then the rest. I have been doing 2 separate queries and filtering the first results from the second in a script. I would like to do this with a single query. Can that be done? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: On Redhat 7.1
Tony Bibbs [EMAIL PROTECTED] writes: I guess where it can get confusing is when a stock RH7.1 install with PHP doesn't have mysql support enabled but postgresql is. That depends on what you install. MySQL isn't (like many other packages) in any of the premade installation categories - you can select it in a custom install, or do a everything install. To the uninformed user like me who doesn't care to know the individual RPMS in the distro it is easy to make that, obviously wrong, assumption when, by default, the php-postgres RPM is installed. It's not installed by default either, but if you select both the postgresql and the web server components you'll get it. -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL and Crypto
Hi Everyone.. I've been doing a little bit of work on the intersection of crypto and databases. MySQL is my favorite database, of course, but I've always been a user rather than a developer. My current project involves authenticating a user to mysqld using a smart card. I did a google search and about the only thing I could find were references to using a PHP encryption module to encrypt data that was then inserted into a table. So, I have a brief RFI... Anyone ever looked at any of the following? Interfacing MySQL with standard crypto libraries: BSAFE, BDANGEROUS, CRYPTIX, CRYPTLIB, CRYPTO++, or even PAM? Using smart cards or other cryptographic tokens to authenticate end users to the database? Using crypto coprocessors with key management features to authenticate remote applications. Using any crypto library or hardware to add non-repudiation and/or confidentiality of log file entries. Using any crypto library or hardware to encrypt data in a database. I'm going to be working on this for the next couple of months. Some of this work may evolve into work for hire, but the things I discover outside of the work for hire I'll probably post to my web site at http://www.cryptonomicon.net/users/mhamrick/ . I'm sending this message simply to see if anyone else has worked on this. If so, what got done? What didn't get done? -Sincerely, -Matt Hamrick [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
--log-update to tape drive?
Hi all, Is it possible to use a tape drive (/dev/ht0 in my case) as the destination for mysql logging? MySQL manual only mentions outputting to disk file. Example: % safe-mysqld --log-update= tar -czvf /dev/ht0/mysql-update.log I've tried the above with the following error in the error log: Could not use tar -czvf /dev/ht0/mysql-update.log for logging (error 2) Any comments are appreciated. Nick - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Error Installing mysql...
Hi, I'm trying to install the mysql for Compaq Tru64 Unix 4.0f. I did the download of file mysql-3.23.41.tar # ./configure. # make ... ... + rm -f ./typelib.c + /sbin/ln -s ../libmysql/typelib.c ./typelib.c + rm -f ./violite.c + /sbin/ln -s ../libmysql/violite.c ./violite.c echo timestamp linked_libmysql_r_sources make all-recursive No suffix list. Making all in include No suffix list. Make: % rule can only use a single ':'. Stop. *** Exit 1 Stop. *** Exit 1 Stop. # What can i do ??? Can anyboy help me ??? Thank advanced. ** Carlos Augusto Perez Lima System Administrator Bioinformatic Milenia Biotecnologia Genética. Phone: (55) 43-371-9302 Street: Pedro Antonio de Souza, 405. Fax: (55) 43-371-9011. 86031-610 - Londrina, Pr - Brazil.mailto:[EMAIL PROTECTED] http://www.milenia.com.br http://www.bioinformatic.cjb.net ** - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: On Redhat 7.1
That depends on what you install. MySQL isn't (like many other packages) in any of the premade installation categories - you can select it in a custom install, or do a everything install. I bet a product like Data Architect ( http://www.codebydesign.com ) would be a great fit in this distro? It supports all features of MySQL... table options... column types and options... etc. Peter -- +--- | Data Architect | your data; how you want it | http://www.codebydesign.com +--- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: limit and order by issuse
I see... if adding ORDER BY articleId DESC LIMIT 0, 20 causes a query to start returning 0 rows, then that sounds like something is wrong. Try using the REPAIR TABLE command on all your tables from inside MySQL, e.g.: REPAIR TABLE article; REPAIR TABLE asubject; REPAIR TABLE atype; REPAIR TABLE author; REPAIR TABLE source; REPAIR TABLE user; If there is corruption in the tables, that might be causing the problem. Other than that, I am out of ideas... On Tue, 4 Sep 2001, [EMAIL PROTECTED] wrote: Use this instead: ORDER BY articleId DESC LIMIT 0, 20 That is not a problem as first parameter is just offset. But I have also tested with 0, but still the same problem. Secondly even if the no. of rows returned are greater then 20 there is a same error message , while running from phpadmin. Have you ever faced this problem , with order by and limit? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: On Redhat 7.1
Peter Harvey [EMAIL PROTECTED] writes: That depends on what you install. MySQL isn't (like many other packages) in any of the premade installation categories - you can select it in a custom install, or do a everything install. I bet a product like Data Architect ( http://www.codebydesign.com ) would be a great fit in this distro? It supports all features of MySQL... table options... column types and options... etc. Looks interesting, as it supports PostgreSQL, MySQL and ODBC. We're not adding packages right now, but I've bookmarked it. Didn't find anything about licensing and such, though. -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MyODBC, DBUG and multi-threaded clients
Hi Sinisa, Sinisa Milivojevic wrote: Peter Duffy writes: Hi Sinisa, Do you know of any which are specifically accessed by multi-threaded client applications via ODBC? (If so, I'd really like to know, so that I can try to get hold of copies of the client applications to test in my own environment.) As you very well know, it is completely irrelevant what kind of multi-threaded program it is. Those function perform the same regardless if programs listents to the socket or write to the socket. DBUG functions have got nothing to do with that. My problems are within the mysqlclient and MyODBC libraries, both used directly by the application (and therefore all on the client side of the socket.) Both the mysqlclient and MyODBC libraries do (or in my case did) contain calls to the DBUG functions. Obviously, given the fact that the libraries are being called directly by the application, the amount of multi-threading done by the application is most emphatically relevant. There are many such programs utilizing DBUG functions, like mysqlmanagers in tool directory of 4.0. Then several GUI clients. Practically dozens of them. Some of those GUI clients utilizing ODBC. Do some research on your side. I have no interest in any other clients except possibly to investigate whether or not they produced anything like the same behaviour that I am observing with my own application. My only key objective is to fix my application, which, to repeat again, is coredumping during calls to DBUG functions within the mysqlclient and MyODBC libraries. Regards, 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
Re: --log-update to tape drive?
At 11:16 AM -0400 9/4/01, Nick Willey wrote: Hi all, Is it possible to use a tape drive (/dev/ht0 in my case) as the destination for mysql logging? MySQL manual only mentions outputting to disk file. Example: % safe-mysqld --log-update= tar -czvf /dev/ht0/mysql-update.log I've tried the above with the following error in the error log: Could not use tar -czvf /dev/ht0/mysql-update.log for logging (error 2) Any comments are appreciated. Your command doesn't actually match your stated intent, because it doesn't actually log to a tape drive. It logs to another program, which isn't supported. It would probably work if you logged directly to the tape device, although that won't write a compressed log. But if your drive has hardware compression, that might not matter. Otherwise, you might try rotating the log every now and then, and then using another program to write the log to tape after a new log file has been started. Nick -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Berkeley or InnoDB?
On Fri, 31 Aug 2001, Ary Medeiros wrote: I'm porting an application to MySQL and I need to support transactions. I will appreciate so much if someone could give me some impressions about which one is better. BerkeleyDB or InnoDB? I have to agree with the other poster on this. When I first compared the two, I found that on our tables (with relatively small rows, less than 60 bytes per), performance started to drop off rapidly after 10,000 rows, and was horrible (1/10th the speed of InnoDB) by the time we reached 100,000 rows. Since our application was to have millions of rows and needed transaction support, we went with InnoDB. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Query Question
Close. Now I need to get the order correct. I need the order like Tommy Tommy Lee Baseball(matched with Tommy in the Content or Notes field) World Series (matched with Tommy in the Content or Notes field) I've been playing with something like: select Title, concat(IF(Title LIKE %TOMMY%, 1, 0),LPAD(90-ASCII(left (Title,1)),2,'0')) as check from inv where (Title LIKE 'tommy%') OR (Content LIKE '%tommy%') OR (Notes LIKE '% tommy%') order by check desc but that doesn't get it close enough. Only compares the frist char in Title. I need a more robost idea... Ravi Raman wrote: hi. select Title, IF(Title LIKE %TOMMY%, 1, 0) as check from inv where... ... order by check desc; hth. -ravi. -Original Message- From: Carl Schrader [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 04, 2001 10:30 AM To: [EMAIL PROTECTED] Subject: Query Question I'm doing a query like: select Title from inv where Title LIKE '%TOMMY%' OR Content LIKE '%TOMMY%' OR Notes LIKE '%TOMMY%' order by Title What I need is to have the results that match Title LIKE '%TOMMY%' to appear first and then the rest. I have been doing 2 separate queries and filtering the first results from the second in a script. I would like to do this with a single query. Can that be done? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Query Question
if i'm understanding what you mean, it seems like you're getting a little too complicated. select Title, IF(Title LIKE %TOMMY%, 1, 0) as check from inv where... ... order by check desc, Title this will return rows like this: +-+---+ | title | check | +-+---+ | a | 1 | | b | 1 | | c | 1 | | w | 1 | | z | 1 | | a | 0 | | h | 0 | | z | 0 | +-+---+ i.e. each subset (check=1 and check=0) sorted alphabetically. -ravi. -Original Message- From: Carl Schrader [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 04, 2001 12:13 PM To: Ravi Raman Cc: [EMAIL PROTECTED] Subject: Re: Query Question Close. Now I need to get the order correct. I need the order like Tommy Tommy Lee Baseball(matched with Tommy in the Content or Notes field) World Series (matched with Tommy in the Content or Notes field) I've been playing with something like: select Title, concat(IF(Title LIKE %TOMMY%, 1, 0),LPAD(90-ASCII(left (Title,1)),2,'0')) as check from inv where (Title LIKE 'tommy%') OR (Content LIKE '%tommy%') OR (Notes LIKE '% tommy%') order by check desc but that doesn't get it close enough. Only compares the frist char in Title. I need a more robost idea... Ravi Raman wrote: hi. select Title, IF(Title LIKE %TOMMY%, 1, 0) as check from inv where... ... order by check desc; hth. -ravi. -Original Message- From: Carl Schrader [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 04, 2001 10:30 AM To: [EMAIL PROTECTED] Subject: Query Question I'm doing a query like: select Title from inv where Title LIKE '%TOMMY%' OR Content LIKE '%TOMMY%' OR Notes LIKE '%TOMMY%' order by Title What I need is to have the results that match Title LIKE '%TOMMY%' to appear first and then the rest. I have been doing 2 separate queries and filtering the first results from the second in a script. I would like to do this with a single query. Can that be done? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: weird error that I have not encountered in 2 years
I'll bet somebody did a cat afile /usr/local/mysql/bin/mysql instead of cat afile | /usr/local/mysql/bin/mysql That is why you should not be doing stuff as root. s . keeling wrote: On Sat, Sep 01, 2001 at 04:43:25AM +0100, christopher sagayam wrote: so how to fix the error ? How did file /usr/local/mysql/bin/mysql become a text file ? You tell us. Regardless, is your data still intact? Make sure it's safe, rip out mysql, and re-install. Binaries don't just become text files by themselves. This takes human intervention in one way or another. How secure is your network? Have you checked your system for intrusions? How many people have access to your system? What's their level of skill on the system? If you still have your data files, all may not be lost. -- Gerald L. Clark [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: macosx install
At 8:47 AM -0400 9/4/01, Bruce W. Perry wrote: hello, I have installed MySQL 3.23 on Mac OS X 10.0.4 . I now have to change the ownership of the newly installed MySQL databases ( /usr/local/var ) to the mysql user that I have created in NetInfo Manager , in order to start up the database system. But my system does not have the chown utility installed (for security reasons, I guess). Where can I get this utility so I can install it on my system? Is there any other way to change the ownership of these files (from root)? any other suggestions? Thanks very much for your help. Bruce Perry [EMAIL PROTECTED] Are you sure it's not installed? Maybe you just don't have /usr/sbin in your PATH setting (chown is /usr/sbin/chown). -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Query Question (fwd)
MYSQL DATABASE BLA BLA BLA (I really hate that filter) Ravi Raman writes: if i'm understanding what you mean, it seems like you're getting a little too complicated. select Title, IF(Title LIKE %TOMMY%, 1, 0) as check from inv where... ... order by check desc, Title Even simpler would be SELECT Title FROM ... ORDER BY !!LOCATION(Title, 'Tommy'), Title although I don't know if it would be any faster. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Complex Query Question
This question involves table setup questions as much as it involves a query question. Bare with me, this seems hard to explain. I have a table that includes records with 3 (relevant to this conversation) fields (actually 9..more on that later). Each of those fields have 2 other related fields. i.e.. Field Special 1 has a related field with a Start Date and another field for End date. Field Special 2 has a related field with a Start Date and another field for End date. Field Special 3 has a related field with a Start Date and another field for End date. I will probably need to add up to 3 other fields to keep track of the last shown date. Anyhow, I need to build a query that will return 5-10 Specials. I want to output this very much like an ad banner query would. That is to say, I need to keep track of the last one that was shown and output the next one. What complicates this is that there are UP TO to 3 specials per record. Some of them may not include any specials at all. Some may have 1 or 2. Special 1 should be shown before Special 2. etc. Only 1 Special from each record should be output. i.e.. Special 1 and Special 2 shouldn't be output from record #1. (Actually I would like to have that occur if there are not 5-10 other results.. but I can live without that..) The question: Is there anyway I build a single query to accomplish this? Since this is in the early design mode, I can add/delete any current fields and build it differently as needed. Alternately, I could just randomly output 1 special from each record that has one..I'd prefer the other method though... I just need some advice from some people who are more fluent in sql :) TIA! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LOAD DATA into multiple tables?
Hello all, I'm new to the list... Been using MySQL for various things for a year now, but have never ran into the following situation... I have a flat text file that I have exported from FileMaker Pro. I want to import that into MySQL, but there's a catch... There are two tables I am trying to load, and some of the columns need to go into each... Is there a way to do this with a single LOAD DATA INFILE statement? The reason I want to do it all at once and not in multiple files is because I have auto_increment columns in each for a primary key. I want to make sure the two tables key columns dont get out of sync with each other. Is there a way to load multiple tables with a single LOAD DATA statement? Thanks, Brad - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
UNICODE Support
Does anyone have an idea when MySQL will support Unicode? I know the documentation says near future, but is that the next release or later? Thanks, Scott - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
FULLTEXT search - another question
Hi, Thanks to all who responded to my previous question on how to get the FULLTEXT search to consider hyphens as part of a word. Now my question is, Is there a way to allow other special characters to be part of a 'word'? For example, we have the word +x-axis as part of a short description varchar column, and we would want the plus sign to be a significant part of the word, since we don't want to find to be just on x-axis. Is there a way to change the word definitions, or am I going to have to add a [ ... like %+x-axis% ] to my query? Thanks, Marty - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Replication problems involving time
Also my master.info ends up being wrong whenever the server is rebooted. (binlog.100 becomes binlog.100\n). Can you expand on that problem a bit? When I do a show slave status before a reboot I have this: +-+-+-+---+-+--+---+-+-+ | Master_Host | Master_User | Master_Port | Connect_retry | Log_File| Pos | Slave_Running | Replicate_do_db | Replicate_ignore_db | +-+-+-+---+-+--+---+-+-+ | db_server | repl| 3306| 0 | db1-bin.200 | 18378935 | Yes | | | +-+-+-+---+-+--+---+-+-+ After a reboot I will have something like this: +-+-+-+---+-+--+---+-+-+ | Master_Host | Master_User | Master_Port | Connect_retry | Log_File| Pos | Slave_Running | Replicate_do_db | Replicate_ignore_db | +-+-+-+---+-+--+---+-+-+ | db_server | repl| 3306| 0 | db1-bin.200 | 18378935 | Yes | | | +-+-+-+---+-+--+---+-+-+ And it will not replicate because it has a carriage return after the file name, and says it cannot find the file. Mike sql,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
Trouble w/MySQL Server
Well, I've fixed the problem with mysqld.exe and innodb, but the server wont connect with my ASP pages. Any ideas? Go to my web site and try to log in to get a better understanding of what I mean. This always comes up:: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [TCX][MyODBC]Can't connect to MySQL server on '24.254.141.32' (10061) /members/admin/login-action.asp, line 66 If you have something help me please!!! - Deryck H - http://www.comp-u-exchange.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Trouble w/MySQL Server
- Original Message - From: Deryck Henson [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Sent: Tuesday, September 04, 2001 10:54 AM Subject: Trouble w/MySQL Server Well, I've fixed the problem with mysqld.exe and innodb, but the server wont connect with my ASP pages. Any ideas? Go to my web site and try to log in to get a better understanding of what I mean. This always comes up:: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [TCX][MyODBC]Can't connect to MySQL server on '24.254.141.32' (10061) /members/admin/login-action.asp, line 66 For a problem like this, it never hurts to include the code that the error is referring to. Dennis - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: FULLTEXT search with hyphens in data
Just a thought - if your serial numbers have fixed format, then programmatically remove the hyphen and store the number without it. Add it back when displaying data on the screen. That way FULLTEXT will work on the whole number without splitting it into two parts. Vadim. Marty McCoy wrote: Hi, I'm performing a FULLTEXT search against varchar columns of one of our tables. One of our columns contains embedded serial numbers such as 02-123456 and 04-234567. The problem that when I do a FULLTEXT search against 02-123456, it brings back results with the following values: ... 99-123456 ... ... 01-123456 ... ... 02-123456 ... ... 05-123456 ... etc. First of all, I would like it only to bring back the exact match. But what's even more puzzling to me is that I would expect that the record containing the 02-123456 would have a higher MATCH value than the rest, since it matched 'exactly' and the others only partially matched. But often times other serial numbers have higher MATCH values than the exact one. I'm assuming that the hyphen is messing up the search, that it, it's using it as a word delimiter or something like that. Is there a way to escape the hyphen, that is, make it a significant part of the search? Is there something that I could edit in myisam/ftdefs.h (or somewhere else) that would do what I would like? Thanks, Marty - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
reset root password error
Following the manual at http://www.mysql.com/doc/R/e/Resetting_permissions.html, I still get the following error: # mysqladmin -h 127.0.0.1 -u root password 'newpass' mysqladmin: unable to change password; error: 'You must have privileges to update tables in the mysql database to be able to change passwords for others' Can anyone help with this error? A search through the mail archives and google yield nothing. The system is a OpenBSD 2.9 running mysql: # /usr/local/libexec/mysqld -V /usr/local/libexec/mysqld Ver 3.23.37 for unknown-openbsd2.9 on i386 Thanks for your help, -Chad - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: macosx install
Thanks for all the prompt answers to my question. I logged in as root then was able to use chown ; later found that chown wasn't in my PATH setting . thanks again, Bruce -Original Message- From: Paul DuBois [EMAIL PROTECTED] To: Bruce W. Perry [EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Tuesday, September 04, 2001 12:46 PM Subject: Re: macosx install At 8:47 AM -0400 9/4/01, Bruce W. Perry wrote: hello, I have installed MySQL 3.23 on Mac OS X 10.0.4 . I now have to change the ownership of the newly installed MySQL databases ( /usr/local/var ) to the mysql user that I have created in NetInfo Manager , in order to start up the database system. But my system does not have the chown utility installed (for security reasons, I guess). Where can I get this utility so I can install it on my system? Is there any other way to change the ownership of these files (from root)? any other suggestions? Thanks very much for your help. Bruce Perry [EMAIL PROTECTED] Are you sure it's not installed? Maybe you just don't have /usr/sbin in your PATH setting (chown is /usr/sbin/chown). -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Complex Query Question
Carl Schrader wrote: Field Special 1 has a related field with a Start Date and another field for End date. Field Special 2 has a related field with a Start Date and another field for End date. Field Special 3 has a related field with a Start Date and another field for End date. IMNSHO, Any time you have a design like this where you have somedata_1, somedata_2, etc., it much better to change it so that the columns appear in a long table and add an extra column e.g. special_num. In your case: special_num tinyint UNSIGNED, start_date date, end_date date, special char(255), etc.. 1) This makes it easy to add more specials without doing an alter table. 2) You can get the same output as your original design by doing self joins: SELECT T1.special AS special_1, T2.special AS special_2, etc. FROM table T1, table T2 WHERE T1.special_num=1 AND T2.special_num=2 AND etc.. I will probably need to add up to 3 other fields to keep track of the last shown date. Add a field to the above table. one. What complicates this is that there are UP TO to 3 specials per record. Some of them may not include any specials at all. Some may have 1 or 2. Special 1 should be shown before Special 2. etc. Only 1 Special [snip] If you have a master table with specials, you can do a left join to get records where there are no specials. You can set up some sort of linkage between the main table an the specials, eg. an auto_increment field in the main table or perhaps a part number, etc.. --Bill Adams - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
In Need of...
Hello, This message is being sent to you because you either sent / or requested this information from me. We are offering a full or part-time position using our program. You can work at home. I do require that you have a computer and are familar with internet/email functions. As to the salary, that is totally up to you, as you will be running your own business. The sky is the limit! What you will see represents a totally legal money making business that anyone can do. You will receive full instructions, and we will always be available to help you and answer your questions. This is a genuine home business. This is not a chain letter, money game, telecom scheme, or any of the multitudes of dubious business offers that come through your emailbox. This business will generate an income of $2,000 to $6,000 every month with a part-time commitment. We do not make promises that we cannot keep so that is why we GUARANTEE that you will make money with our program. If the above opportunity interestes you in the least, and you would like more information about our business, please contact our customer service department at [EMAIL PROTECTED] and type Send Info in the subject line. Insert your name with your correct email address. We are successful ONLY if YOU are successful, and therefore we will do everything in our power to ensure that your relationship with us is a profitable and successful one. We look forward to your response. Best Reguards, Customer Service JH Marketing [EMAIL PROTECTED] This message is being sent in compliance with the new e-mail bill: Section 301. Per section 301, paragraph (a)(2)(c) of S. 1618, http://www.senate.gov/ ~murkowski/commercialemail/S771index.html Further transmissions to you by the sender of this email may be stopped at no cost to you by sending a reply to this email address with the word remove in the subject line. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LOAD DATA into multiple tables?
Hello all, I'm new to the list... Been using MySQL for various things for a year now, but have never ran into the following situation... I have a flat text file that I have exported from FileMaker Pro. I want to import that into MySQL, but there's a catch... There are two tables I am trying to load, and some of the columns need to go into each... Is there a way to do this with a single LOAD DATA INFILE statement? The reason I want to do it all at once and not in multiple files is because I have auto_increment columns in each for a primary key. I want to make sure the two tables key columns dont get out of sync with each other. Is there a way to load multiple tables with a single LOAD DATA statement? Thanks, Brad - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
LOAD DATA INFILE Question
I have a text file with around 25 fields but I only want 5 of them. They are not the first 5 fields that I want. Is there a way to skip fields using LOAD DATA INFILE so I don't have to build a 25 field table and then cut it down? Thanks, Curtis - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 quota???
I am trying to load number of records into a database on a remote server. For some reason, the loading always stops after about 500K records (538,328 to be precise). So, now I have a table with that many records. At the mysql prompt, I try to insert a single, simple record, and it just hangs. Nothing happens. Any ideas? Is there a quota set on table sizes for non-root users? Is this an indexing problem? Thanks, Brett Brett R. Gordon B.S. Information Systems and Economics Masters of Information Systems Management Heinz School of Public Policy and Management Carnegie Mellon University All great truths start as blaspheme -George Bernard Shaw - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Trouble w/MySQL Server
OK. Here are lines in between 60-70 about:: % Dim CheckUser set CheckUser = Server.CreateObject(ADODB.Recordset) CheckUser.ActiveConnection = dbpath CheckUser.Source = SELECT * FROM Members WHERE Username = ' + Replace(CheckUser__myuser, ', '') + ' AND Confirmed = TRUE CheckUser.CursorType = 0 CheckUser.CursorLocation = 2 CheckUser.LockType = 3 CheckUser.Open % - Deryck H - http://www.comp-u-exchange.com - Original Message - From: Dennis Salguero [EMAIL PROTECTED] To: Deryck Henson [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED] Sent: Tuesday, September 04, 2001 1:04 PM Subject: Re: Trouble w/MySQL Server - Original Message - From: Deryck Henson [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Sent: Tuesday, September 04, 2001 10:54 AM Subject: Trouble w/MySQL Server Well, I've fixed the problem with mysqld.exe and innodb, but the server wont connect with my ASP pages. Any ideas? Go to my web site and try to log in to get a better understanding of what I mean. This always comes up:: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [TCX][MyODBC]Can't connect to MySQL server on '24.254.141.32' (10061) /members/admin/login-action.asp, line 66 For a problem like this, it never hurts to include the code that the error is referring to. Dennis - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: LOAD DATA INFILE Question
On Tue, 4 Sep 2001, Curtis Spencer wrote: I have a text file with around 25 fields but I only want 5 of them. They are not the first 5 fields that I want. Is there a way to skip fields using LOAD DATA INFILE so I don't have to build a 25 field table and then cut it down? Read the manual for LOAD DATA INFILE; look at the part where it says IGNORE. You can tell it to IGNORE the first 5 lines. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Trouble w/MySQL Server
)-Original Message- )From: Deryck Henson [mailto:[EMAIL PROTECTED]] )Sent: Tuesday, September 04, 2001 10:54 AM )To: MySQL )Subject: Trouble w/MySQL Server ) ) )Well, I've fixed the problem with mysqld.exe and innodb, but the )server wont )connect with my ASP pages. Any ideas? Go to my web site and try to log in )to get a better understanding of what I mean. This always comes up:: ) ) )Microsoft OLE DB Provider for ODBC Drivers error '80004005' ) )[TCX][MyODBC]Can't connect to MySQL server on '24.254.141.32' (10061) ) This error message says that, the driver is not able to find the specified host. This means either your DNS is not working or some thing with your internet connection. Did you tried pinging to the above host (mysql1.eohub.com)? Once you are able to ping it to this server means, your application will defiantly will connect to the server (if it is running, then driver will issue a different error ..). Also just to make sure whether the MySQL server is running or not, telnet to the above host with the port number to which the server is running. For example if it 3306 then telnet 24.254.141.32 3306, should connect and display the version of the server. Regards, Venu -- For technical support contracts, go to https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Venu mailto:[EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer /_/ /_/\_, /___/\___\_\___/ Woodside, California USA ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Grants question..
Hello, I recently started using MySQL on FreeBSD. Everything works great, except that I can't access a database created by root as another user. When I grant privileges, from the command line or phpmyadmin, things seem to work fine (no error message), but access is still denied. I did restart MySQL after granting rights. The manual and book by Dubois did not provide me with an answer. Obviousely I am overlooking something...? Thanks a lot, sincerely, Gil. -- ICQ:3310801 PGP Public Key at: http://keskydee.com/gil.asc - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Novice Data Import Question
I am just getting my feet wet in PHP and MySQL. I'm using PHPMyAdmin to administer my databases online, and I'm having trouble importing data from a textfile over the Internet. It imports one record perfectly and then stops. It gives me no errors. I have checked access privileges, and indeed I have full privileges. I would appreciate any help I can get. Thanks, Rookie Jay Witherspoon - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LOAD DATA INFILE Question
At 12:45 PM -0700 9/4/01, Curtis Spencer wrote: I have a text file with around 25 fields but I only want 5 of them. They are not the first 5 fields that I want. Is there a way to skip fields using LOAD DATA INFILE so I don't have to build a 25 field table and then cut it down? Thanks, Curtis No. You can write a short program that strips out the extraneous columns. Or, depending on what platform you're using and the format of your data, you may be able to use a standard utility (such as cut on Unix). What kind of machine are you using? -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysqld/FreeBSD 4.3 stuck in kernel
Hello Sir, I will delete most of your original message for brevity (to save bandwidth). I do have a couple of suggestions, first is too back off the optimzation (-O3 ) that you used to compile MySQL (probably in make.conf) go with just -O. On an Idle system here kdump gives me a call 'clock_gettime' and another poll I do not see in you trace! Poll seems to returns 0 on mine. IE: 38554 mysqld 0.19 RET clock_gettime 0 38554 mysqld 0.28 CALL poll(0x82c1000,0x2,0) 38554 mysqld 0.22 RET poll 0 38554 mysqld 0.12 CALL poll(0x82c1000,0x3,0x2719) 38554 mysqld 10.010271 RET poll 0 38554 mysqld 0.57 CALL gettimeofday(0x283799e8,0) 38554 mysqld 0.14 RET gettimeofday 0 38554 mysqld 0.58 CALL clock_gettime(0,0xbfafefa4) 38554 mysqld 0.15 RET clock_gettime 0 38554 mysqld 0.23 CALL poll(0x82c1000,0x2,0) 38554 mysqld 0.16 RET poll 0 38554 mysqld 0.11 CALL poll(0x82c1000,0x3,0x2710) Your return of Poll 1 seems to indicated that there is a descriptor ready to be serviced (hence the going in continuosly) but that the daemon does not seem to be able to complete the servicing of that descriptor. I am not sure why your daemon skips 'clock_gettime'. Maybe a mysql programmer could help with this. I have heard of this happening on some systems randomly, it does not happen to me. I was also wondering how much RAM you had, I hope it is about 2 gig becuase you have you buffers set very large. Did you think to look at systat to see how much free memory you had during this condition? I assume also that you have restarted the daemon to get it back on track. Also, I noted in the stats you sent that there were 145 connections and 2 running queries, what were the queries? Was there some process locked up? 'mysqladmin processlist' would show if anything funky was going on with an individual process. Has this only occured once? If not how often? Can you reproduce at will? The information you provided was excellent, but I am not sure this will be easy to find. Ken - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 03, 2001 10:46 PM Subject: Mysqld/FreeBSD 4.3 stuck in kernel Description: This busy mysql server will run well for about one week, with 95% idle cpu. Then at some point it will get stuck, so that it is still very responsive, but cpu utilization changes to 95% system cpu and 0% idle cpu. When the server is in this condition and I use the ktrace utility to trace system calls, the output of ktrace consists of about 44% calls to poll() and 44% calls to gettimeofday(), in a pattern like this: bash-2.05# kdump -Rf ktrace.stuck | more [...] 45689 mysqld 0.11 CALL gettimeofday(0x821ae28,0) 45689 mysqld 0.14 RET gettimeofday 0 45689 mysqld 0.24 CALL poll(0x827,0x92,0x4c) 45689 mysqld 0.41 RET poll 1 45689 mysqld 0.10 CALL gettimeofday(0x821ae28,0) 45689 mysqld 0.15 RET gettimeofday 0 45689 mysqld 0.24 CALL poll(0x827,0x92,0x4c) 45689 mysqld 0.41 RET poll 1 A ktrace of a normal server, in comparison, contains less than 1% each of gettimeofday() and poll(). --much cut see original post GCC: Using builtin specs. gcc version 2.95.3 [FreeBSD] 20010315 (release) Compilation info: CC='gcc' CFLAGS='-O3 -mpentiumpro' CXX='gcc' CXXFLAGS='-O3 -mpentiumpro -felide-constructors -fno-exceptions -fno-r tti' LDFLAGS='' LIBC: -r--r--r-- 1 root wheel 1174570 Apr 21 02:05 /usr/lib/libc.a lrwxrwxrwx 1 root wheel 9 Jun 27 20:55 /usr/lib/libc.so - libc.so.4 -r--r--r-- 1 root wheel 561580 Apr 21 02:05 /usr/lib/libc.so.4 Configure command: ./configure --with-mysqld-user=mysql --enable-assembler --with-commen t --with-berkeley-db --localstatedir=/var/mysql --with-mysqld-ldflags= -all-static --disable-shared --with-gnu-ld --with-charset=latin1 Perl: This is perl, version 5.005_03 built for i386-freebsd - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Identifying redundant data entries
Hello, I successfully populated a single column in a new table with a text file I had using LOAD DATA INFILE command. I know that there are redundant entries in the list that I would like to eliminate. I would like some help designing a query to identify redundant entries and then to delete them. If there is not an option to delete the extraneous entries then I can use a DELETE { } WHERE { } query. Thank you, Daniel Greenwood - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Novice Data Import Question
One problem might be if you are uploading it from a windows machine where the lines are terminated by '\r\n' rather than a normal unix type '\n'. I am not familiar with PHPMyAdmin so I am unsure whether or not it accounts for that in the parsing of the file. Curtis -Original Message- From: X [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 04, 2001 1:13 PM To: [EMAIL PROTECTED] Subject: Novice Data Import Question I am just getting my feet wet in PHP and MySQL. I'm using PHPMyAdmin to administer my databases online, and I'm having trouble importing data from a textfile over the Internet. It imports one record perfectly and then stops. It gives me no errors. I have checked access privileges, and indeed I have full privileges. I would appreciate any help I can get. Thanks, Rookie Jay Witherspoon - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
Problems when communicating with php
Hello all, I am trying to integrate the mysql with php. As I am using the Red Hat 7.0, I know that they come pre-installed and pre-configured. When i created test.php with the ?php phpinfo() ? line, the page shows that the php is able to recognize mysql. I created a small table 'namelist' in a database named 'newone'. I am trying to read the table through a php file. Here is the simple php page that i have created for this purpose. html head titleName List/title /head body ?php $db=mysql_connect (localhost,myname,mypassword); mysql_select_db (newone,$db); $result = mysql_query (select * from namelist); printf (First Name: %sbr\n, mysql_result($result, 0, firstname)); printf (Last Name: %sbr\n, mysql_result($result, 0, lastname)); ? /body /html It is producing the following bunch of errors. Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /var/www/html/namelist.php on line 7 Warning: Supplied argument is not a valid MySQL-Link resource in /var/www/html/namelist.php on line 8 Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /var/www/html/namelist.php on line 9 Warning: MySQL: A link to the server could not be established in /var/www/html/namelist.php on line 9 Warning: Supplied argument is not a valid MySQL result resource in /var/www/html/namelist.php on line 10 First Name: Warning: Supplied argument is not a valid MySQL result resource in /var/www/html/namelist.php on line 11 Last Name: Can any one tell me why is it producing these errors. TIA __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Trouble w/MySQL Server
One problem:: Im new and dont know how to ping there. Help!!! - Deryck H - http://www.comp-u-exchange.com - Original Message - From: Venu [EMAIL PROTECTED] To: Deryck Henson [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED] Sent: Tuesday, September 04, 2001 3:09 PM Subject: RE: Trouble w/MySQL Server )-Original Message- )From: Deryck Henson [mailto:[EMAIL PROTECTED]] )Sent: Tuesday, September 04, 2001 10:54 AM )To: MySQL )Subject: Trouble w/MySQL Server ) ) )Well, I've fixed the problem with mysqld.exe and innodb, but the )server wont )connect with my ASP pages. Any ideas? Go to my web site and try to log in )to get a better understanding of what I mean. This always comes up:: ) ) )Microsoft OLE DB Provider for ODBC Drivers error '80004005' ) )[TCX][MyODBC]Can't connect to MySQL server on '24.254.141.32' (10061) ) This error message says that, the driver is not able to find the specified host. This means either your DNS is not working or some thing with your internet connection. Did you tried pinging to the above host (mysql1.eohub.com)? Once you are able to ping it to this server means, your application will defiantly will connect to the server (if it is running, then driver will issue a different error ..). Also just to make sure whether the MySQL server is running or not, telnet to the above host with the port number to which the server is running. For example if it 3306 then telnet 24.254.141.32 3306, should connect and display the version of the server. Regards, Venu -- For technical support contracts, go to https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Venu mailto:[EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer /_/ /_/\_, /___/\___\_\___/ Woodside, California USA ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 command question
currently, to list the last 100 records in a table I use this sql command: select * from test order by T desc limit 100; Note: T is the name of a field in my table test . can I instead use record number or use the count function to get the same result? I don't have an index field in my table and the table has no primary key for a good reason. Also, is this command possible? select count(*) from table1, table2; if it is, why can't I get the correct result: table1 has 337 records and table2 has 23860 records but the result is 8040820 instead. thanks Nissim Lugasy 216-433-2708 [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
installation and configuration!
Hi I am new to this group.I want to install MySQL on win 2000.Let me know from where we can get more information on Installation and Confugration. If some one has detailed list please send it. Thanks -Chris _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: sql command question
currently, to list the last 100 records in a table I use this sql command: select * from test order by T desc limit 100; Note: T is the name of a field in my table test . can I instead use record number or use the count function to get the same result? MySQL doesn't really have the concept of record number. I don't have an index field in my table and the table has no primary key for a good reason. I don't know what the good reason is, but that's also preventing you from doing what you want. Also, is this command possible? select count(*) from table1, table2; if it is, why can't I get the correct result: table1 has 337 records and table2 has 23860 records but the result is 8040820 instead. That's the correct result. You're running a full join on the two tables, which produces each combination of rows from the tables. 337 times 23680 is 8040820. Do you mean the sum of the counts of the records in each table? SELECT @n1 := COUNT(*) FROM table1; SELECT @n2 := COUNT(*) FROM table2; SELECT @n1 + @n2; thanks Nissim Lugasy 216-433-2708 [EMAIL PROTECTED] -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: installation and configuration!
- Original Message - From: chrish shea [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 04, 2001 5:05 PM Subject: installation and configuration! Hi I am new to this group.I want to install MySQL on win 2000.Let me know from where we can get more information on Installation and Confugration. If some one has detailed list please send it. Thanks -Chris _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php Best place to start is http://www.mysql.com/manual.php (the manual). Fine instructions and links to other sources of information. Search on Google is another good option. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
Hi, this is my first time posting to the list. I've followed mysql replications how-tos to a tee...and I am still not able to get it to work. the master mysql is running on a sun sparc station (SunOS 2.8) with mysql 3.23.41 the file /etc/my.cnf is as follows: # The following options will be passed to all MySQL clients [client] port= 3306 socket = /tmp/mysql.sock # The MySQL server [mysqld] port= 3306 socket = /tmp/mysql.sock skip-locking set-variable= key_buffer=16K set-variable= max_allowed_packet=1M set-variable= thread_stack=64K set-variable= table_cache=4 set-variable= sort_buffer=64K set-variable= net_buffer_length=2K server-id = 1 log-bin [mysqldump] quick set-variable= max_allowed_packet=16M [mysql] no-auto-rehash [isamchk] set-variable= key_buffer=8M set-variable= sort_buffer=8M [myisamchk] set-variable= key_buffer=8M set-variable= sort_buffer=8M [mysqlhotcopy] interactive-timeout The slave is running on a compaq prescario running red hat linux 7.1 with MySQL (Ver 10.12 Distrib 3.23.25-beta, for pc-linux-gnu (i686)) the file /etc/my.cnf is as follows: # The following options will be passed to all MySQL clients [client] port= 3306 socket = /tmp/mysql.sock # The MySQL server [mysqld] master-host=$host goes here master-user=$user goes here master-password=$password goes here master-port=3306 port= 3306 socket = /tmp/mysql.sock skip-locking set-variable= key_buffer=16K set-variable= max_allowed_packet=1M set-variable= thread_stack=64K set-variable= table_cache=4 set-variable= sort_buffer=64K set-variable= net_buffer_length=2K log-bin [mysqldump] quick set-variable= max_allowed_packet=16M [mysql] no-auto-rehash [isamchk] set-variable= key_buffer=8M set-variable= sort_buffer=8M [myisamchk] set-variable= key_buffer=8M set-variable= sort_buffer=8M [mysqlhotcopy] interactive-timeout Can someone tell me what i'm doing wrong? After reading thru all these how to's it seems so easy to get. Would the problem be cuz i'm going from solaris to linux? If that was the case though wouldnt i get errors importing the snapshots? The snapshot of the master data directory imported just fine. Another problem I noticed is if i put server-id = $any number here in the slave my.cnf i get this error /usr/sbin/mysqld: unrecognized option `--server-id=1'. Any help or direction on where i can find an answer would be great i've read through about 5 how to's. this is in my error log on the slave machine: 010904 14:05:12 mysqld started /usr/sbin/mysqld: ready for connections 010904 14:05:12 Slave thread: error connecting to master:Can't connect to MySQL server on 'sc-admin.admonitor.net' (111), retry in 60 sec Number of processes running now: 0 010904 14:05:27 mysqld restarted /usr/sbin/mysqld: ready for connections 010904 14:05:27 Error reading packet from server: Could not find first log (0) 010904 14:06:27 Error reading packet from server: Could not find first log (0) [root@dev mysql]# more dev.l90.com.err 010904 14:05:12 mysqld started /usr/sbin/mysqld: ready for connections 010904 14:05:12 Slave thread: error connecting to master:Can't connect to MySQL server on 'sc-admin.admonitor.net' (111), retry in 60 sec Number of processes running now: 0 010904 14:05:27 mysqld restarted /usr/sbin/mysqld: ready for connections 010904 14:05:27 Error reading packet from server: Could not find first log (0) 010904 14:06:27 Error reading packet from server: Could not find first log (0) 010904 14:07:27 Error reading packet from server: Could not find first log (0) 010904 14:08:27 Error reading packet from server: Could not find first log (0) 010904 14:09:28 Error reading packet from server: Could not find first log (0) 010904 14:10:28 Error reading packet from server: Could not find first log (0) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Query Help
I have this two table. table1: ID NamePhone someother fileds 1 Bob 1234 2 Joe 5678 3 Mary5678 4 John 6789 table2: ID NameEmail 1 Bob [EMAIL PROTECTED] 2 Joe [EMAIL PROTECTED] 3 Johnjohn@ the query : select t1.Name, t1.Phone , t2.Email from t1,t2 where t1.name=t2.name works fine. But I want to display all the names. Table2 doesn't have all the names, so for example mary is missing , because she doesn't have email address. I want to display all the info about everyone, regardless if they have email address or not. Is that make sense? Any hint. 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
Re: Query Help
I somehow doubt this will work but try this:: Select * from t1, t2 where... Yeah, that wont work. i havent tried it but I think it aint gonna help. I send this anyway just as a what if. - Deryck H - http://www.comp-u-exchange.com - Original Message - From: Islam, Sharif [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 04, 2001 4:42 PM Subject: Query Help I have this two table. table1: ID NamePhone someother fileds 1 Bob 1234 2 Joe 5678 3 Mary5678 4 John 6789 table2: ID NameEmail 1 Bob [EMAIL PROTECTED] 2 Joe [EMAIL PROTECTED] 3 Johnjohn@ the query : select t1.Name, t1.Phone , t2.Email from t1,t2 where t1.name=t2.name works fine. But I want to display all the names. Table2 doesn't have all the names, so for example mary is missing , because she doesn't have email address. I want to display all the info about everyone, regardless if they have email address or not. Is that make sense? Any hint. 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
DSN-Less connection Strange error!
Hi People, I'm trying to connect to Mysql server using Access2k, VBA and DSN less connection, and mysql v3.23.36. All queries sent to the server exceute or returns records just fine except one simple query. DESCRIBE Employees Employees is a table in my database. the server responds by : Data provider or other service returned an E_Fail status The connection string is : con.Open Driver={mySQL}; _ Server=myserver; _ Port=3306; _ Option=16402; _ Stmt=; _ Database=Inventory; _ Uid=myser; _ Pwd=mypassword; Then openning the recorset by : rst.Open show columns from Employees;, con When moving into the recordset , i'm able to move through the first record and get the first field , but when I rst.MoveNext I get the E-Fail error . I tried SHOW Columns ... but same result. show datbases ... is OK describe database is Ok Describe table ... -- E_Fail error. Please note if I use DSN, then everything works fine. Did Anybody tried this at home? Regards, Randy, - \__ \|/ Hello\ (@ @) -oo0( ^ )0oo--- Nader Shehayed \=/ Senior Application engineer /*\ IAR Systems Inc. Email : [EMAIL PROTECTED] --- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Design question from newbie
Hello MySQL users, I've just started out with MySQL, and have already bought and read Paul DuBois's excellent book. Nevertheless, I'm not exactly sure how to start making a database for all the data I have. What I have are responses from questionnaires administered to several organisations over a number of years. While the questionnaires are very similar in many ways, they are certainly not identical. I wish to calculate what common statistics I can for the purpose of longitudinal comparisons within and between organisations. The raw data looks a bit like ID,YEAR,SEX,AGE,RATING A,RATING B, ... 1,2001,1,3,7,6,... As I said, not all organisations were asked the same questions so I can't just put the data in directly The only way I can see of dealing with this is to create tables like ID,QUESTION,RESPONSE 1,YEAR,2001 1,SEX,1 1,AGE,3 1,RATING A, 7 1,RATING B, 6 ... This doesn't strike me as very smart. I would greatly value anyone's advice on dealing with data that is similar in many respects but different in others. Thank you very much. Regards, Andrew C. Ward [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: fulltext indexes for innodb?
On Thu, Aug 30, 2001 at 01:44:56PM +0200, Sergei Golubchik wrote: : Hi! : : On Aug 30, Alexander wrote: : Hello, mysql team! : : Any chance (in the near future) to get FullText indexing working with innodb : table handler? : : Alexander : : I doubt it will be done it the near future : (unless a customer would like to pay for the feature, of course). How much would such a feature cost? Would the MySQL development team implement that or Heikki? * Philip Molter * DataFoundry.net * http://www.datafoundry.net/ * [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: Query Help
Islam, Sharif writes: I have this two table. LEFT JOIN -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Query Help
At 4:42 PM -0500 9/4/01, Islam, Sharif wrote: I have this two table. table1: ID NamePhone someother fileds 1 Bob1234 2 Joe 5678 3 Mary5678 4 John 6789 table2: ID NameEmail 1 Bob [EMAIL PROTECTED] 2 Joe [EMAIL PROTECTED] 3 Johnjohn@ the query : select t1.Name, t1.Phone , t2.Email from t1,t2 where t1.name=t2.name works fine. But I want to display all the names. Table2 doesn't have all the names, so for example mary is missing , because she doesn't have email address. I want to display all the info about everyone, regardless if they have email address or not. Is that make sense? Any hint. Use a LEFT JOIN to force the output to contain a row for every record in t1, whether or not t2 contains a match: select t1.Name, t1.Phone , t2.Email from t1 LEFT JOIN t2 ON t1.name=t2.name The value of t2.Email for t1 rows with no match in t2 will be NULL. thanks -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Grants question..
At 4:10 PM -0400 9/4/01, Gil G. wrote: Hello, I recently started using MySQL on FreeBSD. Everything works great, except that I can't access a database created by root as another user. When I grant privileges, from the command line or phpmyadmin, things seem to work fine (no error message), but access is still denied. I did restart MySQL after granting rights. The manual and book by Dubois did not provide me with an answer. Obviousely I am overlooking something...? Thanks a lot, sincerely, Gil. It'd help if we could see the GRANT statement that you're using and the error message that you get. You might also have a look a pp. 464-465 of the book. It may be that you're running into the problem described there. -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Design question from newbie
Andrew Ward writes: The only way I can see of dealing with this is to create tables like ID,QUESTION,RESPONSE 1,YEAR,2001 1,SEX,1 1,AGE,3 1,RATING A, 7 1,RATING B, 6 ... This doesn't strike me as very smart. I would greatly value anyone's advice on dealing with data that is similar in many respects but different in others. Thank you very much. If you want it to be fairly general you could have a table with possible value types and then another table with the actual values. It'll require more space and you might want to have one table for numbers and another for strings, but if there are a lot of different fields and most of them don't appear in the majority of the entries (the rows in your example), doing it like that may be motivated. It'd make some searches less convenient, but on the other hand it'll be much easier to add new fields. Today I went from having a table with 38 rows for each line in an input file (which was output from some software), to having a single 40-column row per line. This will be less convenient to handle as it's muss less general, but on the other hand I saved some much-needed space. (Some numbers: old: 12 bytes per row (19 with overhead), times 38 rows = 722 bytes. new: 100 or 133 bytes. Multiply with 3 per input file and 1000 for the number of input files within the first year or two. Eek.) -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
The Mysql socket thing using Redhat 7.1
HI, I'm a new user to Linux and am interested in MySQL and PHP. I currently use both as a developer elsewhere and am now trying to set up a test server at home. I've searched the MYSQL lists and notice that alot of people are getting a similar problem as myself and I'm not sure if any have got this to work. I'm consistently getting the error (2002) : Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (111) I've read through the manual about problems starting a server but this has not helped and I've tried to follow help in the lists but again no result. I run mysql_install_db and get the messages about starting up I run safe_mysqld and get something about starting and stopping I've found the the mysql.sock and it's in the location that the error mentions the location of the sock thing?? (It's late and I'm tired and a bit fed up -after being told to forget windows and go to Linux- I really wanted to agree but am now finding it hard too!) I've deleted it and running something above has brought it back again!- this is good I think I've uninstalled mysql and reinstalled the client, server etc but still the same error People keep responding about starting up or restarting the server. Someone has mentioned Services Mqsqld Start which does something but every single time I try mysql I get that error. I'm just going round in circles now. Can someone give me some help. 1. Can i found out if the server is or is not running -which command and what am I looking for? 2. Can I stop the mysql server 3. Can I start it? Using anything to do with mysql or mysqladmin results in the error. I'm currently reading about something to do with configure how ??? Please please please help Jason - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Why this error comes
Dear When I try to create this if show the below mentioned error msg .Can some light on it? mysql create table usermaster(user_name varchar(50), user_id varchar(40) Primary Key, user_level varchar(8), password varchar(20), user_sex varchar(1), user_dob varchar(10), user_street varchar(50), user_city varchar(30), user_state varchar(30), user_zip varchar(8), user_country varchar(30), user_phone varchar(16), user_mobile varchar(15), user_mailid varchar(40), user_age varchar(6), user_income varchar(15), user_buy varchar(20), user_budget varchar(20), user_choice varchar(20), rdate varchar(20)); ERROR 3: Error writing file './databasename/usermaster.frm' (Errcode: 28) Wil help some one urgent... __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: The Mysql socket thing using Redhat 7.1
jason bailey [EMAIL PROTECTED] writes: HI, I'm a new user to Linux and am interested in MySQL and PHP. I currently use both as a developer elsewhere and am now trying to set up a test server at home. I've searched the MYSQL lists and notice that alot of people are getting a similar problem as myself and I'm not sure if any have got this to work. I'm consistently getting the error (2002) : Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (111) I've read through the manual about problems starting a server but this has not helped and I've tried to follow help in the lists but again no result. I run mysql_install_db and get the messages about starting up I run safe_mysqld and get something about starting and stopping I've found the the mysql.sock and it's in the location that the error mentions the location of the sock thing?? (It's late and I'm tired and a bit fed up -after being told to forget windows and go to Linux- I really wanted to agree but am now finding it hard too!) You shouldn't have done mysql_install_db (which creates db files, owned by root) and safe_mysqld (which will start the database as user mysql, who can't read or write to the necesarry files). Do a chown -R mysql.mysql /var/lib/mysql, then start the database with service mysqld start. If you had done this (or just selected it to start in one of the runlevel managers, like ntsysv or tksysv), it would have initialized the database automatically. To make mysqld start on every boot, do chkconfig mysqld start. -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Multiple Servers
Problem Type: multiple servers using different mysql.sock/socket file Hello, I'm attempting to run 3.23.41 on a box that uses 3.22.21. Ultimately, the 3.23.41 version will replace the older version. In the meantime, I want to run them concurrently during the upgrade process. How should I go about this? I looked through the docs and thought I just needed to change my my.cnf file (it's saved in my $MYSQL/data directory) with the entries below. When I tried this, however, I get an error telling me that I can't connect because the default /tmp/mysql.sock file already exists. [client] port=51000 socket=/mysql/tmp/mysql_3.23.41.sock [mysqld] tmpdir=/mysql/tmp port=51000 socket=/mysql/tmp/mysql_3.23.41.sock set-variable = tmp_table_size=64m Sincerely, Brian - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Design question from newbie
Andrew Ward wrote: As I said, not all organisations were asked the same questions so I can't just put the data in directly The only way I can see of dealing with this is to create tables like ID,QUESTION,RESPONSE 1,YEAR,2001 1,SEX,1 This doesn't strike me as very smart. I would greatly value anyone's advice on dealing with data that is similar in many respects but different in others. Thank you very much. Actually it is not that bad of an idea esp. since you have different questions. You might make two tables: one to hold common information and the other to hold the questions, e.g: CREATE TABLE header ( question_id integer, year integer, age integer, sex char, UNIQUE( question_id)); CREATE TABLE questions ( question_id integer, question char(32), response_str char(32), response_int integer, KEY( question_id )); The whole response_str/response_int thing is only if you have lots of questions and do not want to calculate stats on cast strings. If your responses are always ints then, obviously, you would not need the _str/_int thing either. With a design like this you can start to get stats in a clean way, e.g.: How may male respondents questioned in and after 2000 liked beer? SELECT COUNT(*) FROM header, questions WHERE header.question_id=questions.question_id AND year=2000 AND sex='M' AND question=LIKES BEER AND response_str=Y; You can count me as one. ;-) --Bill - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
hanging problem
hello all, i'm having an unusual problem with mysql here in a bioinformatic application. in these cases, the server hangs upon receiving a query. i can't predict which queries will trigger the problem, but once one comes up, even restarting the server doesn't keep it from happening. i also erased the files in /var/lib/mysql/test/ suspecting that it had got into an inconsistent state, but that didn't help either. when the hang occurs, whether triggered from the monitor or my perl program, the program sends a query via a socket to the daemon and waits for the response. the server is stuck waiting on a select call. rebooting the machine seems to reset the criteria determining which queries cause the system to fail, but something still does, and rather quickly. i'm getting between 1 and a dozen queries done before one fails, and failures occur on reruns at places that worked previously. any suggestion is welcome; i'm really puzzled! thanks, aaron brick. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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/FreeBSD 4.3 stuck in kernel
Thanks, Ken. Your return of Poll 1 seems to indicated that there is a descriptor ready to be serviced (hence the going in continuosly) but that the daemon does not seem to be able to complete the servicing of that descriptor. I've noticed rare occasions (about 1% of the time) when poll() returns 0 -- these are always preceeded in the trace output by a signal handler, like this: 45689 mysqld 0.08 CALL sigreturn(0x826ae7c) 45689 mysqld 0.10 RET sigreturn JUSTRETURN 45689 mysqld 0.24 CALL poll(0x827,0x91,0) 45689 mysqld 0.41 RET poll 0 45689 mysqld 0.23 CALL poll(0x827,0x92,0x1ff) 45689 mysqld 0.40 RET poll 1 (Really, I'm not sure what to make of ktrace: which thread makes a particular call? Why are the timestamps interleaved?...) I was also wondering how much RAM you had, I hope it is about 2 gig I have 768 MB here, for 50 databases with about 10 tables each, getting 6 queries per second. My current mysqld has been running since yesterday and now has a resident size of about 100MB. I did restart the server yesterday to get it back to normal, and I can't reproduce the problem, but I can leave it running and expect the problem to reappear within about 10 days. When it comes back, I will take a good look at memory and the processlist. My recollection is that the condition will persist without there being any currently running query at all... - JD --- John David Duncan Systems Administrator Great Schools, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
What does this error mean??!!
[TCX][MyODBC]Access denied for user: '[EMAIL PROTECTED]' to database 'dbasename' I get this every time I try to connect with mysql. - Deryck H - http://www.comp-u-exchange.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
output to csv
Hi Folks, I'm running a batch command in win2K: cmd mysql batch-file output.txt In the batch file, can I specify that values are separated by commas instead of tabs? Cheers, Steve - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
BETWEEN DATES FUNCTION
I am trying to create a MySQL SELECT statement using PHP where I am getting a filtered list back by a date in the database formatted as -mm-dd where the date falls between a one week window that is in constant motion. For example, take todays date (as a julian calendar number) and a date that is set 7 days in the future (also as a julian calendar number and find all rows in the database where the date field (as a julian number) falls between the julian number of the window, i.e. today and one week from today. The SELECT statement that I came up with is this SELECT *,DATE_FORMAT(birthday,'%M %d'), DAYOFYEAR(DATE_FORMAT(birthday,'$yr-%m-%d')) FROM table_name WHERE DAYOFYEAR(DATE_FORMAT(birthday,'$yr-%m-%d')) = $yday AND DAYOFYEAR(DATE_FORMAT(birthday,'$yr-%m-%d')) = $yday_hi; The PHP variables $yr, $yday, and $yday_hi are set as $yr is the current 4 digit year $yday is the current julian calendar date for today $yday_hi is the julian calendar date one week in the future. This select statement works fine until I get to December 24th of any year, and the $yday_hi goes beyond the actual number of julian days in this year. So I have created an if statement that says if the date in the future is bigger than the julian date for December 31 of this year, then subtract the 2 and set the date in the future as the difference. For example, if there are 364 days this year, and today's julian calendar date is 360, the one week in the future would be (360 + 7) or 367. So subtract 364 from 367 which is 3 and set the $yday_hi variable to 3. This makes the numbers work. So if today is December 30th (or 364) the week in the future date would become Jan 6 (or 6 as a julian date). It is at this time that the select statement look like SELECT ... WHERE birthday = 364 (today) AND = 6 (one week from today) My select statement will ONLY work if $yday is smaller than $yday_hi. Is there a way to make MySQL understand that I need dates at the end of the year, and at the beginning ?? I hope that makes sense. Chad - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: What does this error mean??!!
It means that access for the user connecting from the domain something.com has been denied. You don't have permissions set up properly. j- k- On Tuesday 04 September 2001 15:59, Deryck Henson wrote: [TCX][MyODBC]Access denied for user: '[EMAIL PROTECTED]' to database 'dbasename' I get this every time I try to connect with mysql. -- Joshua Kugler, Information Services Director Associated Students of the University of Alaska Fairbanks [EMAIL PROTECTED], 907-474-7601 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: output to csv
Yes, the same way you would with the INFILE syntax Steve Doig wrote: Hi Folks, I'm running a batch command in win2K: cmd mysql batch-file output.txt In the batch file, can I specify that values are separated by commas instead of tabs? Cheers, Steve - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 crashing
MySQL crashes almost every time we try to use it through a PHP script. We use 4.1 BSDI BSD/OS 4.1 Kernel #0 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: BETWEEN DATES FUNCTION
At 5:03 PM -0700 9/4/01, Chad Berryman wrote: I am trying to create a MySQL SELECT statement using PHP where I am getting a filtered list back by a date in the database formatted as -mm-dd where the date falls between a one week window that is in constant motion. For example, take todays date (as a julian calendar number) and a date that is set 7 days in the future (also as a julian calendar number and find all rows in the database where the date field (as a julian number) falls between the julian number of the window, i.e. today and one week from today. The SELECT statement that I came up with is this SELECT *,DATE_FORMAT(birthday,'%M %d'), DAYOFYEAR(DATE_FORMAT(birthday,'$yr-%m-%d')) FROM table_name WHERE DAYOFYEAR(DATE_FORMAT(birthday,'$yr-%m-%d')) = $yday AND DAYOFYEAR(DATE_FORMAT(birthday,'$yr-%m-%d')) = $yday_hi; The PHP variables $yr, $yday, and $yday_hi are set as $yr is the current 4 digit year $yday is the current julian calendar date for today $yday_hi is the julian calendar date one week in the future. You're making this way too hard, I suspect. To find all birthdays from a target date to the target date plus a week, do this: ... WHERE birthday = $target_date AND birthday = DATE_ADD($target_date,INTERVAL 7 DAY) This select statement works fine until I get to December 24th of any year, and the $yday_hi goes beyond the actual number of julian days in this year. So I have created an if statement that says if the date in the future is bigger than the julian date for December 31 of this year, then subtract the 2 and set the date in the future as the difference. For example, if there are 364 days this year, and today's julian calendar date is 360, the one week in the future would be (360 + 7) or 367. So subtract 364 from 367 which is 3 and set the $yday_hi variable to 3. This makes the numbers work. So if today is December 30th (or 364) the week in the future date would become Jan 6 (or 6 as a julian date). It is at this time that the select statement look like SELECT ... WHERE birthday = 364 (today) AND = 6 (one week from today) My select statement will ONLY work if $yday is smaller than $yday_hi. Is there a way to make MySQL understand that I need dates at the end of the year, and at the beginning ?? I hope that makes sense. Chad -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: output to csv
At 7:59 AM +0800 9/5/01, Steve Doig wrote: Hi Folks, I'm running a batch command in win2K: cmd mysql batch-file output.txt In the batch file, can I specify that values are separated by commas instead of tabs? No, but if you have Perl installed, you can create a file named csv.pl that contains the following: while () # read next input line { s///g; # double any quotes within column values s/\t/,/g; # put `,' between column values s/^//; # add `' before the first value s/$//; # add `' after the last value print; # print the result } exit (0); Then you can run this command: cmd mysql batch-file | perl csv.pl output.txt and output.txt will contain CSV output. If you have a file association set up so that .pl files get executed by Perl, you can shorten that to: cmd mysql batch-file | csv.pl output.txt Cheers, Steve -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php