Perl DBI secret command?
Hi, just stumbled across the following piece of code: my $rowcount = $sth-rows(); And I checked it out compared to a count of the fetched rows from an SQL QUERY. AND It matched exactly! BUT, I can't find the command rows() in the DBI documentation. What's the story? Have I unearthed a conspiracy? Jeff - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Perl DBI secret command?
No conspiracy, read it again ! ;) http://www.perldoc.com/cpan/DBI.html#rows Joseph Bueno Jeff Snoxell wrote: Hi, just stumbled across the following piece of code: my $rowcount = $sth-rows(); And I checked it out compared to a count of the fetched rows from an SQL QUERY. AND It matched exactly! BUT, I can't find the command rows() in the DBI documentation. What's the story? Have I unearthed a conspiracy? Jeff - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Connection ms access to mysql
Hi, I think is better to export your each table from Access to a .txt formatted file...fields separated by ',' and end_of_line by ';'.It's better to avoid Cr or CrLf. Copy the .txt files into MySQL server host in a directory where MySQL have reading rights. And after this you can import in your MySQL tables using (...this can be a way) LOAD DATA... E.g: LOAD DATA INFILE 'the_path_to_one_of_txt_files' INTO TABLE one_of_table_to_load FIELDS TERMINATED BY ',' LINES TERMINATED BY ';'; This it should be work. Regards, Gelu _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: mc 02 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 18, 2003 7:51 AM Subject: Re: Connection ms access to mysql Hi Bob hall, I do apologize for being unclear in my previous message. To answer your question: Does the MySQL server run on your FreeBSD system? Yes MySQL runs prefectly with my FreeBSD 4.6 system. How are you trying to export your Jet tables? I assume that's what you mean when you refer to files. If you actually want to put your mdb files on FreeBSD, then you should be asking the freebsd-questions list about Samba. Im still unsure how im exporting the tables. What i want to do is exporting all the tables in the mdb files to mysql database and i dont know how to go about it. Thanx p.s: I'm looking into Samba as u mentioned previously. Regards MC -- __ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup Meet Singles http://corp.mail.com/lavalife - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
Escape char in fulltext search
On Tue, Nov 26, 2002 at 02:30:41PM +0100, Sergei Golubchik wrote: On Nov 25, Grzegorz Paszka wrote: Hi. Could You explain me for what is macro misc_word_char ? A word must have true_word_char on both ends, and there should not be two adjacent misc_word_char's in the word. E.g. (assuming HYPHEN_IS_DELIM is NOT defined) -asdf'-- the word is asdf as-df--- the word is as-df 'a's-f-- the word is a's-f as--df-- two words, as and df. I think, boolean operators '+' and '-' can be misc_word_char's but not true_word_char's. But to be on the safe side, you can go to ft_static.c and change ft_boolean_syntax variable, changing '+' and '-', to, e.g., '' and '!' ... This is a good idea, but in ft_boolean_syntax I see more chars which should not be true_word_char. So what I should do when I have such string : --~(+) And I want to find it by fulltext search. I know that looks strange :) But i've idea: Redefine true_word_char (misc_word_char is null) #define true_word_char(X) (isgraph(X)) and mysql parser should understands escaping char. So string --~(+) I can search by typing : \\-\-\~\\\(\+\) Is any chance to implement escaping char feature ? Maybe there is another solution for my problem ? Best regards. P.S. I posted this mail to [EMAIL PROTECTED] but nobody replaed, mabye here I'll have more luck. -- Grzegorz mysql,sql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL error messages list
Dear all (especially MySQL gurus), I have another question regarding MySQL error messages. I know that error messages are stored in errmsg.txt for different languages. We all love error 1064 (You have an error in your SQL syntax). My question: Where can I find a list of _all_ (not just common, like in http://www.mysql.com/doc/en/Common_errors.html#IDX1753) error numbers with their appropriate error messages? (filter fodder: sql, mysql) TIA, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RedHat 8, mysql-server-3.23.54a-4 and relocating the data directory
Hi All! I'm new to the list, but I've been using MySQL under Red Hat for a couple of years now. I'm in the process of setting up a new Red Hat 8 box and I want to change the data directory to a different location (/raidarray2/data/mysql). I've edited the /etc/my.cnf as: [mysqld] datadir=/raidarray2/data/mysql socket=/raidarrary2/data/mysql/mysql.sock [mysql.server] user=mysql basedir=/raidarry2/data I've also checked RedHat's /etc/rc.d/init.d/mysqld file and changed the line datadir=/raidarry2/data/mysql and restarted the server. Still, I keep getting the error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) On the command line, I get the same error with bash_$ mysql -u root -p mysql unless I modify it as bash_$ mysql -u root -p -S /raidarry2/data/mysql/mysql.sock mysql How can I fix this? Is there some other my.cnf file that is being used in RedHat 8? Note that I'm running the version that came with RedHat 8 and has been patched with the up2date command. Thanks! Cheers, Mike -- Mike Pelley Non illegitimati carborundum Owner Misc. Rambler of Pelleys.com [EMAIL PROTECTED] - www.pelleys.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: Perl DBI secret command?
At 9:39 + 1/18/03, Jeff Snoxell wrote: Hi, just stumbled across the following piece of code: my $rowcount = $sth-rows(); And I checked it out compared to a count of the fetched rows from an SQL QUERY. AND It matched exactly! BUT, I can't find the command rows() in the DBI documentation. What's the story? Have I unearthed a conspiracy? You probably looked for it with parentheses. When you do find it, you'll note that it discourages use of the rows method for SELECT statements, and recommends that you count the rows yourself as you fetch them. Jeff sql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Connection problem with MySQL 3.23.52 on RH 8
Hello. I get this message when trying to connect via TCP/IP. Both locally and remotely ERROR 2013: Lost connection to MySQL server during query What does it mean. I can't find any relevant documentation. Installation i a standard RH8 with MySQL rpm's Sorry for the disturbing you with this simple question Regards Michael Skaastrup - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Connection problem with MySQL 3.23.52 on RH 8
Hello. I get this message when trying to connect via TCP/IP. Both locally and remotely ERROR 2013: Lost connection to MySQL server during query What does it mean. I can't find any relevant documentation. Installation i a standard RH8 with MySQL rpm's Sorry for the disturbing you with this simple question Regards Michael Skaastrup - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Disable autocommit by default
Philip, Jani promised that in February 2003 you can set autocommit=0 globally in my.cnf. I am carbon copying this to Jani. The feature is widely requested. Regards, Heikki Subject: Disable autocommit by default From: Philip Molter Date: Thu, 16 Jan 2003 15:41:47 -0600 I want to disable autocommit for all command-line client connections by default (through the mysql prompt). I believe I can do this in the [client] section of the my.cnf config file, but I have no clue how. Three questions: 1) How? 2) Will it affect other client processes, such as those spawned by perl through DBD::mysql? 3) Is there a list of all the possible config options for the my.cnf file somewhere? Thanks, Philip sql, mysql * Philip Molter * Texas.net Internet * http://www.texas.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: Perl DBI secret command?
hi pls look into man DBI and find there this command. kr mr Jeff Snoxell [EMAIL PROTECTED] 01/18/03 10:45 AM Hi, just stumbled across the following piece of code: my $rowcount = $sth-rows(); And I checked it out compared to a count of the fetched rows from an SQL QUERY. AND It matched exactly! BUT, I can't find the command rows() in the DBI documentation. What's the story? Have I unearthed a conspiracy? Jeff - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 PHP
hello all, I'm posting on 2 lists because I'm not sure were the problem is, so I'm hoping that some one can help me out. I'm running a stock RH8 machine running amongst other things MySQL 3.23.52-3, Apache 2.0, PHP 4.2.2-8.0.5 When I try a simple php script that is this (sensitive information changed to protect me): html headtitleMy PHP test file/title/head body ?php $link = mysql_connect (localhost, user, password) or die (Could not connect); print (Connected successfully); $query = SELECT * FROM who; $result = mysql_db_query (mcdougrsMedia, $query) or die (Query failed); ? /body /html The page produces the following output: Fatal error: Call to undefined function: mysql_connect() in /home/username/public_html/testing.php on line 5 Can you guys see what is wrong... or if there is other information that is needed that isn't there please let me know and I will post whatever information is needed to fix it. TIA, Ryan __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.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: MySQL PHP
Hello Ryan, Did u compile PHP with mysql support enabled?as in did your configure line have something like this ./configure --with-mysql=/path/to/mysql? Regards, Eric === Kamara Eric Rukidi Mpuuga Computer Frontiers International Plot 32 Lumumba Avenue P.O Box 12510,Kampala Tel :256-41-340417/71 Email:[EMAIL PROTECTED] Web :http://www.cfi.co.ug On Sat, 18 Jan 2003, Ryan McDougall wrote: hello all, I'm posting on 2 lists because I'm not sure were the problem is, so I'm hoping that some one can help me out. I'm running a stock RH8 machine running amongst other things MySQL 3.23.52-3, Apache 2.0, PHP 4.2.2-8.0.5 When I try a simple php script that is this (sensitive information changed to protect me): html headtitleMy PHP test file/title/head body ?php $link = mysql_connect (localhost, user, password) or die (Could not connect); print (Connected successfully); $query = SELECT * FROM who; $result = mysql_db_query (mcdougrsMedia, $query) or die (Query failed); ? /body /html The page produces the following output: Fatal error: Call to undefined function: mysql_connect() in /home/username/public_html/testing.php on line 5 Can you guys see what is wrong... or if there is other information that is needed that isn't there please let me know and I will post whatever information is needed to fix it. TIA, Ryan __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 PHP
Hey everyone, Thank you all for your quick responses and the problem was that I did not have mysql support installed for php... installed the required rpm and did a httpd restart and it wrks now!! Thanx again, Ryan __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.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: Column names
But I know that the _ character is used as a wildcard for any single character. wouldn't it be considered it as a wild card when using it in a column name? Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: Keith C. Ivey [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Cc: Octavian Rasnita [EMAIL PROTECTED] Sent: Friday, January 17, 2003 8:31 PM Subject: Re: Column names On 17 Jan 2003, at 16:40, Octavian Rasnita wrote: In MySQL I know that I need to put the column names between `` in some cases if they contain a % or an _ sign in it. Please tell me what sign can I use to link 2 words in a column without needing to include that column name between ``. Can I use a - (dash) sign, or it might be considered in some cases a minus operator? You shouldn't need `` around column names that contain _. Underscore is pretty standard for separating words in a name. With dash, you'd have to use ``, because - is the minus operator. [Filter fodder: SQL] -- Keith C. Ivey [EMAIL PROTECTED] Tobacco Documents Online http://tobaccodocuments.org Phone 202-667-6653 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Column names
At 15:21 +0200 1/18/03, Octavian Rasnita wrote: But I know that the _ character is used as a wildcard for any single character. wouldn't it be considered it as a wild card when using it in a column name? Depends on the context. If you issue a SHOW COLUMNS FROM mytable LIKE 'my_col' statement, then 'my_col' will match my_col, but also myxcol, my0col, etc. You need to write it like SHOW COLUMNS FROM mytable LIKE 'my\_col' to match my_col *only*. But in the context of other statements that do not interpret a name as a pattern, _ won't be taken as a wildcard. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: Keith C. Ivey [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Cc: Octavian Rasnita [EMAIL PROTECTED] Sent: Friday, January 17, 2003 8:31 PM Subject: Re: Column names On 17 Jan 2003, at 16:40, Octavian Rasnita wrote: In MySQL I know that I need to put the column names between `` in some cases if they contain a % or an _ sign in it. Please tell me what sign can I use to link 2 words in a column without needing to include that column name between ``. Can I use a - (dash) sign, or it might be considered in some cases a minus operator? You shouldn't need `` around column names that contain _. Underscore is pretty standard for separating words in a name. With dash, you'd have to use ``, because - is the minus operator. [Filter fodder: SQL] -- Keith C. Ivey [EMAIL PROTECTED] Tobacco Documents Online http://tobaccodocuments.org Phone 202-667-6653 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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? mysql dead but subsys is locked
I just installed mysql binary in my Linux system. I tried ./bin/safe_mysqld also tried /etc/init.d/mysqld start the system always give me starting MySQL [OK] information. Then the mysqld ended running. /etc/init.d/mysqld status gives me information like mysql dead but subsys locked under /var/lib/mysql/, there is no mysql.socket file exist. All my procedures are followed the manual. Thank you for your time. Eileen - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
How to install MySQLCC on W98
Hi, The MySQLCC's setup.exe program is calling MSIEXEC windows installator. I have no such program on my W98. Is it a problem only of my windows 98 or it is possible to use MySQLCC only on w2000 and newer? Is there any way how to install MySQL Control Center without MSIEXEC? Thanks Michal __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.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
PRIMARY KEY
According to the MySQL documentation (Section 6.5.3, CREATE TABLE syntax): If you don't have a PRIMARY KEY and some applications ask for the PRIMARY KEY in your tables, MySQL will return the first UNIQUE key, which doesn't have any NULL columns, as the PRIMARY KEY. How does any application ask for the PRIMARY KEY? Is this an ODBC call, or are their command line and built-in functions? I couldn't find this in the documentation. Rob - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 PHP
Ryan, Eric, Did u compile PHP with mysql support enabled?as in did your configure line have something like this ./configure --with-mysql=/path/to/mysql? You can test this by writing a file (named whatever you want, I call it phpinfo.php) with one single line like this: ?=phpinfo()? Check in your browser, like http://localhost/phpinfo.php, and it should tell you if MySQL support is enabled. Regards, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Kamara Eric R-M [EMAIL PROTECTED] To: Ryan McDougall [EMAIL PROTECTED] Cc: mysql [EMAIL PROTECTED]; RedHat 8.0 Psyche [EMAIL PROTECTED] Sent: Saturday, January 18, 2003 5:26 PM Subject: Re: MySQL PHP Hello Ryan, Did u compile PHP with mysql support enabled?as in did your configure line have something like this ./configure --with-mysql=/path/to/mysql? Regards, Eric === Kamara Eric Rukidi Mpuuga Computer Frontiers International Plot 32 Lumumba Avenue P.O Box 12510,Kampala Tel :256-41-340417/71 Email:[EMAIL PROTECTED] Web :http://www.cfi.co.ug On Sat, 18 Jan 2003, Ryan McDougall wrote: hello all, I'm posting on 2 lists because I'm not sure were the problem is, so I'm hoping that some one can help me out. I'm running a stock RH8 machine running amongst other things MySQL 3.23.52-3, Apache 2.0, PHP 4.2.2-8.0.5 When I try a simple php script that is this (sensitive information changed to protect me): html headtitleMy PHP test file/title/head body ?php $link = mysql_connect (localhost, user, password) or die (Could not connect); print (Connected successfully); $query = SELECT * FROM who; $result = mysql_db_query (mcdougrsMedia, $query) or die (Query failed); ? /body /html The page produces the following output: Fatal error: Call to undefined function: mysql_connect() in /home/username/public_html/testing.php on line 5 Can you guys see what is wrong... or if there is other information that is needed that isn't there please let me know and I will post whatever information is needed to fix it. TIA, Ryan __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: PRIMARY KEY
Rob, If you don't have a PRIMARY KEY and some applications ask for the PRIMARY KEY in your tables, MySQL will return the first UNIQUE key, How does any application ask for the PRIMARY KEY? Is this an ODBC call, or are their command line and built-in functions? I couldn't find this in the documentation. Primarily, this is a feature for ODBC applications like MS Access. I don't know of any other app that really longs to have a primary key for each table, but if there were such apps, MySQL would act as described in the manual (with or without ODBC). Regards, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Rob Pecherer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 18, 2003 6:38 PM Subject: PRIMARY KEY According to the MySQL documentation (Section 6.5.3, CREATE TABLE syntax): If you don't have a PRIMARY KEY and some applications ask for the PRIMARY KEY in your tables, MySQL will return the first UNIQUE key, which doesn't have any NULL columns, as the PRIMARY KEY. How does any application ask for the PRIMARY KEY? Is this an ODBC call, or are their command line and built-in functions? I couldn't find this in the documentation. Rob - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: How to install MySQLCC on W98
Since you are on Windows I will suggest take a look at SQLyog at http://www.webyog.com/sqlyog I prefer it over MySQLCC Karam --- Michal Seidl [EMAIL PROTECTED] wrote: Hi, The MySQLCC's setup.exe program is calling MSIEXEC windows installator. I have no such program on my W98. Is it a problem only of my windows 98 or it is possible to use MySQLCC only on w2000 and newer? Is there any way how to install MySQL Control Center without MSIEXEC? Thanks Michal __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.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 __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.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: PRIMARY KEY
Rob, I'm not questioning what MySQL does, only how. MySQL does not act without a request, so my question is (now), How do you ask MySQL what the PRIMARY KEY of a table is? SHOW KEYS FROM tbl In an application, next thing you would do is check what the value of 'Key_name' is (which is the column name of the returned result set), and if it is 'PRIMARY', then you have the PK. I don't know how (ODBC) apps like MS Access would ask MySQL for a PK column of a table, but MySQL must have a built-in mechanism to answer such a question with something else but the value 'PRIMARY'. Maybe some guru on the list has a more precise information?! P.S. I lived/worked in Berlin 1984-85 developing an RDBMS for Siemens on a joint project w. Intel. It never reached the market. Great City!! I miss alt bier. :-) Regards, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Rob Pecherer [EMAIL PROTECTED] To: Stefan Hinz, iConnect (Berlin) [EMAIL PROTECTED] Sent: Saturday, January 18, 2003 7:57 PM Subject: RE: PRIMARY KEY Greetings Stefan, and thanks. I'm not questioning what MySQL does, only how. MySQL does not act without a request, so my question is (now), How do you ask MySQL what the PRIMARY KEY of a table is? Thanks, Rob P.S. I lived/worked in Berlin 1984-85 developing an RDBMS for Siemens on a joint project w. Intel. It never reached the market. Great City!! I miss alt bier. -Original Message- From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 18, 2003 11:35 AM To: Rob Pecherer; [EMAIL PROTECTED] Subject: Re: PRIMARY KEY If you don't have a PRIMARY KEY and some applications ask for the PRIMARY KEY in your tables, MySQL will return the first UNIQUE key, How does any application ask for the PRIMARY KEY? Is this an ODBC call, or are their command line and built-in functions? I couldn't find this in the documentation. Primarily, this is a feature for ODBC applications like MS Access. I don't know of any other app that really longs to have a primary key for each table, but if there were such apps, MySQL would act as described in the manual (with or without ODBC). Regards, -- Stefan Hinz - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: FreeBSD: MySQL crash when importing 148 MB dumpfile
Hi Maximo, The problem is that you have a config that requires more memory than you have available. Please reduce key buffer, record buffer and sort buffer. The clues are: 030117 17:02:55 Out of memory; Check if mysqld or some other process uses key_buffer_size + (record_buffer + sort_buffer)*max_connections = 3859309 K 3859309K= almost 4G! try key_buffer_size=64M record_buffer=1M sort_buffer=1M max_connections=256 Do you really need 1 connections? Best of luck, Ken - Original Message - From: Maximo Migliari [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 17, 2003 6:28 PM Subject: FreeBSD: MySQL crash when importing 148 MB dumpfile Problem: I am migrating servers, from a dual PIII-866 Mhz with 384 MB of RAM running Linux to the following server configuration: Dual Athlon 1.5 Ghz 1 GB RAM 2 x 18 GIG SCSI drives. FreeBSD 4.7-Stable MySQL-Max-3.23.54a (ELF) i.e. without linuxthreads - runs on only 1 process. I am trying to import a database that was saved using mysqldump into the new machine using a method that has NEVER failed with me until now - that is, to do: mysql -uroot -pmypassword tablename tablename.sql. Here is how I did it, and the error message: [root@server1 admin]# mysql -uroot -pxxx _final _final.sql ERROR 2013 at line 1814: Lost connection to MySQL server during query [root@server1 admin]# 030117 17:02:55 mysqld restarted I have attempted this on both: MySQL-Max-3.23.54a and the latest MySQL 4 gamma release for FreeBSD. When importing other databases, it works fine, but for this larger file, the server is crashing. I have the same version of the software running on another server, a dual Intel 866 Mhz Linux system with only 384 MB of RAM, and this sort of thing ALWAYS works. I am using the same my.cnf on both systems, I have pasted my.cnf at the end of this e-mail. This is what I get in the .err file after the server crashes and restarts: - [root@server1 data]# cat server1.err 030117 17:01:22 mysqld started 030117 17:01:22 Warning: setrlimit returned ok, but didn't change limits. Max open files is 11095 030117 17:01:22 Warning: Changed limits: max_connections: 1 table_cache: 542 030117 17:01:23 InnoDB: Started /usr/local/mysql-max-3.23.54a/bin/mysqld: ready for connections 030117 17:02:55 Out of memory; Check if mysqld or some other process uses all available memory. If not you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail key_buffer_size=201322496 record_buffer=1044480 sort_buffer=1048568 max_used_connections=0 max_connections=1 threads_connected=1 It is possible that mysqld could use up to key_buffer_size + (record_buffer + sort_buffer)*max_connections = 3859309 K bytes of memory Hope that's ok, if not, decrease some variables in the equation 030117 17:02:55 mysqld restarted 030117 17:02:55 Warning: setrlimit returned ok, but didn't change limits. Max open files is 11095 030117 17:02:55 Warning: Changed limits: max_connections: 1 table_cache: 542 030117 17:02:56 InnoDB: Database was not shut down normally. InnoDB: Starting recovery from log files... InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 402622121 InnoDB: Doing recovery: scanned up to log sequence number 0 407864832 InnoDB: Doing recovery: scanned up to log sequence number 0 413107712 InnoDB: Doing recovery: scanned up to log sequence number 0 418350592 InnoDB: Doing recovery: scanned up to log sequence number 0 423593472 and this may fail key_buffer_size=201322496 record_buffer=1044480 sort_buffer=1048568 max_used_connections=0 max_connections=1 threads_connected=1 It is possible that mysqld could use up to key_buffer_size + (record_buffer + sort_buffer)*max_connections = 3859309 K bytes of memory Hope that's ok, if not, decrease some variables in the equation 030117 17:02:55 mysqld restarted 030117 17:02:55 Warning: setrlimit returned ok, but didn't change limits. Max open files is 11095 030117 17:02:55 Warning: Changed limits: max_connections: 1 table_cache: 542 030117 17:02:56 InnoDB: Database was not shut down normally. .. LOTS OF INNODB RECOVERY MESSAGES... .. /usr/local/mysql-max-3.23.54a/bin/mysqld: ready for connections --- I thought this might have been a kernal maxfile limitation, so I did: sysctl kern.maxfiles=3 to increase maxfiles from ~11000 to 3 It
SQL Count Query
I've got a table whose structure looks like this: CREATE TABLE IF NOT EXISTS calc_hits (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, hit_date DATETIME NOT NULL, PRIMARY KEY (id)) AUTO_INCREMENT = 1; On a web site, a row gets inserted into this table whenever a visitor uses a certain tool on the site. The INSERT command looks like this: INSERT INTO calc_hits VALUES (null, SYSDATE()); This may be anywhere from zero to hundreds of times a day. I'd like to have a page that displays the values in this table in a meaningful way. I let the user choose the date range and then I select a count() of all the ID values and GROUP BY the date values. This works well, except that days with ZERO hits on them don't show up at all (nothing to group by)... here's the query I'm using: SELECT DATE_FORMAT(hit_date, '%c/%e/%Y') hit_date, COUNT(*) hit_count FROM homepage_hits WHERE hit_date = start_date AND hit_date = end_date GROUP BY date_format(hit_date, '%Y %c %e') ORDER BY date_format(hit_date, '%Y %m %d') DESC What I'd like is to change this so that a day that falls in that date range, but has ZERO hits for the day will still show up in the result set with the date and a HIT_COUNT value of 0. I've tried a number of different permutations of this query, but am not having much luck. Before I go the brute force route and handle it procedurally in my application (which could yield several dozen individual queries on the page), I'd like to see if anyone can help. I appreciate any feedback/assistance you may have. Regards, J Donnici __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.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
Bugreport
SEND-PR: -*- send-pr -*- SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as SEND-PR: will all comments (text enclosed in `' and `'). SEND-PR: From: rjaising To: [EMAIL PROTECTED] Subject: [50 character or so descriptive subject here (for reference)] Description: precise description of the problem (multiple lines) How-To-Repeat: code/input/activities to reproduce the problem (multiple lines) Fix: how to correct or work around the problem, if known (multiple lines) Submitter-Id: submitter ID Originator:Rahul Jaising Organization: organization of PR author (multiple lines) MySQL support: [none | licence | email support | extended email support ] Synopsis: synopsis of the problem (one line) Severity: [ non-critical | serious | critical ] (one line) Priority: [ low | medium | high ] (one line) Category: mysql Class: [ sw-bug | doc-bug | change-request | support ] (one line) Release: mysql-3.23.54 (Official MySQL binary) Environment: machine, os, target, libraries (multiple lines) System: Linux dwarka.localdomain 2.4.18-3 #1 Thu Apr 18 07:32:41 EDT 2002 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 2731 (Red Hat Linux 7.3 2.96-110) Compilation info: CC='gcc' CFLAGS='-O2 -mcpu=pentiumpro' CXX='gcc' CXXFLAGS='-O2 -mcpu=pentiumpro -felide-constructors' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 13 Aug 31 23:02 /lib/libc.so.6 - libc-2.2.5.so -rwxr-xr-x2 root root 1260480 Apr 15 2002 /lib/libc-2.2.5.so -rw-r--r--1 root root 2310808 Apr 15 2002 /usr/lib/libc.a -rw-r--r--1 root root 178 Apr 15 2002 /usr/lib/libc.so lrwxrwxrwx1 root root 10 Aug 31 23:32 /usr/lib/libc-client.a - c-client.a Configure command: ./configure '--prefix=/usr/local/mysql' '--with-comment=Official MySQL binary' '--with-extra-charsets=complex' '--with-server-suffix=' '--enable-thread-safe-client' '--enable-local-infile' '--enable-assembler' '--disable-shared' '--with-client-ldflags=-all-static' '--with-mysqld-ldflags=-all-static' '--without-innodb' 'CFLAGS=-O2 -mcpu=pentiumpro' 'CXXFLAGS=-O2 -mcpu=pentiumpro -felide-constructors' 'CXX=gcc' ~ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 Count Query
a row gets inserted into this table whenever a visitor uses a certain tool on the site based on this approach your table does not have any entries for the days that no one uses the certain tool on the site. As a result your query can not pull out records which don't exist. You could catter for this programmatically by a perl script. The script could do this: create a temporary table insert all records from your main table between TheStartDate and TheEndDate... iterate through TheStartDate and theEndDate and add one record per day to the temporary table. The SQL statement should display count-1 for each day. I don't have perl on my system so I can't help with the script I hope someone else can. -Nasser. -- Jefferey Donnici [EMAIL PROTECTED] writes: Return-Path: [EMAIL PROTECTED] Received: from mx13.nyc.untd.com (mx13.nyc.untd.com [10.140.24.73]) by maildeliver04.nyc.untd.com with SMTP id AAA9CV2ZWAGWKH3J for [EMAIL PROTECTED] (sender [EMAIL PROTECTED]); Sat, 18 Jan 2003 18:27:48 -0500 (EST) Received: from web.mysql.com (web.mysql.com [213.136.49.183]) by mx13.nyc.untd.com with SMTP id AAA9CV2ZVA7XH6LJ for [EMAIL PROTECTED] (sender [EMAIL PROTECTED]); Sat, 18 Jan 2003 18:27:47 -0500 (EST) Received: (qmail 16262 invoked by uid 7797); 18 Jan 2003 23:24:32 - Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org) List-ID: mysql.mysql.com Precedence: bulk List-Help: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Post: mailto:[EMAIL PROTECTED] List-Subscribe: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Received: (qmail 16248 invoked from network); 18 Jan 2003 23:24:31 - Message-ID: [EMAIL PROTECTED] Date: Sat, 18 Jan 2003 15:24:29 -0800 (PST) From: Jefferey Donnici [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Subject: SQL Count Query To: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I've got a table whose structure looks like this: CREATE TABLE IF NOT EXISTS calc_hits (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, hit_date DATETIME NOT NULL, PRIMARY KEY (id)) AUTO_INCREMENT = 1; On a web site, a row gets inserted into this table whenever a visitor uses a certain tool on the site. The INSERT command looks like this: INSERT INTO calc_hits VALUES (null, SYSDATE()); This may be anywhere from zero to hundreds of times a day. I'd like to have a page that displays the values in this table in a meaningful way. I let the user choose the date range and then I select a count() of all the ID values and GROUP BY the date values. This works well, except that days with ZERO hits on them don't show up at all (nothing to group by)... here's the query I'm using: SELECT DATE_FORMAT(hit_date, '%c/%e/%Y') hit_date, COUNT(*) hit_count FROM homepage_hits WHERE hit_date = start_date AND hit_date = end_date GROUP BY date_format(hit_date, '%Y %c %e') ORDER BY date_format(hit_date, '%Y %m %d') DESC What I'd like is to change this so that a day that falls in that date range, but has ZERO hits for the day will still show up in the result set with the date and a HIT_COUNT value of 0. I've tried a number of different permutations of this query, but am not having much luck. Before I go the brute force route and handle it procedurally in my application (which could yield several dozen individual queries on the page), I'd like to see if anyone can help. I appreciate any feedback/assistance you may have. Regards, J Donnici __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 4.0.8 on solaris 8 problem
i have installed mysql4(binary version) on solaris but i get this error when i try to run it: ld.so.1:bin/mysqld : fatal : libCstd.so.1 : open failed : No such file or Directory what could be wrong? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php