Re: databases and operating systems
Ok. Now you make more sense. This is from my personal point of view. In general, I prefer speed, ease of use and ease of maintenance. What I like about mysql is that you can choose which features to build into it when compiling. For example, standard mysql does not come built with transaction support and, as transactions tend to take up time, I prefer not to use it. You don't have much of a choice in other database packages. Sure mysql lacks functionality, but that will come as the developers progress. The other bells and whistles, that come with most other products like Oracle MSSQL server, aren't used very often and usually tend slow down queries, whether they're used or not. - Original Message - From: "Ben Garvey" [EMAIL PROTECTED] To: "Rolf Hopkins" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, April 20, 2001 13:43 Subject: Re: databases and operating systems Sorry for the topic if if is off, but there are more uses for databases than just in PCs. I don't mean writing an OS explicitly using/for databases (like PalmOS), but rather, what features would better support modern databases. Ben Garvey - Original Message - From: "Rolf Hopkins" [EMAIL PROTECTED] To: "Ben Garvey" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, April 19, 2001 11:43 PM Subject: Re: databases and operating systems This is rather off topic but for what it's worth, to me, it doesn't make much sense in gearing OSs more towards databases. PCs do far more than just databases. - Original Message - From: "Ben Garvey" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 20, 2001 1:52 Subject: databases and operating systems Hello, my name is Ben Garvey and I'm doing a research paper on whether operating systems should be rewritten to offer more support for databases. What type of operating system features could benefit database implementors? Thank you in advance. Ben Garvey American University 202-332-6218 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: how to use BLOB datatype...
[EMAIL PROTECTED] wrote: Your message cannot be posted because it appears to be either spam or simply off topic to our filter. To bypass the filter you must include one of the following words in your message: database,sql,query If you just reply to this message, and include the entire text of it in the reply, your reply will go through. However, you should first review the text of the message to make sure it has something to do with MySQL. You have written the following: Hi, pls can you send me the asp code to store and retrive an image from the BLOB data type( database,sql,query).I desperately need this... Thx, Prasad. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Update installation
Hi everybody, sorry in advance if this question has been posted many times before. We are running MYSQL 3.22 on SUSE Linux and planning an update to the latest 3.23-Release.My question now is, if there is a special update-procedure which keeps files like my.cnf or the privilege-tables untouched, or are these automatically overwritten, so that they have to be saved before. I would also appreciate help very much, if anyone knows of other tricky stuff that should be considered before updating. Thanks a lot for your help, Frank - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Merge Tables Oversight
Hi all, I think I may have come up against a slight niggling omission concerning Merge tables. How does one find out what physical tables are mapped, other than by looking at the contents of the .MRG file? Surely this information should be displayed either when you do SHOW TABLE STATUS or by some other means? For example, I am currently using a Merge table to map 68 stats logging tables into one giant table (3.5 million rows!) so that overall averages, etc. can be calculated. As the mapping for this Merge table changes often, it would be handy for me to be able to check the current state of the mapping without leaving the MySQL client. I think a list of the mapped tables (or perhaps rather the UNION() statement) could be shown in the Create_options field of the SHOW TABLE STATUS output, as I would assume this is the appropriate place, yes? Maybe someone can tell me if there is any particular reason why this can't be shown, or is it just an oversight? Regards, Basil Hussain ([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: Merge Tables Oversight
Hi, On Fri, Apr 20, 2001 at 10:47:57AM +0100, Basil Hussain wrote: I think I may have come up against a slight niggling omission concerning Merge tables. How does one find out what physical tables are mapped, other than by looking at the contents of the .MRG file? Surely this information should be displayed either when you do SHOW TABLE STATUS or by some other means? I never use SHOW TABLE STATUS, but you can use SHOW CREATE TABLE which will give you the complete CREATE TABLE statement for the MERGE table. This doesn't include the UNION part in MySQL 3.23.33, but I believe this was fixed in MySQL 3.23.36 and later. Regards, Fred. -- Fred van Engen XO Communications B.V. email: [EMAIL PROTECTED] Televisieweg 2 tel: +31 36 5462400 1322 AC Almere fax: +31 36 5462424 The Netherlands - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Part two: Help restarting mysqld!! System crashes randomly :-(
Hello again! Thanks to everyone that helped me yesterday with the MySQL crash and how to restart the server. But now I have another problem, the MySQL 3.22.32 server is crashing every now and then. Looking at the .err file, it says 010420 1:48:51 Warning: setrlimit couldn't increase number of open files to more than 164 010420 1:48:51 Warning: Changed limits: max_connections: 30 table_cache: 62 Looking through Google.com I found this answer : * BEGINNING OF ANSWER Can someone explain what these 2 mysql errors are? I found them in an .err file in my mysql directory. I searched the Mysql website and looked through my book and couldn't find anything. They are kinda self explanatory, but why are they appearing? 000725 17:34:12 Warning: setrlimit couldn't increase number of open files to more than 164 000725 17:34:12 Warning: Changed limits: max_connections: 30 table_cache: 62 According to my O'Reilly book - mySQL and mSQL (page 63) You might need to increase the max_connections and table_cache settings when mySQL starts. * END OF ANSWER Is this right? Do I have to increase these values? How much? But the most important thing, in what file do I have to apply all these changes? An one last thing, I found these lines commented in safe_mysqld, The Site is running FreeBSD 4.2. Should I un-comment these lines? * LINES OF safe_mysqld * # Does this work on all systems? #if type ulimit | grep "shell builtin" /dev/null #then # ulimit -n 256 /dev/null 21 # Fix for BSD and FreeBSD systems #fi * END LINES OF safe_mysqld * Thanks again in advance, and sorry for the mail length. I'm just a little desperate with this :-) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL vs SQLServer vs PostgresSQL
Dear Kevin - Kevin Pratt writes: "IMO - mysql is just a disaster you are inviting on yourself. Isn't there some line about everyone having an opinion... you should see the responses to some recent bug reports ... We have run load tests ourselves, and postgres performs much the same under heavy load as no load, whereas mysql quickly gets slow and then just starts erroring out past a certain point. This is a strange comment. Ignoring for the moment the relative advantages or disadvantages of MySQL and Postgres they seem to say that "heavy load" doesn't impact Postgres' performance. So if we pin the CPU by doing random disk reads it doesn't slow down database functionality? Come on, that's just silly. We have had ihtml/postgres/odbc pooling working well under huge loads during our tests, where mysql could not compete at all. Furthermore postgres has a far richer set of functionality mysql users can only dream about. The broader feature set of Postgres over MySQL doesn't get a lot of intelligent rebuttal. However this is the first time I've ever heard someone claim that Postgres is faster. Will you provide some more detail regarding your "huge loads" and "tests"? Yours (curious now) - Billy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
My SQL for windows
hi , would any one suggest me a downloading site to download complete set of MySQL windows 32bit. Shall i have to register at any place to have the complete MySQL package. Please help me. thank you Peri _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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
[replication] adding new slaves
From my reading of the manual it seems that for every time a new slave it to be added, the master will need to be locked while the snapshot is taken. Is this really necessary? Can another slave be somehow setup by taking the data from another slave instead, thereby avoiding downtime on the master database server? Thanks, Ollie - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: problem installing on Solaris 8
Magnus Larsson (EUS) writes: Hello, When I am trying to install mySQL on a Solaris8 server I get the following error: # ./configure . . . checking return type of sprintf... configure: error: can not run test program while cross compiling Any idea what I need to do? I have tried to add the ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls='no'} to the config.cache file, but no luck. I am using gcc 2.95.2 and the following packages are installed in the OS: perl-5.6.0 URI-1.11 MIME-Base64-2.12 HTML-Tagset-3.03 HTML-Parser-3.19 libnet-1.0703 Digest-MD5-2.12 libwww-perl-5.50 m4-1.4 autoconf-2.13 automake-1.4 bison-1.28 binutils-2.9 Best Regards, Magnus Larsson =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Magnus Larsson Phone:+1-804-592-6182 Fax: +1-804-592-5469 Mobile: +1-804-258-6182 e-mail: [EMAIL PROTECTED] Ericsson Inc. 1 Mountain View Road Lynchburg, VA 24502 USA =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Hi! A solution to your problem is thoroughly described in our manual, section on Solaris. Regards, Sinisa __ _ _ ___ == MySQL AB /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic /*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED] /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaca, Cyprus /*/ /*/ /*/\*\_/*/ \*\_/*/ |*| /*/^^^\*\^^^ /*/ \*\Developers Team - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: report some problems
Edwin Zhang writes: Hi, Dear Sir or Madam, I like mySQL very much and today I tried to use mySQLGUI (win32 static binary 1.7.4-2), but I found edit table and create table in commands/tables menu have no functions. is there any problem? Sincerely Edwin Zhang Hi! Edit tables is in works and create table is on TODO. Meanwhile, you can use ?var? syntax to produce editing forms, as described in the manual. Regards, Sinisa __ _ _ ___ == MySQL AB /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic /*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED] /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaca, Cyprus /*/ /*/ /*/\*\_/*/ \*\_/*/ |*| /*/^^^\*\^^^ /*/ \*\Developers Team - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Join query
Hi All, I have a products table with usual id and price fields etc. The site uses prepay, in that you have a balance (eg 500) and I'm trying to make an add to basket query where, in one shot, I want something like SELECT sum(value)-(SELECT price FROM p_products WHERE seq_id = 88) as balance FROM vouchers WHERE balance 0; Vouchers table holds their voucher allocations (normal sum of "value" column in vouchers gives me their balance) and I obviously only want to add the product to the cart when it still leaves a balance 0; HELP !!! Thanks, Mark. -- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
recommend a good book for connecting from mysql to other dbs
Dear Tom - (Please bear with me for a philosophical prolog.) Tom Beidler writes: I'm running into more and more clients that would like to connect to another database. Say there inventory tracking software. I was wondering if there was a good book out there or a web site that might have some info that I can use to start thinking about strategies of connecting other dbs. PROLOG (See RESPONSE to escape ranting) This question highlights what seems to me to be a consistant theme throughout the list that I don't understand. The DBAs I've worked with in my career tell me that you should always err on the side of excessively methodical. That is, don't enter commands interactively but instead put your SQL in a script and run the script against a test database and only execute it against the production system when you've got it perfect. This ensures that your database machinations are reliably repeatable. Many of the questions on the list sound to me like "How do I write a set of SQL commands that will confirm the validity of a credit card number?" My confusion is, why on earth would you want to? If you're already using a scripting language (at least sometimes) to wrap your SQL then why don't you let it handle these sorts of problems. SQL and the DBMS are absolutely superior at handling a FEW very specific problems (i.e. sorting, writing, fetching). SQL is horrible at everything else. So, back to Tom's original question. Interfacing with other databases potentially in other DBMSs or maybe even data that isn't in a database is not really a database task. It's a programming task. The question that I would want answered is "I want to merge multiple data sources what tool will allow me to do that with all the different types of data I'm interested in?" RESPONSE The answers vary, of course, depending on what the data sources are but you should investigate what is referred to as "ETL" (Extract, Transform, Load). There is an extensive literature around this topic in the data warehousing realm. I'll plug my own preferences and suggest that you solve your problem with scripts written in perl. Perl has available with it a database abstraction mechanism called DBI/DBD that will allow you to access multiple databases in different DBMSs (and here's the kicker) without having to write code that is idiosyncratic to the DBMS. That is, the DBI abstraction allows you to write data sorting, writing, fetching logic (see philosophical ranting above) that is independent of the DBMS which is used to maintain the data. Alligator Descartes Tim Bunce, "Programming the Perl DBI" (O'Reilly, 2000), ISBN 1-56592-699-4 Yours - Billy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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_create_basic_N questions
Steve Newell writes: I tried using the sql_create_N macros, but my compiler crashes with an "INTERNAL COMPILER ERROR". I'm using VC++ 6.0 sp5. I spent several days trying to work around that and finally went back to the sql_create_basic_N. Steve Yes, I am afraid that VC++ can not chew up any of the above macros. We shall investigate it further. Regards, Sinisa __ _ _ ___ == MySQL AB /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic /*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED] /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaca, Cyprus /*/ /*/ /*/\*\_/*/ \*\_/*/ |*| /*/^^^\*\^^^ /*/ \*\Developers Team - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
capturing mysql errors in Perl
Hi, I've got a problem on one of my clients' servers, which is, that the errors mySQL throws are not captured by the Perl CGI using mySQL, but are thrown regardless, meaning that a CGI that provokes an error in mySQL will produce an unspecified "Internal Server Error", which is not very helpful for debugging purposes. It looks as if mySQL goes straight to the OS with the error, instead of giving Perl the chance to handle it? And how can this be avoided? Thank you in advance, Yogi - so what? Life's a long journey. yogi's numbers: e-mail: [EMAIL PROTECTED] snail-mail: yogi / Postfach 922143 / 45542 Sprockhvel / Germany fax/phone: (Berlin)+49(30)690-88394 (Paris)+33(1)53010735 (Seattle)+1(206)3742390 mobile: +49(177)599-6424 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
CONCAT in use with GROUP BY
Hello, the mysql-documentation says, that CONCAT or CONCAT_WS is not a function to use with GROUP BY, but I tried this in version 3.22 and it worked. Why doesn't it work with the latest version? Example: SELECT * FROM bids; ++---+-+ | id | comment | project | ++---+-+ | 1 | hello| 3 | | 2 | world| 3 | ++---+-+ SELECT CONCAT_WS(' ', comment) FROM bids GROUP BY project; +-+ | concat_ws(' ', comment) | +-+ | hello world | +-+ Greetings, Thomas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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.36 index problem(error 136)
Hi, We were running 3.23.21, which had the problem where the index file could only go to 64MB. So I shutdown the db, move the mysql directory(/usr/local/mysql) and installed 3.23.36, and moved the database directories into the new version's directory. I then repaired the radacct table. My problem is that the exact thing is happening with 3.23.36. It gets up to around 64MB and it stops(with table error 136): -rw-r- 1 mysqlmysql67009536 Apr 20 14:00 /usr/local/mysql/var/radius/radacct.MYI If I do a "REPAIR TABLE radacct QUICK", the index shrinks some and it works again, but as soon as it gets back up to 67MB it stops working again with the 136 error. System has plenty of space so that's not a problem. OS: Linux 2.2.19 on i386 Thanks for any help! Ole Gjerde Mimer AS - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 MyODBC
Hello to all, i'm developing a software in V.b.6 based on MySql d.b. Early i'll need to create a package in order to install this software. So, i need to know if i must to include, into the packege, only d.b. files and the ODBC or i must the install the complete version of MySQL. Another little question... If it's necessary only the ODBC, i must install them by the set-up downloaded from the site or can i copy and register the dll of ODBC? Thank you in advance. Matteo. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Merge Tables Oversight
Hi, I think I may have come up against a slight niggling omission concerning Merge tables. How does one find out what physical tables are mapped, other than by looking at the contents of the .MRG file? Surely this information should be displayed either when you do SHOW TABLE STATUS or by some other means? I never use SHOW TABLE STATUS, but you can use SHOW CREATE TABLE which will give you the complete CREATE TABLE statement for the MERGE table. This doesn't include the UNION part in MySQL 3.23.33, but I believe this was fixed in MySQL 3.23.36 and later. I did think of SHOW CREATE TABLE, but it didn't turn up anything when I tried it - now I know why. I'm using only version 3.23.32. Do you know if this fix in 3.23.36 is only concerning the client utilities, or would I have to upgrade my server too? I still think the mapped tables should be shown in SHOW TABLE STATUS, though... Regards, Basil Hussain ([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:weird indexing behavior in presense of LIMIT
Hi! Andrey is right, if I understood correctly. MySQL should notice that the index with two columns (color, randomkey) is the best because we have an equality condition on the first column color (= "black") and an inequality condition on the second column randomkey ( 30). Then MySQL can start the search with a key value ("black", 30) from the index and step forward in the index until the color value changes from "black" to something else. To estimate the number of rows in the result set, MySQL should estimate how many index records fall in the range ("black", 30) ... ("black", MAXINT) Thus it is an issue of optimizing also inequality conditions into the search parameters when that is possible. It does not happen very often that inequalities are useful but in this example it would be. If we only would have indexes on single columns color and randomkey, then there is not too much help from optimization. IBM's DB2 in these cases performs a 'hybrid join' which means that it does first a search on the first one-column index, then sorts the row pointers, then repeats the same for the second one-column index, and then compares which row pointers are in both sets. Regards, Heikki Hi! "Andrey" == Andrey Gubarev [EMAIL PROTECTED] writes: Andrey Here is a very easily reproduceable problem with mysql indices: Andrey Suppose we have two columns, color and randomkey. color is enum("black", Andrey "red", "blue"), black being 95% of all color values, and randomkey is an Andrey integer between 1 and 100. We also have two indices, one on randomkey, Andrey and one on (color, randomkey). Andrey The query Andrey select * from my_table where color = "black" and randomkey 30 Andrey limit 10 Andrey looks simple enough. One would expect mysql to use either the randomkey Andrey index (because the vast majority of rows are black anyways), or the color- Andrey randomkey index.Andrey In fact, the query above takes minutes. Andrey Mysql uses only the first part of the color-randomkey index (i.e. color) Andrey and examines 30 rows before it finds randomkey 30 (assuming the Andrey table has one million rows). Why? Wouldn't it make more sense to use all Andrey available indices when LIMIT is used? An index is bascily just a sorted list of keys and pointers to rows. You can't search on two of these at the same time. MySQL works the following way to solve the above query: - Check how many rows satisifes the condition: colur="black" - Check how many rows satisifes the condition: randomkey 0 - Use the key that is smaller.If you compare this to a telephone book: Assuming you have two telephone books, one where all entries are ordered by first name and a second where all names are ordered withlast name. How would you use the fact that you have two books when you are searching after 'John Smith' and there is one million Johns and one million Smiths? Note that under 'John' the last name comes in random order and under Smith all the first names comes in random order. Regards, Monty - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Question regarding count(*)
Hi Folks, i have a question regarding the handling of the count() option in a sql-statement. i have the following statement: select distinct(ip), count(*) from log group by ip This gives me a table with 2 columns and i want to it sorted by the count(*) column. How would i do that?? ...order by count(*) is not an option because it results in an error saying that count(*) does not exist. tia alex --- Alexander Hussel God said: tar xfvz universe.tar.gz - and the Universe was! celsius37.com AG Email mailto:[EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL and MyODBC
- Original Message - From: "Matteo" [EMAIL PROTECTED] Subject: MySQL and MyODBC i'm developing a software in V.b.6 based on MySql d.b. Early i'll need to create a package in order to install this software. So, i need to know if i must to include, into the packege, only d.b. files and the ODBC or i must the install the complete version of MySQL. I think that all depends on the nature of your application. If you must have a central database and your VB program acts as a client, then you would only have to include the ODBC driver. If each copy of your program can act independently of each other, in other words, if its strictly a desktop application, then yes, you would have to include a complete copy of MySQL. Another little question... If it's necessary only the ODBC, i must install them by the set-up downloaded from the site or can i copy and register the dll of ODBC? Well, that's a question that I have wrestled with also. There was a recent post (on 4/19/01) by one of the MySQL developers (Miguel Angel Solorzano) that addresses this issue, I would search in the archives for it. I haven't tried it just yet, but it does seem like a possible solution. Good Luck, Dennis **' Beridney Computer Services [EMAIL PROTECTED] http://www.beridney.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: Hangs on Installing all prepared tables
You did not get an answer because you did not follow directions in how to post a problem report. We don't know what kernel you are running , and what compiler you are using. How did you install it? If from sources, and assuming the mysqlprefix was /usr/local/mysql: Make sure you have a mysql user in your /etc/password file. chown -R mysql /usr/local/mysql mysql_install_db --user=mysql Ryan Quick wrote: I'm sorry to write again, but I've gotten no response and I'm totally stuck. I'm trying to install the latest version of MySQL on a P3 running Redhat 6.2. When I run mysql_install_db, it hangs after it reports "Installing all prepared tables." I've tried setting different permissions and everything else I've found in the list archive, but nothing works. I've tried deleting everything, including the mysql user and re-making the user, and nothing. If anyone can tell me what's going on, or point me in the direction to a solution, I'd truly be grateful. I'm so frustrated. Thanks much, Ryan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Merge Tables Oversight
Hi, On Fri, Apr 20, 2001 at 01:41:15PM +0100, Basil Hussain wrote: I think I may have come up against a slight niggling omission concerning Merge tables. How does one find out what physical tables are mapped, other than by looking at the contents of the .MRG file? Surely this information should be displayed either when you do SHOW TABLE STATUS or by some other means? I never use SHOW TABLE STATUS, but you can use SHOW CREATE TABLE which will give you the complete CREATE TABLE statement for the MERGE table. This doesn't include the UNION part in MySQL 3.23.33, but I believe this was fixed in MySQL 3.23.36 and later. Actually it was implemented in 3.23.34, but 3.23.34 and 3.23.35 were retracted because of some serious bugs. I did think of SHOW CREATE TABLE, but it didn't turn up anything when I tried it - now I know why. I'm using only version 3.23.32. Do you know if this fix in 3.23.36 is only concerning the client utilities, or would I have to upgrade my server too? It's in the server. I don't use 3.23.36 (or 37) yet because this is not important enough for me to warrant an update. My work-around is to list all tables and assume that all names with a certain prefix are part of the UNION (this should always be the case in my implementation). I still think the mapped tables should be shown in SHOW TABLE STATUS, though... I didn't test it (I still use 3.23.33 with a patch) but the change list says nothing about SHOW TABLE STATUS, so this probably hasn't changed. FWIW, I agree with you. Regards, Fred. -- Fred van Engen XO Communications B.V. email: [EMAIL PROTECTED] Televisieweg 2 tel: +31 36 5462400 1322 AC Almere fax: +31 36 5462424 The Netherlands - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 running as root.
add user=mysql to the [mysqld] section of /etc/my.cnf EX: [mysqld] user=mysql Sean Strycker wrote: Hello, I'm a newbe to Linux and MySQL, but I'm finding it very interesting. I'll cut right to the chase - I've followed the directions in the manual for the binary install on Linux. but every time I start up the mysql daemon and do a pstree -laup, it's running as root. This is on a development / play machine so it's not that big a deal, but my system admin says that I have to run it as user=mysql. I've tried changing the mysql.server script, the my.cnf file, etc. I cant figure it out - how to make it start up and run as user=mysql!?! Anywho - any help would be appreciated. Thanks, Sean. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Question regarding count(*)
Hi, On Fri, Apr 20, 2001 at 03:01:25PM +0200, [EMAIL PROTECTED] wrote: i have a question regarding the handling of the count() option in a sql-statement. i have the following statement: select distinct(ip), count(*) from log group by ip This gives me a table with 2 columns and i want to it sorted by the count(*) column. How would i do that?? ...order by count(*) is not an option because it results in an error saying that count(*) does not exist. That should work in 3.23.xx. If you use 3.22.x then try this: select distinct(ip), count(*) as cnt from log group by ip order by cnt Regards, Fred. -- Fred van Engen XO Communications B.V. email: [EMAIL PROTECTED] Televisieweg 2 tel: +31 36 5462400 1322 AC Almere fax: +31 36 5462424 The Netherlands - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 Linux 7 installation question
No, it can't find the file because the mysql database directory is owned by root. Rolf Hopkins wrote: More like it has already started. Do "ps -ef | grep mysql" to find out. - Original Message - From: "Gerald Clark" [EMAIL PROTECTED] To: "Steve Tuckner" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, April 20, 2001 0:21 Subject: Re: Newbie Linux 7 installation question chown -R mysql /var/mysql Steve Tuckner wrote: When I run safe_mysqld, it starts and ends immediatly. In the mysqld.log in /var/log it has the following: 010418 21:19:47 mysqld started 010418 21:19:47 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 010418 21:19:47 mysqld ended Below is the my.cnf file [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid I ran mysql_install_db and it created database files in /var/lib/mysql/mysql. The file host.frm does exist in that directory. I tried copying those files /var/lib/mysql but it made no difference. I have no ethernet card in the machine and therefore it would be running as localhost. Any ideas??? Thanks, 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
Tables relationships
Is it's possible to make some kind of relationships between tables as it's realised in MsAccess. In MsAccess databases it's called "Enforce referential integerity" and it's have some subchoises: 1)cascade update related fields and 2)cascade delete related records. Is MySQL realize such things and if Yes then - how it's could be realised Help me please! Andis. P.S. Sorry about my English.
Re: databases and operating systems
Ben, the relation of databases and OS's is a question also mentioned in Jim Gray's and Andreas Reuter's bool Transaction processing. I have written the InnoDB table handler (= storage engine) under MySQL. Let me think how operating systems could make database implementation easier. - Log-based file systems could take the role of recovery mechanism in case of a crash. For it to be feasible, the file system should immediately write a log to a safe place of any changes to files cached in the file cache of the OS. I do not know if such database-like file systems exist. - The file cache of the operating system could take the place of the buffer pool of the database. This is actually done in MySQL because MySQL caches the data of rows in the file cache of the OS. Only indexes are cached in MySQL's own 'key cache'. - The file system of the OS can do the storage of tables and indexes into regular files. That is how MySQL actually works. In InnoDB I decided to build my own file space management, where the database takes care of space allocation in a 'tablespace' consisting of one or more files. - Many databases implement their own thread abstraction above the processes or threads of an OS. The reason is that OS threads use too much memory, or thread scheduling is slow in the OS if there is alarge number of threads. MySQL uses OS threads or a user-space library threads, and does not implement its own thread abstraction. InnoDB engine has its own thread abstraction above OS threads. There are many performance-related viewpoints to the above questions. Generally the services of operating systems are not as highly optimized code as what is found in databases, and database implementors have written their own modules to get the best performance. - A special detail is semaphore (like a mutex) implementation. Datbase implementors have tradiitionally written their own semaphores using a test-and-set machine instruction. It would be better if an OS would provide such a fast semaphore operation in a library. I looked at FreeBSD source code and found that a pthread mutex there is still much more complex, and consequently slower than a mutex I can write myself using a machine instruction. However, in Win NT a 'CriticalSection' corresponding to a mutex is very fast, I think. For portability it would be better to use OS mutexes. Thus an OS could to some extent help the work of us database implementors. But the services of the OS should then be written to be fast enough. - Standardized interfaces is a very important property of an OS from the database viewpoint. Databases use quite a rich set of OS services and deviations from (Posix) standards in an OS cause quite a lot of work in form of portability bugs. Hope this helps your work. Regards, Heikki Tuuri Innobase Oy Ok. Now you make more sense. This is from my personal point of view. In general, I prefer speed, ease of use and ease of maintenance. What I like about mysql is that you can choose which features to build into it when compiling. For example, standard mysql does not come built with transaction support and, as transactions tend to take up time, I prefer not to use it. You don't have much of a choice in other database packages. Sure mysql lacks functionality, but that will come as the developers progress. The other bells and whistles, that come with most other products like Oracle MSSQL server, aren't used very often and usually tend slow down queries, whether they're used or not.- Original Message - From: "Ben Garvey" [EMAIL PROTECTED] To: "Rolf Hopkins" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, April 20, 2001 13:43Subject: Re: databases and operating systems Sorry for the topic if if is off, but there are more uses for databasesthan just in PCs. I don't mean writing an OS explicitly using/for databases (like PalmOS), but rather, what features would better support modern databases. Ben Garvey - Original Message - From: "Rolf Hopkins" [EMAIL PROTECTED] To: "Ben Garvey" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, April 19, 2001 11:43 PM Subject: Re: databases and operating systems This is rather off topic but for what it's worth, to me, it doesn't make much sense in gearing OSs more towards databases. PCs do far more than just databases. - Original Message - From: "Ben Garvey" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 20, 2001 1:52 Subject: databases and operating systems Hello, my name is Ben Garvey and I'm doing a research paper on whether operating systems should be rewritten to offer more support for databases. What type of operating system features could benefit database implementors? Thank you in advance. Ben Garvey American University 202-332-6218 - Before posting, please check: http://www.mysql.com/manual.php (the manual)
Re: Question regarding count(*)
[EMAIL PROTECTED] wrote: i have a question regarding the handling of the count() option in a sql-statement. i have the following statement: select distinct(ip), count(*) from log group by ip This gives me a table with 2 columns and i want to it sorted by the count(*) column. How would i do that?? ...order by count(*) is not an option because it results in an error saying that count(*) does not exist. Try aliasing count(*). ..., count(*) AS count ORDER BY count -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.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: Newbie Linux 7 installation question
Gerald's recommendation worked peachily -Original Message- From: Gerald Clark [mailto:[EMAIL PROTECTED]] Sent: Friday, April 20, 2001 8:31 AM To: Rolf Hopkins Cc: Steve Tuckner; [EMAIL PROTECTED] Subject: Re: Newbie Linux 7 installation question No, it can't find the file because the mysql database directory is owned by root. Rolf Hopkins wrote: More like it has already started. Do "ps -ef | grep mysql" to find out. - Original Message - From: "Gerald Clark" [EMAIL PROTECTED] To: "Steve Tuckner" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, April 20, 2001 0:21 Subject: Re: Newbie Linux 7 installation question chown -R mysql /var/mysql Steve Tuckner wrote: When I run safe_mysqld, it starts and ends immediatly. In the mysqld.log in /var/log it has the following: 010418 21:19:47 mysqld started 010418 21:19:47 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 010418 21:19:47 mysqld ended Below is the my.cnf file [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid I ran mysql_install_db and it created database files in /var/lib/mysql/mysql. The file host.frm does exist in that directory. I tried copying those files /var/lib/mysql but it made no difference. I have no ethernet card in the machine and therefore it would be running as localhost. Any ideas??? Thanks, 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
Replication and compression
Is it possible to enable compression between replicating database servers? I'm assuming that there is already compression code in place, because of the need to link with the compression libraries on the client end sometimes. Compressing the replication connection has certain advantages where the connection speed is slow, and the servers at either end are not being stressed due to slow data transfer. Scott V - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: recommend a good book for connecting from mysql to other dbs
"Tom Beidler" [EMAIL PROTECTED] wrote: I'm running into more and more clients that would like to connect to another database. Say there inventory tracking software. I was wondering if there was a good book out there or a web site that might have some info that I can use to start thinking about strategies of connecting other dbs. Connecting other databases to what? If you're envisioning making legacy databases talk to your MySQL database then you're probably in over your head. I'm not saying it can't be done, but I'm saying that anyone that asks the questions you did without providing more specific details probably doesn't have the expertise to satisfy the client's needs. I'm looking for a starting point. Maybe I should wait till I have a specific example? An example would be useful, but some details would be more helpful. This doesn't even appear to be a MySQL issue. More likely, it's a programming issue and would be better suited for a mailing list related to your programming language of choice. PHP has functions for interfacing with a number of databases, but it's impossible to say whether it supports your clients' databases without knowing what they are. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL on iPAQ
Hello, I wanted to compile mysql to the Compaq iPAQ handheld computer which runs Linux. I hardly manage to compile the sql_yacc.o, and finally compiled, but I realized that the mysqld binary is very-very huge for a handheld, it is 2M (stripped). Does anyone has idea how to shrink this by removing features which are not necessary to be in a handheld? For example I don't need ISAM table type, transaction-enabled tables, multi-thread design, but I want to keep the rich set of functions. Does anyone work on similar projects? I have compiled the latest version, 3.23.36, with the following command: ./configure --prefix=/usr/local/mysql --with-gnu-ld --with-pthread \ --enable-assembler--without-raid --disable-large-files --without-debug \ --with-low-memory --without-docs --without-bench \ --with-extra-charsets=hungarian--without-berkeley-db --without-innobase \ --without-gemini Thanks in advance, dLux -- Hal 9000 - "Put down those Windows disks Dave Dave? DAVE!!" - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL vs SQLServer vs PostgresSQL
"William Goedicke" [EMAIL PROTECTED] wrote: The broader feature set of Postgres over MySQL doesn't get a lot of intelligent rebuttal. True. Fortunately, many web projects don't need triggers, subselects, etc. (and PostgreSQL is IMHO a little more difficult to manage). In those cases speed is probably an important criteria and MySQL is arguably faster. However this is the first time I've ever heard someone claim that Postgres is faster. Last summer Tim Perdue posted an article on phpbuilder that compared Postgre and MySQL and included some testing. I don't recall any of the details of the testing, but I do recall that it showed MySQL was faster, but Postgre could handle more client connections. See http://www.phpbuilder.com/columns/tim2705.php3. I haven't seen a benchmark for speed that Postgre has won, but as Postgre gets faster and MySQL adds more functionality perhaps the debate over the better RDBMS will be more interesting. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.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: Tables relationships
No, MySQL does not help in enforcing referential integrity. You need to do that with your application. In some people's opinion (not mine), it is one of the major drawbacks to using MySQL. Is it's possible to make some kind of relationships between tables as it's realised in MsAccess. In MsAccess databases it's called "Enforce referential integerity" and it's have some subchoises: 1)cascade update related fields and 2)cascade delete related records. Is MySQL realize such things and if Yes then - how it's could be realised Help me please! Andis. P.S. Sorry about my English. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 commands from Linux shell
Hi to all: I have a linux script and I need it can execute some mysql commands. Is it possible? If possible, how? Best regards, Fabio Galarraga [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
Problems with Too Many Connections
Hello. I wrote a few days ago when I was having trouble with too many connections to my server. Since then I upgraded to 3.23.36 to see if that would help... Basically I have a PHP (4.0.4pl1) application that does both SELECTS and INSERTS against mySQL and is very active. It's my understanding that PHP closes the connection after it delivers the page to the user. When the server gets into the "too many connections" state I can't even login (though the manual seems to claim I should be able to since it does max_connections+1, I still cannot) so I can't see what's in the processlist. I'm trying to discover the best way to troubleshoot this problem. I tried upping the user max_connections variable but that didn't help... It's hard to troubleshoot since I don't know what's going on. Any help would be appreciated. Hunter - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
capturing mysql errors in Perl
Dear Yogi - yogi writes: I've got a problem on one of my clients' servers, which is, that the errors mySQL throws are not captured by the Perl CGI using mySQL, but are thrown regardless, meaning that a CGI that provokes an error in mySQL will produce an unspecified "Internal Server Error", which is not very helpful for debugging purposes. It looks as if mySQL goes straight to the OS with the error, instead of giving Perl the chance to handle it? And how can this be avoided? Hmmm, maybe I'm not interpreting your message correctly, but it sounds to me like you're experiencing the standard CGI error handling problem along with perhaps some signal handling. CGIs are awkward to debug using standard web browsers because normally error messages don't have HTTP headers so all you ever get is "Internal Server Error". That's what the browser says when you pass it information that's not properly formatted HTTP. The best way to deal with this problem is to use a pretend browser like the command line or emacs W3 and debug your code that way. As to the perl signal handling I would go to the "Advanced Perl Programming" book. I'd be willing to take a look if you want to share the offending code. Yours - Billy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: capturing mysql errors in Perl
On 20 Apr 2001, at 14:16, yogi wrote: errors mySQL throws are not captured by the Perl CGI using mySQL, but are thrown regardless, meaning that a CGI that provokes an error in mySQL will produce an unspecified "Internal Server Error", which is not very helpful for debugging purposes. It looks as if mySQL goes straight to the OS with the error, instead of giving Perl the chance to handle it? And how can this be avoided? Thank you in advance, Yogi This should be obvious but I mention it because it works for me. Search for eval on this page, or just reread the whole page: http://www.oreilly.com/catalog/perldbi/chapter/ch04.html I don't think this is mysql specific as following the above instructions works for me with mysql. Peter All idioms must be learned. Good idioms only need to be learned once. --Alan Cooper - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 w/ Too Many Connections
I have mySQL threads that are sleeping with LONG times from a PHP app. What kind of PHP call could sleep that long w/o dying? Hunter - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Limiting Connections (per host)
Is there any way to limit connections to MySQL server on a per-host basis? There are the: max_connections and max_user_connections options for mysqld on the command-line, but I cannot see any way of limiting them on a per-host basis? Is there any way? Thanks, Ollie -- Oliver CookSystems Administrator, ClaraNET [EMAIL PROTECTED] 020 7903 3000 ext. 291 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
hang problem with mysql
Hi, I am using several mysql servers as a support for a high traffic site. The problem is that from time to time, and during last few days daily :, mysql hangs. It hangs so bad that even kill -9 can't kill it, the process is still there. :( Now, a little info about my setup: # gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) rh6.2, linux kernel 2.4.3, intel platform, dual PIII/800, 1G ram. mysql: 3.23.37, but the problems are here even with 3.23.32 :( No special configure options (just --prefix) :) any suggestions? where should I look? Regards, Vladimir -- Phone numbers: home: +38111459023 mobile: +381641161792 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 commands from Linux shell
Fabio Galarraga wrote: Hi to all: I have a linux script and I need it can execute some mysql commands. Is it possible? If possible, how? Best regards, Fabio Galarraga [EMAIL PROTECTED] see mysql --help you probably want mysql -e "SQL code here" dbname - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 commands from Linux shell
Fabio Galarraga wrote: Hi to all: I have a linux script and I need it can execute some mysql commands. Is it possible? If possible, how? Simply put the SQL commands in a text file. To execute them in the bash script you use the mysql client program: mysql -u user -p password the_database the_sql_commands_file.sql Robert - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Restoring from Bin Log on Windows
Hello, Could someone show me how to restore a database from the bin logs? I've tried several times and get errors like "server id not set", etc. Is this only for replication? I want to use logging to restore the database in case of another crash, but I can't figure out how to restore from the logs. If you know, please let me know. Thank you in advance, Lee Jenkins
Re: Mysql commands from Linux shell
yes absolutely...look into mysqlbackup (http://www.ocsny.com/main/index.ocs?url=osl ) for an example. Cheers, Miekl Fabio Galarraga wrote: Hi to all: I have a linux script and I need it can execute some mysql commands. Is it possible? If possible, how? Best regards, Fabio Galarraga [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SQL Syntax question
Hi there, I'm using mysql 3.22.27 and get error when trying to run this select statement: SELECT custmls.mlsnumber,custmls.streetnumber,custmls.streetdirect, FORMAT(custmls.currentprice,0),custmls.streetnam,custmls.streetaddtl, custmls.municname,custmls.state,custmls.zipcd,custmls.salesassoc, ipix.url,custmls.listagentname,FORMAT(custmls.numrooms,0), FORMAT(custmls.numbedrooms,0),custmls.fullbaths FROM custmls,ipix where custmls.mlsnumber = ipix.mlsnumber AND custmls.listingoffice = 0251 AND (custmls.listingstatus = 'ACT' or custmls.listingstatus = 'A*') AND custmls.scategory = 1 ORDER BY custmls.currentprice The error is: "1064 You have an error in your SQL syntax near 'ON ipix custmls.mlsnumber = ipix.mlsnumber where custmls.listingoffice = 0251 AN' at line 1 " Any ideas? Thanks Pat Pat Militzer Tech Support Supervisor Metro/MLS Inc. 11430 W North Ave Wauwatosa, WI 53226 414-778-5400 ext. 124 Fax 778-6143 email: [EMAIL PROTECTED] web site: www.metromls.com www.wihomes.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
64MB Limit on MyISAM indexes?
I've got tables in ISAM format whose indexes are way over 64 MB. However, when I try to create a MyISAM table with an index that big I get errors and confirming that with myisamchk I get: myisamchk: warning: Keyfile is almost full, 67107839 of 67107839 used Which is essentially 64MB. Are MyISAM tables able to handle large indexes? I hope I don't have to go back to ISAM tables... Any suggestions? Thanks, Jeff Brewer Spam filter bypass: (database,sql,query) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysql commands from Linux shell
Except, leave out the space bhetween the -p and the password, or put the userid and the password in your .my.cnf file. Robert Vetter wrote: Fabio Galarraga wrote: Hi to all: I have a linux script and I need it can execute some mysql commands. Is it possible? If possible, how? Simply put the SQL commands in a text file. To execute them in the bash script you use the mysql client program: mysql -u user -p password the_database the_sql_commands_file.sql Robert - - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Tables relationships
Has anyone ever bothered to make a front-end API to MySQL that does maintain referential integrity and/or allow function calls on events? It might make an interesting library to write for RDBMS migrators ... - Original Message - From: "Christopher R. Jones" [EMAIL PROTECTED] No, MySQL does not help in enforcing referential integrity. You need to do that with your application. In some people's opinion (not mine), it is one of the major drawbacks to using 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
myODBC on Linux newbie question
Hi, I am setting up MyODBC and iODBC on RedHat 6.2. I have not found any good linux docs. Everyone talks about Windows. Question, what directory does . iodbc.ini go so an app running as user 'nobody' will use it. /root ? /usr/local/etc/ ? One doc talked about restarting the driver when .iodbc.ini files has changed. how do I do that? For that matter, how do I start MyODBC / iODBC ? these are simple questions, but there is no place I've found that talks about MyODBC linux in detail. MySQL is running on another Linux box and is talking to Webmin just fine. TIA - Jim - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 doesn't this work? (C code)
G'day, This USED to work, then all of a sudden for no apparent reason it has suddenly decided not to: if I change the code thus: if(*row1[2] == 'l') { ; } else if(*row1[2] == 'e') It completes, but of course this isn't any good. Is there something fundamentally wrong with using the same connection for more than one 'cursor'? I understood that mysq_store_result() simply writes the result set to a 2D character array. T4 there should'nt be a problem. - static MYSQL_RES *res1, *res2; static MYSQL mysql; static MYSQL_ROW row1, row2; static char theSql[250]; static void slct_opt(void) { char theHtml1[] = "\ntr\n td class=\"body\"%s/td" "\n td class=\"body\""; sprintf(theSql, "SELECT oc.id, ot.id, oc.i_type, oc.i_prefix, oc.cls_txt, oc.o_name," " ot.o_type, oc.i_len FROM optn_cls oc, optn_type ot" " WHERE oc.id = ot.ocls_id AND ot.type_id = %s" " GROUP BY ot.ocls_id ORDER BY ot.disp_ord", lstg_type); mysql_query(mysql, theSql); res1 = mysql_store_result(mysql); if(res1) { while((row1 = mysql_fetch_row(res1))) { printf(theHtml1, row1[4]); if(*row1[2] == 'l') { sprintf(theSql, "SELECT so_val, so_text FROM slct_optns WHERE otype_id = %s" " AND so_val 0 ORDER BY so_val", row1[1]); mysql_query(mysql, theSql); res2 = mysql_store_result(mysql); if(res2) { printf("select name=\"%s\"", row1[5]); while((row2 = mysql_fetch_row(res2))) printf("\noption value=\"%s\"%s/option", row2[0], row2[1]); printf("/select"); } mysql_free_result(res2); } else if(*row1[2] == 'e') { printf("nbsp;%snbsp;input type=\"text\" name=\"%s\" maxlength=\"%s\"", row1[3], row1[5], row1[8]); } } printf("/td\n/tr"); } mysql_free_result(res1); mysql_free_result(res2); } Any help much appreciated - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysqld running as root.
Thankx, That did the trick! So simple yet so. well... simple! - Original Message - From: Gerald Clark [EMAIL PROTECTED] To: Sean Strycker [EMAIL PROTECTED] Cc: MySQL [EMAIL PROTECTED] Sent: Friday, April 20, 2001 6:27 AM Subject: Re: Mysqld running as root. add user=mysql to the [mysqld] section of /etc/my.cnf EX: [mysqld] user=mysql Sean Strycker wrote: Hello, I'm a newbe to Linux and MySQL, but I'm finding it very interesting. I'll cut right to the chase - I've followed the directions in the manual for the binary install on Linux. but every time I start up the mysql daemon and do a pstree -laup, it's running as root. This is on a development / play machine so it's not that big a deal, but my system admin says that I have to run it as user=mysql. I've tried changing the mysql.server script, the my.cnf file, etc. I cant figure it out - how to make it start up and run as user=mysql!?! Anywho - any help would be appreciated. Thanks, Sean. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
Is any limit on how many tables one database can have?
Hi, I'm designing a database and I was wandering which one is better: A) 1000 tables (e.g. 10,000 rows each) in one database or B) One table with (e.g. 10,000,000 rows) and each group with special ID (in one extra column) And if I need to have many tables in one database, is any limit on how many tables one database can have? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: myODBC on Linux newbie question
We are using a shopping cart / front end called WebCatalog and it needs ODBC. I know there are other solutions, but if we can get ODBC working then there is no code change for WebCatalog - Jim why are you using ODBC if you're trying to connect from one linux box to a MySQL database housed on another linux box? You should have other, better tools available for whatever language you're trying to connect from... what exactly are you trying to do? jim wrote: Hi, I am setting up MyODBC and iODBC on RedHat 6.2. I have not found any good linux docs. Everyone talks about Windows. Question, what directory does . iodbc.ini go so an app running as user 'nobody' will use it. /root ? /usr/local/etc/ ? One doc talked about restarting the driver when .iodbc.ini files has changed. how do I do that? For that matter, how do I start MyODBC / iODBC ? these are simple questions, but there is no place I've found that talks about MyODBC linux in detail. MySQL is running on another Linux box and is talking to Webmin just fine. TIA - Jim - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Possible bug in 3.23.32 or later
FWIW: It also appears to me that negative one (-1) plus one (1) is ZERO (0) which may be why you are having trouble...? in ignorance, haiku On Wednesday, April 18, 2001, at 01:09 AM, Milo Stefani wrote: As Far as I can remember it is explicitly said in the Manual that inserting a negative value in an autoincrement field is a Bad Thing - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 18, 2001 6:14 AM Subject: Possible bug in 3.23.32 or later Description: When i insert into a negative integer into primary key (id int) field, it works fine. However, the next insert i do without specifing the id explicitly and relying on mysql to generate the next number in the sequence (should be 1) will use the upper bound (2^32 - 1) Then every other insert after that will not insert since there are no id's available. How-To-Repeat: CREATE TABLE category ( idINT NOT NULL AUTO_INCRE17;6, name VARCHAR(50) NOT NULL, code VARCHAR(50) NOT NULL, description TEXT, picture VARCHAR(50), parentINT NOT NULL DEFAULT 0, activeTINYINT, members INT NOT NULL DEFAULT 0, storeid INT, feature1 INT NOT NULL DEFAULT 0, feature2 INT NOT NULL DEFAULT 0, priority INT, KEY (code), KEY (name), PRIMARY KEY (id) )\g INSERT INTO category (id,name,code,description,picture,parent,active,members,storeid,feature1, fea ture2) VALUES (-10,'NEW','NEW','All new products','none',-1,0,0,1,0,0); Then try: INSERT INTO category (name,code,description,picture,parent,active,members,storeid,feature1,featur e2) VALUES ('test','test','All test products','none',-1,0,0,1,0,0); That should make the id 2^32 -1 (or something aroudn there). That id should be 1!!! Fix: Submitter-Id: submitter ID Originator: Duane Homick Organization: Inline Internet Systems, Inc. MySQL support: none Synopsis: bug in primary key insert with negative integers Severity: serious Priority: medium Category: mysql Class: sw-bug Release: mysql-3.23.32 (TCX binary) Environment: - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 mysql-unsubscribe- [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: problem
On Wednesday, April 18, 2001, at 07:29 AM, B. van Ouwerkerk wrote: I'm trying to install mysql onto a uniz environment. I've already unzipped and untarred, and I've created the mysql - version directory, but when I type configure, I get a grant table failed error. I cant find anything on how to fix this. Take a look at www.devshed.com they've got a nice tutorial.. more specifically: mysql basic area:http://www.devshed.com/Server_Side/MySQL/ and grant tables: http://www.devshed.com/Server_Side/MySQL/Grant_Tables/ luck, haiku - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Is any limit on how many tables one database can have?
Hello, I would recomend getting a good book that covers "Database Normalization," this has to do with database design theories, etc. Or just look for a good book on "Database Design". - Original Message - From: SED [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 20, 2001 10:56 AM Subject: Is any limit on how many tables one database can have? Hi, I'm designing a database and I was wandering which one is better: A) 1000 tables (e.g. 10,000 rows each) in one database or B) One table with (e.g. 10,000,000 rows) and each group with special ID (in one extra column) And if I need to have many tables in one database, is any limit on how many tables one database can have? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Mysql.pm - prepare function error
All, I have several scripts (downloaded) - that have a similar error for example.. . perl -w enter_bug.cgi [Fri Apr 20 07:22:48 2001] enter_bug.cgi: defined(%hash) is deprecated at CGI.pl line 121. [Fri Apr 20 07:22:48 2001] enter_bug.cgi: (Maybe you should just omit the defined()?) Can't call method "prepare" on an undefined value at /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/Mysql.pm line 166 (#1) (F) You used the syntax of a method call, but the slot filled by the object reference or package name contains an undefined value. Something like this will reproduce the error: $BADREF = undef; process $BADREF 1,2,3; $BADREF-process(1,2,3); Content-type: text/html H1Software error:/H1 CODECan't call method quot;preparequot; on an undefined value at /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/Mysql.pm line 166. /CODE P "prepare_error.txt" 41L, 1219C segment of Mysql.pm - line 166 -- sub query ($$) { my($self, $statement) = @_; my $dbh = $self-{'dbh'}; --- my $sth = $dbh-prepare($statement); if (!$sth) { $db_errstr = $dbh-errstr(); return undef; } $sth-{'PrintError'} = !$Mysql::QUIET; my $result = $sth-execute(); if (!$result) { $db_errstr = $sth-errstr(); return undef; Any help is greatly appreciated didn't think I'd have to "modify" the mysql.pm file Lamar (a newbie) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL and MyODBC
You may freely distribute Myodbc.dll. I got this information from Mysql Devepolment Team. You may include myodbc.dll in your distributing project. For more information : http://www.avukatpro.com/mysql.hmtl First question's answer is : (not sure 100%) I think you have to distibute mysql directory. Especially you are using extra character set. But if you are using this software for commercial use you have to pay license fee of mysqlserver. For more information : http://www.mysql.com - Original Message - From: Matteo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 20, 2001 3:13 PM Subject: MySQL and MyODBC Hello to all, i'm developing a software in V.b.6 based on MySql d.b. Early i'll need to create a package in order to install this software. So, i need to know if i must to include, into the packege, only d.b. files and the ODBC or i must the install the complete version of MySQL. Another little question... If it's necessary only the ODBC, i must install them by the set-up downloaded from the site or can i copy and register the dll of ODBC? Thank you in advance. Matteo. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: hang problem with mysql
On Friday 20 April 2001 16:25, you wrote: Hi, I am using several mysql servers as a support for a high traffic site. The problem is that from time to time, and during last few days daily :, mysql hangs. It hangs so bad that even kill -9 can't kill it, the process is still there. :( Now, a little info about my setup: # gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) rh6.2, linux kernel 2.4.3, intel platform, dual PIII/800, 1G ram. mysql: 3.23.37, but the problems are here even with 3.23.32 :( No special configure options (just --prefix) :) any suggestions? where should I look? Regards, Vladimir Btw, I upgraded glibc to 2.2.2, and gcc to 2.95.1 and now, when I compile mysql with new glibc, load goes sky high, and anfer a while mysql hangs again. Right now, I left glibc to 2.2.2, and started mysql 3.23.36 compiled against old libraries, and now at least load isn't 40+, and mysql manages to stay alive longer. Vladimir -- Phone numbers: home: +38111459023 mobile: +381641161792 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
complicated query
I would like to do something similar to an ORDER BY in one of my select statements, but I'mt not sure how to do something as complicated as this: I have two columns, category and subcategory, that I am retrieving. I would like category and subcategory to be sorted alphabetically. This is easy with an 'ORDER BY 1 2', but I would like categories that are named 'other' to be put off until the end. So, I'd get something like this: abcd ghikj z other Is there a way to do this type of query? Thanks in advance. Jeff Shipman E-Mail: [EMAIL PROTECTED] Systems Programmer Phone: (505) 835-5748 NMIMT Computer Center http://www.nmt.edu/~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
show tables return nothing. show databases too.
Description: empty show tables How-To-Repeat: show tables; Submitter-Id: submitter ID Originator:[EMAIL PROTECTED] Organization: poelzi.org MySQL support: none Synopsis: show tables return nothing. show databases too. Severity: serious Priority: high Category: mysql Class: sw-bug Release: mysql-3.23.37 Environment: System: Linux cinis.poelzi.org 2.4.3 #5 Wed Apr 18 23:12:52 CEST 2001 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/i586-mandrake-linux/2.95.2/specs gcc version 2.95.2 19991024 (release) Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS='' LIBC: -rw-r--r-- 1 root root 24419620 Apr 18 19:42 /lib/libc.a -rw-r--r-- 1 root root 176 Apr 18 19:42 /lib/libc.so lrwxrwxrwx 1 root root 13 Apr 19 08:22 /lib/libc.so.6 - libc-2.2.2.so -rwxr-xr-x 1 root root 5195054 Dec 15 1999 /lib/libc-2.1.2.so -rwxr-xr-x 1 root root 4903193 Apr 18 19:47 /lib/libc-2.2.2.so -rw-r--r-- 1 root root 20508346 Dec 15 1999 /usr/lib/libc.a -rw-r--r-- 1 root root 178 Dec 15 1999 /usr/lib/libc.so Configure command: ./configure --prefix=/usr/local/mysql --enable-assembler - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Convert varchar to number field
Hi, I started a table with a varchar filed of 11 characters for a column that would hold data such as 0.27; 11; 0.6; 1; 5; 7.5; 11.2; etc I wasn't sure if a 'number' field would work. Now I want to list the values in this column and they do not list numerically, for example: if we had 0.27; 0.6; 1; 5; 7.5; 11; then 11 would come before 5 and 7.5 (alphanumerically). What I need is them to list numerically, so they would list like: 0.27 0.6 1 5 7.5 11 11.2 Any advice on what to change the field type to or how to convert it at the time of querying via PHP would be great. Thanks. Martin - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: complicated query
you want a function that prepends the letter a to the category/subcategory names that are not other. then you order by that function, but do not display it. select category,subcategory from foo2 order by if(category= 'other','zz',concat('a',category)); i.e. everything except other begins with an a as far as the order by is concerned, while other is zz for sorting purposes. -Original Message- From: Jeff Shipman - SysProg [mailto:[EMAIL PROTECTED]] Sent: Friday, April 20, 2001 2:39 PM To: [EMAIL PROTECTED] Subject: complicated query I would like to do something similar to an ORDER BY in one of my select statements, but I'mt not sure how to do something as complicated as this: I have two columns, category and subcategory, that I am retrieving. I would like category and subcategory to be sorted alphabetically. This is easy with an 'ORDER BY 1 2', but I would like categories that are named 'other' to be put off until the end. So, I'd get something like this: abcd ghikj z other Is there a way to do this type of query? Thanks in advance. Jeff Shipman E-Mail: [EMAIL PROTECTED] Systems Programmer Phone: (505) 835-5748 NMIMT Computer Center http://www.nmt.edu/~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 newbie questions.
Does anyone know exactly where to put the mysql.server file? is it in /etc? When I run it I get these ./mysql.server: @HOSTNAME@: command not found ./mysql.server: my_print_defaults: command not found Which leads me to believe I'm doing somthing wrong.
Re: complicated query
"Jeff Shipman - SysProg" [EMAIL PROTECTED] wrote: I would like to do something similar to an ORDER BY in one of my select statements, but I'mt not sure how to do something as complicated as this: I have two columns, category and subcategory, that I am retrieving. I would like category and subcategory to be sorted alphabetically. This is easy with an 'ORDER BY 1 2', but I would like categories that are named 'other' to be put off until the end. So, I'd get something like this: abcd ghikj z other Is there a way to do this type of query? Thanks in advance. If you make the category field an ENUM type then it will automatically be sorted in the same order as the order of the ENUM values. Another option would be to create an additional column (or 2 columns if the same problem occurs in "subcategory") and assign records with a category of "other" a value of 1 and assign all other records a default value of 0. Let's call the new field "order_1" Then you could construct an ORDER BY clause like: ORDER BY order_1, category... -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.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: Convert varchar to number field
"Martin E. Koss" [EMAIL PROTECTED] wrote: I started a table with a varchar filed of 11 characters for a column that would hold data such as 0.27; 11; 0.6; 1; 5; 7.5; 11.2; etc I wasn't sure if a 'number' field would work. Now I want to list the values in this column and they do not list numerically, for example: if we had 0.27; 0.6; 1; 5; 7.5; 11; then 11 would come before 5 and 7.5 (alphanumerically). What I need is them to list numerically, so they would list like: 0.27 0.6 1 5 7.5 11 11.2 Any advice on what to change the field type to or how to convert it at the time of querying via PHP would be great. Thanks. Use an ALTER TABLE statement. Something like the following: ALTER TABLE table_name MODIFY field_name DECIMAL(4,1) UNSIGNED Make sure you choose a numeric type that is appropriate. See the online manual for options. If you're worried you might ruin your data with this conversion first create a copy of the table and experiment on it instead. CREATE TABLE my_copy SELECT * FROM original_table Note that it won't copy the indexes, but it will create a copy of the table. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.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: complicated query
On Fri, Apr 20, 2001 at 03:39:59PM -0400, Steve Werby wrote: "Jeff Shipman - SysProg" [EMAIL PROTECTED] wrote: I would like to do something similar to an ORDER BY in one of my select statements, but I'mt not sure how to do something as complicated as this: I have two columns, category and subcategory, that I am retrieving. I would like category and subcategory to be sorted alphabetically. This is easy with an 'ORDER BY 1 2', but I would like categories that are named 'other' to be put off until the end. So, I'd get something like this: abcd ghikj z other Is there a way to do this type of query? Thanks in advance. If you make the category field an ENUM type then it will automatically be sorted in the same order as the order of the ENUM values. Another option would be to create an additional column (or 2 columns if the same problem occurs in "subcategory") and assign records with a category of "other" a value of 1 and assign all other records a default value of 0. Let's call the new field "order_1" Then you could construct an ORDER BY clause like: ORDER BY order_1, category... You don't need to create another column, just use: ORDER BY category = 'other', category -- "Freedom is just chaos with better lighting." -- Alan Dean Foster Rick Pasotto 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
today type function for TIMESTAMP col?
how do you query on a TIMESTAMP column to return all records of date today? I've been using "where date = 20010418 AND date 20010419" syntax and changing the dates as necessary, but I'd like to replace this with some kind of today() function. Andrew - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: today type function for TIMESTAMP col?
Andrew Warner wrote: how do you query on a TIMESTAMP column to return all records of date today? I've been using "where date = 20010418 AND date 20010419" syntax and changing the dates as necessary, but I'd like to replace this with some kind of today() function. Andrew Use now() and DATE_FORMAT to do something similar to what you are doing above, see the manual at www.mysql.com for details. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Connect mysql via java
Hi everybody, Can someone help me to ungently connect to a mySQL database via java. All I need is a code as example to look at the sintax. I am pretty familiar with Oracle but I need to implement something this weekend in Mysql as back end Thks a lot Siomara _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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
CHECK CONSTRAINT
Hi, Any round about way of achieving CHECK CONSTRAINT FEATURE in MySQL before inserting a data into database? REgards, Ravi Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: complicated query
} } You don't need to create another column, just use: } } ORDER BY category = 'other', category } Are you sure this works? My query is: select category,subcategory from categories ORDER BY category = 'other', category; And I get: ERROR 1064: You have an error in your SQL syntax near '= 'other', category' at line 1 Jeff Shipman E-Mail: [EMAIL PROTECTED] Systems Programmer Phone: (505) 835-5748 NMIMT Computer Center http://www.nmt.edu/~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: complicated query
This does not work for me. It returns syntax errors. Jeff Shipman E-Mail: [EMAIL PROTECTED] Systems Programmer Phone: (505) 835-5748 NMIMT Computer Center http://www.nmt.edu/~jeff On Fri, 20 Apr 2001, Braxton Robbason wrote: } you want a function that prepends the letter a to the category/subcategory } names that are not other. then you order by that function, but do not } display it. } } select category,subcategory from foo2 } order by if(category= } 'other','zz',concat('a',category)); } i.e. everything except other begins with an a as far as the order by is } concerned, while other is zz for sorting purposes. } } } -Original Message- } From: Jeff Shipman - SysProg [mailto:[EMAIL PROTECTED]] } Sent: Friday, April 20, 2001 2:39 PM } To: [EMAIL PROTECTED] } Subject: complicated query } } } I would like to do something similar to an ORDER BY } in one of my select statements, but I'mt not sure } how to do something as complicated as this: } } I have two columns, category and subcategory, that } I am retrieving. I would like category and subcategory } to be sorted alphabetically. This is easy with an } 'ORDER BY 1 2', but I would like categories that } are named 'other' to be put off until the end. So, } I'd get something like this: } } abcd } ghikj } z } other } } Is there a way to do this type of query? Thanks in } advance. } } Jeff Shipman E-Mail: [EMAIL PROTECTED] } Systems Programmer Phone: (505) 835-5748 } NMIMT Computer Center http://www.nmt.edu/~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 } - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
bug report
Description: tough one to describe. the step by step example shows all basicly once a table gets more than 1 row and doing a select with no result will yield a blank date... gah please see the example =) How-To-Repeat: create database tmpdb; use tmpdb; create table test (foo int); insert into test values (1); select NOW(), count(*) from test where foo in (2); +-+--+ | NOW() | count(*) | +-+--+ | 2001-04-20 17:21:29 |0 | +-+--+ insert into test values (1); select NOW(), count(*) from test where foo in (2); +---+--+ | NOW() | count(*) | +---+--+ | |0 | +---+--+ notice the date field is blank. Fix: how to correct or work around the problem, if known (multiple lines) Submitter-Id: submitter ID Originator:Andrew Schmidt 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.37 (Source distribution) Environment: machine, os, target, libraries (multiple lines) System: FreeBSD wrk-112.tor1.targetnet.pvt 4.2-STABLE-20010112-JPSNAP FreeBSD 4. 2-STABLE-20010112-JPSNAP #0: Thu Jan 11 20:06:54 GMT 2001 [EMAIL PROTECTED] reebsd.org:/usr/src/sys/compile/GENERIC 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='c++' CXXFLAGS='' LDFLAGS='' LIBC: -r--r--r-- 1 root wheel 1169222 Jan 11 14:28 /usr/lib/libc.a lrwxrwxrwx 1 root wheel 9 Jan 19 13:01 /usr/lib/libc.so - libc.so.4 -r--r--r-- 1 root wheel 559420 Jan 11 14:28 /usr/lib/libc.so.4 Configure command: ./configure --localstatedir=/usr/local/var/db/mysql --withou t-perl --without-debug --without-readline --without-bench --enable-assembler --e nable-thread-safe-client 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
Re: complicated query
On Fri, Apr 20, 2001 at 03:09:32PM -0600, Jeff Shipman - SysProg wrote: } } You don't need to create another column, just use: } } ORDER BY category = 'other', category } Are you sure this works? My query is: select category,subcategory from categories ORDER BY category = 'other', category; And I get: ERROR 1064: You have an error in your SQL syntax near '= 'other', category' at line 1 Yes. And I of course tested before I posted. I also tried ORDER BY category in ('cat1','cat2'), category which worked. I'm running 3.23.36 on debian linux. Well, actually, rather than create a new table, I used an existing one. The actual statement was select last_name from mizpah where first_name like 'fr%' order by last_name = 'crosby', last_name; -- "Moderation in temper is always a virtue; but moderation in principle is always a vice." -- Thomas Paine, _The Rights of Man_ (1791) Rick Pasotto email: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: max FULLTEXT index size?
Sergei, I wanted to say thanks so much for your help with this. I went through the bitkeeper install, downloaded mysql 4.0, compiled under solaris 2.7, and the process of creating the big index that took days under 3.23 took 15 minutes. So thanks very much! Obviously I might have tweaked some things under 3.23 and made processing slightly faster, but this is a huge improvement, and makes the approach I was hoping to use feasible. thanks again, braxton -Original Message- From: Sergei Golubchik [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 5:10 PM To: Braxton Robbason Cc: Mysql Subject: Re: max FULLTEXT index size? Hi! On Apr 19, Braxton Robbason wrote: Hi all, I'm creating a fulltext index on a 400MB table, and the creation process gets very slow. It's fast for the first 50MB of the index, and then it grinds to what seemed like a halt after days. My question is - is there anyone who's created fulltext indexes on this much data who can assure me that it's possible? Merge tables are not an option because you can't query a merge table on a fulltext index. thanks, Braxton Yes, FULLTEXT index works ok for 400 MB tables. In my tests FULLTEXT index was created (with CREATE INDEX) over 400 MB table in 15 minutes with new MySQL-4.0 code (not yet available, sorry). Everything works with 3.23 code too, but index creation is 50-100 times slower (and resulting index is ~10% bigger). Regards, Sergei -- MySQL Development Team __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany ___/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
ERROR 1046: No Database Selected
Hi all, I am getting this error mysql create table Product ( - productID numeric(10), - name varchar(30), - primary key(productID) - ); ERROR 1046: No Database Selected mysql How do I fix that please??? siomara _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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: ERROR 1046: No Database Selected
Siomara Pantarotto ([EMAIL PROTECTED]) writes: Hi all, I am getting this error mysql create table Product ( - productID numeric(10), - name varchar(30), - primary key(productID) - ); ERROR 1046: No Database Selected mysql How do I fix that please??? mysql use mysql; sigh -- Ed Carp, N7EKG [EMAIL PROTECTED] 940/367-2744 cell phone http://www.pobox.com/~erc [EMAIL PROTECTED] - text pager I sometimes wonder if the American people deserve to be free - they seem so unwilling to fight to preserve the few freedoms they have left. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: show tables return nothing. show databases too.
I have had the same problem on a Redhat 7.0 box w/2.4.1 kernel with mysql versions 3.23.32 thru 3.23.37 The tables and databases are there and are usable, but 'show databases' and 'show tables' return nothing. We've installed this version on another machine and it works fine. Must be a library thing? 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/i686-redhat-linux/2.96/specs gcc version 2.96 2731 (Red Hat Linux 7.0) Compilation info: CC='egcs' CFLAGS=' -O3' CXX='egcs' CXXFLAGS=' -O3 -felide-constructors -fno-exceptions -fno-rtti ' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 11 Jan 26 03:44 /lib/libc.so.6 - libc-2.2.so -rwxr-xr-x1 root root 5072386 Jan 10 18:37 /lib/libc-2.2.so -rw-r--r--1 root root 24498288 Jan 10 18:35 /usr/lib/libc.a -rw-r--r--1 root root 178 Jan 10 18:35 /usr/lib/libc.so lrwxrwxrwx1 root root 10 Jan 26 03:47 /usr/lib/libc-client.a - c-client.a Configure command: ./configure --disable-shared --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --without-berkeley-db --without-innodb --enable-assembler --with-mysqld-user=mysql --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/ --with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql --infodir=/usr/info --includedir=/usr/include --mandir=/usr/man '--with-comment=Official MySQL RPM' [EMAIL PROTECTED] wrote: Description: empty show tables How-To-Repeat: show tables; Submitter-Id:submitter ID Originator: [EMAIL PROTECTED] Organization: poelzi.org MySQL support: none Synopsis:show tables return nothing. show databases too. Severity:serious Priority:high Category:mysql Class: sw-bug Release: mysql-3.23.37 Environment: System: Linux cinis.poelzi.org 2.4.3 #5 Wed Apr 18 23:12:52 CEST 2001 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/i586-mandrake-linux/2.95.2/specs gcc version 2.95.2 19991024 (release) Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS='' LIBC: -rw-r--r-- 1 root root 24419620 Apr 18 19:42 /lib/libc.a -rw-r--r-- 1 root root 176 Apr 18 19:42 /lib/libc.so lrwxrwxrwx 1 root root 13 Apr 19 08:22 /lib/libc.so.6 - libc-2.2.2.so -rwxr-xr-x 1 root root 5195054 Dec 15 1999 /lib/libc-2.1.2.so -rwxr-xr-x 1 root root 4903193 Apr 18 19:47 /lib/libc-2.2.2.so -rw-r--r-- 1 root root 20508346 Dec 15 1999 /usr/lib/libc.a -rw-r--r-- 1 root root 178 Dec 15 1999 /usr/lib/libc.so Configure command: ./configure --prefix=/usr/local/mysql --enable-assembler - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Daniel Bohling NewsFactor Network - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
largest timestamp value
What's the largest possible timestamp value before it rolls over? I'm trying to figure out what's the best way to do the following. I have a table that has these three fields in it: priority int(3) end_time timestamp(14) start_time timestamp(14) NOTE: only start_time gets inserted as Now() (or NULL so it automatically gets set) end_time is a variable that gets set depending on what the user picks for time period. And I'd like to select and order like: select * from table order by priority, end_time, start_time; Now, some rows will have a valid start, and end times. Others will have only a valid start time, and an undefined end time, or infinite if you will. However, if I don't fill in a value for that field, MySQL dutifully puts in 00 for me, and when I perform the above query, I get something like this: +--+++ | priority | end_time | start_time | +--+++ |0 | 00 | 20010329023143 | |0 | 20010330231405 | 20010329021805 | |0 | 20010331012712 | 20010330162312 | | 10 | 20010422051135 | 20010419161205 | | 10 | 20010422051135 | 20010419162335 | | 50 | 20010330131222 | 20010329015222 | | 50 | 20010330131703 | 20010329015703 | | 100 | 20010331192630 | 20010329014630 | | 100 | 20010401211100 | 20010330023100 | +--+++ However, I want that first row, to end up last within that priority level (so drop it to line 3). The only thing I can think of is to put in some insanely large value for that timestamp, so that the select clause works. So, I need to figure out what's the largest possible amount of time I can put in, and make it like a 'dead end' value. Anything that has that value is considered infinite. I suppose I can put in 2038010100...but is that the ceiling of MySQL? Unless there's another way? -- W | | I haven't lost my mind; it's backed up on tape somewhere. | ~ Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. .eFax 248.671.0909 http://www.pcraft.com . 3550 Arapahoe Ave #6 .. . . . . Boulder, CO 80303, USA - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Mysql Replication Crashes Master Server
We are running MySQL 3.23.37 (Official MySQL binary) on Redhat 7.0 kernel 2.4.3 using the built in replication. After some time (usually 2 hours or so) the master server starts to crash and replication stops dead. Its seems that all queries suddenly start to take 200 times longer to execute. Here is the relevant information from the binary log (the slave's replication thread stops at position 165791771):: # at 165791547 #010420 15:11:34 server id 1 Querythread_id=590431exec_time=0 error_code=0 use pollit; SET TIMESTAMP=987804694; UPDATE pollit.sitelog set views=views+1 where pageID='104' and logdate='20010420'; # at 165791659 #010420 15:11:34 server id 1 Querythread_id=590431exec_time=0 error_code=0 use pollit; SET TIMESTAMP=987804694; UPDATE pollit.sitelog set views=views+1 where pageID='325' and logdate='20010420'; # at 165791771 #010420 15:11:14 server id 1 Querythread_id=604315exec_time=205 error_code=0 use adserver; SET TIMESTAMP=987804674; UPDATE LOW_PRIORITY bancamp_rel_set SET views=views+1 ,track=track+(1/weight) WHERE BID='518794397' AND setID='18114'; # at 165791923 #010420 15:11:14 server id 1 Querythread_id=604297exec_time=205 error_code=0 use adserver; SET TIMESTAMP=987804674; UPDATE LOW_PRIORITY bancamp_rel_set SET views=views+1 ,track=track+(1/weight) WHERE BID='518819786' AND setID='32880'; # at 165792075 All the queries before pos 165791771 have exec_time = 2 and all the queries after exec_time 205. Thousands of queries pile up in the process list on the master. Stopping the slave using 'slave stop' immediately fixes the problem. Environment: The servers are (1) PIII 800 with 1024MB of RAM and an IBM deskstar 75GXP HD on a abit VP6 and 3com 3c980 nic running about 900 (small) queries per second. System: Linux dbserv1.localdomain 2.4.3 #1 Mon Apr 9 16:34:23 PDT 2001 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 2731 (Red Hat Linux 7.0) Compilation info: CC='gcc' CFLAGS='-O3 -mpentium ' CXX='gcc' CXXFLAGS='-O3 -mpentium -felide-constructors' LDFLAGS='-static' LIBC: lrwxrwxrwx1 root root 14 Mar 2 05:45 /lib/libc.so.6 - libc-2.1.92.so -rwxr-xr-x1 root root 4776568 Aug 30 2000 /lib/libc-2.1.92.so -rw-r--r--1 root root 22607104 Aug 30 2000 /usr/lib/libc.a -rw-r--r--1 root root 178 Aug 30 2000 /usr/lib/libc.so Configure command: ./configure --prefix=/usr/local/mysql '--with-comment=Official MySQL binary' --with-extra-charsets=complex --enable-assembler --with-mysqld-ldfla gs=-all-sta tic --with-client-ldflags=-all-static --disable-shared show variables; +-+- + | Variable_name | Value | +-+- + | ansi_mode | OFF | | back_log| 50 | | basedir | /usr/local/mysql-3.23.37-pc-linux-gnu-i686/ | | binlog_cache_size | 32768 | | character_set | latin1 | | character_sets | latin1 big5 czech euc_kr gb2312 gbk sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5 | | concurrent_insert | ON | | connect_timeout | 2 | | datadir | /usr/local/mysql/data/ | | delay_key_write | ON | | delayed_insert_limit| 100 | | delayed_insert_timeout | 300 | | delayed_queue_size | 1000 | | flush | OFF | | flush_time | 0 | | have_bdb| NO | | have_gemini | NO | | have_innodb | NO | | have_isam | YES | | have_raid | NO | | have_ssl| NO | | init_file | | | interactive_timeout | 28800 | | join_buffer_size| 131072 | | key_buffer_size | 268431360 | | language| /usr/local/mysql-3.23.37-pc-linux-gnu-i686/share/mysql/english/ | | large_files_support | ON | | locked_in_memory| OFF | | log | OFF | | log_update | OFF | | log_bin | ON | | log_slave_updates | OFF
RE: 64MB Limit on MyISAM indexes?
-Original Message- From: Jeff Brewer [mailto:[EMAIL PROTECTED]] Sent: viernes, 20 de abril de 2001 18:24 To: MySQL Mail List Subject: 64MB Limit on MyISAM indexes? I've got tables in ISAM format whose indexes are way over 64 MB. However, when I try to create a MyISAM table with an index that big I get errors and confirming that with myisamchk I get: myisamchk: warning: Keyfile is almost full, 67107839 of 67107839 used Which is essentially 64MB. Are MyISAM tables able to handle large indexes? I've had ISAM and now have MyISAM indexes larger than 2 GB, so yes. I hope I don't have to go back to ISAM tables... Any suggestions? Haven't seen that error before, so I can't help you. -- Un saludo / Venlig hilsen / Regards Jesper Frank Nemholt Unix System Manager Compaq Computer Corporation Phone : +34 699 419 171 E-Mail: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can anyone help me.. for install on a Freebsd 4.2 box..
On Thu, Apr 19, 2001 at 11:37:14AM -0700, Larry Caragay wrote: Would anyone out there have the installation instruction for Mysql for a FreeBSD 4.2 box??? I've built it several times under FreeBSD 4.2. WHat problem are you seeing? Larry P.S. Thanks in advance... -- Brian 'you Bastard' Reichert[EMAIL PROTECTED] 37 Crystal Ave. #303Daytime number: (603) 434-6842 Derry NH 03038-1713 USA Intel architecture: the left-hand path - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Population a database
Hello all I have a simple question. I have a database in (ms) accesss that I would like to transport into mysql database. First of all ,do i have to create the database plus tables. then import the data . or could i just grab the whole database and tables with all the data inside and import it. is there a how to or a sample of this method Im sorry but I'm new to all this... Thank you very much Luis - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: 64MB Limit on MyISAM indexes?
You need to change the "maxrows" on the table. It is in the documentation, I dont remember the exact syntax something like "alter table tablename set maxrows=1" for tables larger than 2gigs. ryan I've got tables in ISAM format whose indexes are way over 64 MB. However, when I try to create a MyISAM table with an index that big I get errors and confirming that with myisamchk I get: myisamchk: warning: Keyfile is almost full, 67107839 of 67107839 used Which is essentially 64MB. Are MyISAM tables able to handle large indexes? I hope I don't have to go back to ISAM tables... Any suggestions? Thanks, Jeff Brewer Spam filter bypass: (database,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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Need help with a Freebsd install..
Larry, if you haven't resolved this yet - you might want to install from the sources, like I do. I am also running FreeBSD 4.2, here is what I did, and it seems to work like a champ. 1) get the source from www.mysql.com/Downloads/MySQL-3.23/mysql-3.23.37.tar.gz 2) put this file in some directory on your system (mine is /usr/src) 3) go to that directory and run 'gunzip mysql-3.23.37.tar.gz' 4) now run 'tar -xvf mysql-3.23.37.tar' 5) now run 'cd mysql-3.23.37' 6) type './configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-mysqld-user=mysql --with-thread-safe-client --enable-assembler' 7) now type 'make' 8) then 'make install' 9) now, it should be installed to /usr/local/mysql, but we told mysql that we want to run it as user 'mysql' (--with-mysqld-user=) so, create a user account named 'mysql' and make him part of the group 'mysql' by running 'adduser' 10) now you can create the grant tables if they aren't already there, run '/usr/local/mysql/bin/mysql_install_db' 11) now, make sure the user 'mysql' has access to the mysql stuff, run 'chown -R mysql /usr/local/mysql' and 'chgrp -R mysql /usr/local/mysql' 12) also, make the start/stop scripts executable by him, run 'chmod u+x /usr/local/mysql/share/mysql/mysql.server' and 'chown u+x /usr/local/mysql/share/mysql/mysql.server' 13) now, the last thing is to copy the mysql config file to /etc (this will make the config options global), so do this 'cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf' and be sure to look at the file /etc/my.cnf to see if you need to change anything there. 14) now we should be good to go, test the server by running '/usr/local/mysql/share/mysql/mysql.server start' it should start just fine, you might even want to check the error logs in /usr/local/mysql/data/(whatever.foo.bar.err) I hope this helps you out! Patrick # -Original Message- # From: Larry Caragay [mailto:[EMAIL PROTECTED]] # Sent: Wednesday, April 18, 2001 3:45 PM # To: [EMAIL PROTECTED] # Subject: Need help with a Freebsd install.. # # # Can any one help me install Mysql on my Freebsd 4.2 box.. # the first thing I did was: # # got a copy of Mysql for mysql.com # # placed in in the /usr/local # # then: # # gzip -dc mysql-3_23_36-unknown-freebsdelf4_2-i386_tar.gz | tar -vxf - # # created a mysql directory. # /usr/local/mysql # # then # ./configure --prefix=/usr/local/mysql # # After all that it will not attach to any DB.. It will run but # I can restart # it once it is stopped with out doing ./configure # --prefix=/usr/local/mysql # again.. # # Help.. # # Larry # # # - # Before posting, please check: #http://www.mysql.com/manual.php (the manual) #http://lists.mysql.com/ (the list archive) # # 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
why doesn't this work? (C code)
G'day, This USED to work, then all of a sudden for no apparent reason it has suddenly decided not to: if I change the code thus: if(*row1[2] == 'l') { ; } else if(*row1[2] == 'e') etc. the cgi programme completes, so I don't think the problem is elsewhere. Is there something fundamentally wrong with using the same connection for more than one 'cursor'? I understood that mysql_store_result() simply writes the result set to a 2D character array. T4 there shouldn't be a problem. Any help much appreciated - static MYSQL_RES *res1, *res2; static MYSQL mysql; static MYSQL_ROW row1, row2; static char theSql[250]; static void slct_opt(void) { char theHtml1[] = "\ntr\n td class=\"body\"%s/td" "\n td class=\"body\""; sprintf(theSql, "SELECT oc.id, ot.id, oc.i_type, oc.i_prefix, oc.cls_txt, oc.o_name," " ot.o_type, oc.i_len FROM optn_cls oc, optn_type ot" " WHERE oc.id = ot.ocls_id AND ot.type_id = %s" " GROUP BY ot.ocls_id ORDER BY ot.disp_ord", lstg_type); mysql_query(mysql, theSql); res1 = mysql_store_result(mysql); if(res1) { while((row1 = mysql_fetch_row(res1))) { printf(theHtml1, row1[4]); if(*row1[2] == 'l') { sprintf(theSql, "SELECT so_val, so_text FROM slct_optns WHERE otype_id = %s" " AND so_val 0 ORDER BY so_val", row1[1]); mysql_query(mysql, theSql); res2 = mysql_store_result(mysql); if(res2) { printf("select name=\"%s\"", row1[5]); while((row2 = mysql_fetch_row(res2))) printf("\noption value=\"%s\"%s/option", row2[0], row2[1]); printf("/select"); } mysql_free_result(res2); } else if(*row1[2] == 'e') { printf("nbsp;%snbsp;input type=\"text\" name=\"%s\" maxlength=\"%s\"", row1[3], row1[5],row1[8]); } } printf("/td\n/tr"); } mysql_free_result(res1); mysql_free_result(res2); } - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: immediate Segmentation fault
Date: Thu, 19 Apr 2001 20:41:17 -0700 From: Van [EMAIL PROTECTED] I might be partly responsible for this since MySQL didn't show up in the slackware distribution until I built one for the DEC Alpha. It's running great on my Alpha at version 3.23.33 and I'm staying there until the 3.23.3x versions settled down. The Slackware package itself works great for me. I haven't been able to compile MySQL in quite a while, so I was really glad to find this one. The only problem with it is when I try compiling other things, like MyODBC. [...] Personally, I run all Slack systems and build from source without problems. I put a /mysql partition on the servers when I install them and use the following to configure: ./configure --with-mysqld-user=mysql --localstatedir=/mysql Actually, I use a single "data" user for all my databases. I occasionally play with postgresql and I've tried a few others, but MySQL is my current favorite. The example I gave omitted the user because I've tried it with and without and with various other values, and the user has no effect on the result. Segfault. Never have problems with it. Of course, make sure you have the mysql user added to your system. Well, I have a "data" user instead, but I did check that. That's the user the working daemon runs as with no problems. The daemon I compiled doesn't care what the username is. It just doesn't run. Hope that gives some insight. BTW, the package I built for the Alpha is still running to this day, so I'd be curious to hear that some of the files were omitted. If anything, there should have been more than necessary (src included for instance). Okay, then here's an example: Compiling MyODBC-2.50.36 with the Slackware MySQL package in /usr (3.23.34) gauss:~/download/MyODBC-2.50.36./configure --enable-static --enable-shared --with-mysql-libs=/usr/lib/mysql --with-mysql-includes=/usr/include/mysql --with-unixODBC --with-iodbc [...] checking for the mysql client libraries... /usr/lib/mysql checking for mysql_real_query in -lmysqlclient... yes checking for mysql include files in /usr/include/mysql... yes checking for sql.h... yes checking for sqlext.h... yes checking for odbcinst.h... yes checking for SQLGetPrivateProfileString in -lodbcinst... yes checking for SQLHENV... yes checking for SQLHDBC... yes checking for SQLHSTMT... yes checking for SQLINTEGER... yes checking for SQLUINTEGER... yes checking for SQLSMALLINT... yes checking for SQLUSMALLINT... yes checking for SQLPOINTER... yes checking for SQLHWND... yes checking for SQLRETURN... yes checking for SQLCHAR... yes updating cache ./config.cache creating ./config.status creating Makefile creating myconf.h gauss:~/download/MyODBC-2.50.36make /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/mysql -Iyes/include -g -O2 -c catalog.c mkdir .libs gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/mysql -Iyes/include -g -O2 -Wp,-MD,.deps/catalog.pp -c -fPIC -DPIC catalog.c -o .libs/catalog.lo In file included from /usr/include/mysql/my_sys.h:588, from myodbc.h:24, from catalog.c:9: /usr/include/mysql/raid.h:41: my_dir.h: No such file or directory make: *** [catalog.lo] Error 1 Exit 2 gauss:~/download/MyODBC-2.50.36 Looks to me like some of the MySQL include files weren't in the Slackware package. That's why I'm trying to compile from source. I suppose I could just grab the 3.23.34 source and manually install any files that seem to be missing, but that strikes me as a particularly awkward and unreliable solution. I'd much rather just solve the problem than play hit-and-miss at working around it. -- -Dave Noelle, [EMAIL PROTECTED] -the Villa Straylight, http://www.straylight.org Coalition Against Unsolicited Commercial Email == http://www.cauce.com Disclaimer: The opinions expressed above relate in no way to anything at all and are merely the ramblings of an over-stressed C.S. geek: read at own risk Quote of the Day: It's hard to soar like an eagle when you are surrounded by turkeys. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
have a great problem to install the mysql database
Dear Sir, I have a great problem to install the mysql database. I follow the instruction at the below : 1. tar -xvzf mysql-3.23.37.tar.gz 2. ./configure ¡Vprefix=/usr/local/mysql 3. make 4. make install 5. echo "/usr/local/mysql/lib/mysql" /etc/ld.so.conf 6. ldconfig -v | grep libmysqlclient 7. echo "/usr/local/mysql/bin/safe_mysqld /dev/null " /etc/rc.d/rc.local 8. ./scripts/mysql_install_db 9. /usr/local/mysql/bin/safe_mysqld /dev/null 10. PATH=¡¨$PATH:/usr/local/mysql/bin¡¨ 11. Mysqladmin version (when I input the no. 11 command, the screen show out that bash : Lost connection to MYSQL Server during query) Therefore, I input another command (/usr/share/mysql/mysql.server start) The screen show out that (Starting mysqld daemon with database from /var/lib/mysql) 12. chmod +x /usr/local/mysql/mysql.server 13. mysql (when I input the command mysql) The screen show out that : (Error 2013: Number of Processes running now : 1) (mysqld process hanging : Pid 955-killed ) (mysql restarted on Sat Apr 21 09:33:27 CST 2001) Please, can you ask me what ¡¥s happen and why, moreover; how can I do? From a worry programmer RTO - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Select partial DATE?
Hello! Let's say I have a DATE field and in the dataset, I got some dates such as 2000-01-01 2001-02-01 2001-02-05 2001-02-06 How would I be able to just select all the 2001-02 entries? Obviously, the month and the year are the same, but the date is not, is there a mysql function to do this? In a nutshell, how do I select some DATE type of data just by year and month match? Thanks Jason Lam
Re: Select partial DATE?
At 9:55 PM -0400 4/20/01, Jason Lam wrote: Hello! Let's say I have a DATE field and in the dataset, I got some dates such as 2000-01-01 2001-02-01 2001-02-05 2001-02-06 How would I be able to just select all the 2001-02 entries? Obviously, the month and the year are the same, but the date is not, is there a mysql function to do this? In a nutshell, how do I select some DATE type of data just by year and month match? Thanks Jason Lam WHERE YEAR(date) = 2001 AND MONTH(date) = 2 -- 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: Population a database
Hi: There are several scripts available at mysql download site that convert access database to an sql dump which you can import into mysql. the sql dump should contain sql for creating tables so you don't have to create tables by yourself. You need to create a database if you want to import the tables into a separate database, though. Seung-woo Nam Luis wrote: Hello all I have a simple question. I have a database in (ms) accesss that I would like to transport into mysql database. First of all ,do i have to create the database plus tables. then import the data . or could i just grab the whole database and tables with all the data inside and import it. is there a how to or a sample of this method Im sorry but I'm new to all this... Thank you very much Luis - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: why doesn't this work? (C code) - fixed (I hope)
I wrote: This USED to work, then all of a sudden for no apparent reason it has suddenly decided not to: Notwithstanding it used to work, it would _appear_ that calling mysql_free_result() willy-nilly was the cause: mysql_query(mysql, theSql); res1 = mysql_store_result(mysql); if(res1) { while((row1 = mysql_fetch_row(res1))) { printf(theHtml1, row1[4]); if(*row1[2] == 'l') { sprintf(theSql, "SELECT so_val, so_text FROM slct_optns WHERE otype_id = %s" " AND so_val 0 ORDER BY so_val", row1[1]); mysql_query(mysql, theSql); res2 = mysql_store_result(mysql); if(res2) { printf("select name=\"%s\"", row1[5]); while((row2 = mysql_fetch_row(res2))) printf("\noption value=\"%s\"%s/option", row2[0], row2[1]); printf("/select"); mysql_free_result(res2); } } else if(*row1[2] == 'e') { printf("nbsp;%snbsp;input type=\"text\" name=\"%s\" maxlength=\"%s\"", row1[3], row1[5], row1[8]); } printf("/td\n/tr"); } mysql_free_result(res1); } seems to fix the problem.. Regards - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: bug report
Verified. this is a bug empty table or 1 record returns expected result, insert one more record and the result of now() is empty. mysql select now(), count(*) from t where a in (2); | now() | count(*) | | 2001-04-21 08:12:03 |0 | 1 row in set (0.00 sec) mysql insert into t (a) values (1); mysql select now(), count(*) from t where a in (2); | now() | count(*) | | |0 | 1 row in set (0.01 sec) verified on version 3.23.32-debug (w2k) binary. - Original Message - From: "Andrew Schmidt" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, April 20, 2001 11:31 PM Subject: bug report Description: tough one to describe. the step by step example shows all basicly once a table gets more than 1 row and doing a select with no result will yield a blank date... gah please see the example =) How-To-Repeat: create database tmpdb; use tmpdb; create table test (foo int); insert into test values (1); select NOW(), count(*) from test where foo in (2); +-+--+ | NOW() | count(*) | +-+--+ | 2001-04-20 17:21:29 |0 | +-+--+ insert into test values (1); select NOW(), count(*) from test where foo in (2); +---+--+ | NOW() | count(*) | +---+--+ | |0 | +---+--+ notice the date field is blank. Fix: how to correct or work around the problem, if known (multiple lines) Submitter-Id: submitter ID Originator:Andrew Schmidt 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.37 (Source distribution) Environment: machine, os, target, libraries (multiple lines) System: FreeBSD wrk-112.tor1.targetnet.pvt 4.2-STABLE-20010112-JPSNAP FreeBSD 4. 2-STABLE-20010112-JPSNAP #0: Thu Jan 11 20:06:54 GMT 2001 [EMAIL PROTECTED] reebsd.org:/usr/src/sys/compile/GENERIC 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='c++' CXXFLAGS='' LDFLAGS='' LIBC: -r--r--r-- 1 root wheel 1169222 Jan 11 14:28 /usr/lib/libc.a lrwxrwxrwx 1 root wheel 9 Jan 19 13:01 /usr/lib/libc.so - libc.so.4 -r--r--r-- 1 root wheel 559420 Jan 11 14:28 /usr/lib/libc.so.4 Configure command: ./configure --localstatedir=/usr/local/var/db/mysql --withou t-perl --without-debug --without-readline --without-bench --enable-assembler --e nable-thread-safe-client 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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 can i make it?
For example i have 3 tables (really i have to make it with 6 tables, but...) So 3 tables: Table1 uid| name 1user1 2user2 3user3 Table2 iduidc 1150 2123 3142 4223 52303 Table3 idctxt 123'twenty-three' 242'the reason of life' 350'50' 4303'303 rulz' how can i get a recordset constains all records (or records matching a where exp.) from the Table1 with the c values from the Table2, like this: uidnamecs - 1user1'50 - twenty-three - the reason of life' 2user2'twenty-three - 303 rulz' 3user3'' I can make heavy things with mysql, but i'm too small for this :) thanx: Z - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php