Re: How to query SET OPTION variables?
On Fri, May 03, 2002 at 01:22:30PM +0200, Harald Fuchs wrote: How about SHOW OPTIONS [LIKE wild], nicely accompanying SHOW VARIABLES? Yeah, that'd be the way to go, I think. -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.47-max: up 85 days, processed 2,227,635,975 queries (300/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Parsing SQL statements
Hello, I need sql statements parsed before they are sent to be queried. I know-though I am not sure- mysql does these steps: 1-Parse sql statement,check for errors 2-execute the statement Is there a way to intrude in between step1 and step2 so that we could get sql statement parsed without it is executed ? A few people recommended me to do it by transactions, to query first and rollback your work after the query is performed succesfully. But you know disadvantages of transaction safe tables and my tables are already non trans. safe and if there is a way to parse sql statements then I will get rid of lot of work. I need your help. And of your help and suggestions are very appreciated. Best regards M.K. _ Chat with friends online, try MSN Messenger: http://messenger.msn.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: Parsing SQL statements
It would be nice to know what You're actually trying to do... How do You want the get Your query back.. eh... parsed... ??? Or do You simply want to errocheck Your queries... ?? In this case You could run an EXPLAIN your query Query. And then check for errors if any... =d0Mi= DCS.net [EMAIL PROTECTED] mustafa karabulut wrote Hello, I need sql statements parsed before they are sent to be queried. I know-though I am not sure- mysql does these steps: 1-Parse sql statement,check for errors 2-execute the statement Is there a way to intrude in between step1 and step2 so that we could get sql statement parsed without it is executed ? A few people recommended me to do it by transactions, to query first and rollback your work after the query is performed succesfully. But you know disadvantages of transaction safe tables and my tables are already non trans. safe and if there is a way to parse sql statements then I will get rid of lot of work. I need your help. And of your help and suggestions are very appreciated. Best regards M.K. _ Chat with friends online, try MSN Messenger: http://messenger.msn.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Changing column from UNIQUE?
NIPP, Friday, May 03, 2002, 9:16:01 PM, you wrote: Neoen I have a column in a table that is currently configured as UNIQUE. Neoen I have recently discovered that some duplicates may exist in this column, so Neoen I want to remove the UNIQUE flag on this column. How? Thanks. If you define column as UNIQUE you can't add duplicate values in the column. Use DROP INDEX statement or ALTER TABLE. Description of their syntax you can find in the manual: http://www.mysql.com/doc/D/R/DROP_INDEX.html http://www.mysql.com/doc/A/L/ALTER_TABLE.html Scott Nipp -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql.sock file does not get created
vigneshvg, Saturday, May 04, 2002, 8:59:40 AM, you wrote: vDescription: v I try to run the mysqld script to start the MySQL server. It starts, then immediately I get a message saying it has ended. v [root@localhost init.d]# ./mysql.server start v [root@localhost init.d]# Starting mysqld daemon with databases from /var/lib/mysql/mysql v 020504 11:22:19 mysqld ended v This does not create the mysql.sock file. v This error logs tell me that -- v 020503 14:24:19 mysqld started v 020503 14:24:20 Can't start server : Bind on unix socket: Permission denied v 020503 14:24:20 Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ? v 020503 14:24:20 Aborting v I dont have another MySQL server running. What am I supposed to do now ? Looks like MySQL doesn't have permissions on the MySQL data dir (/var/lib/mysql). So, you should change permission on that dir and start mysqld again. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Parsing SQL statements
Just to make sure I understand you, you need to check the sql statements themselves for errors. Is this correct? Or, do you instead need to check that a query ran with success? Late on, BDKR - Original Message - From: mustafa karabulut [EMAIL PROTECTED] Date: Sat, 04 May 2002 12:42:26 +0300 To: [EMAIL PROTECTED] Subject: Parsing SQL statements Hello, I need sql statements parsed before they are sent to be queried. I know-though I am not sure- mysql does these steps: 1-Parse sql statement,check for errors 2-execute the statement Is there a way to intrude in between step1 and step2 so that we could get sql statement parsed without it is executed ? A few people recommended me to do it by transactions, to query first and rollback your work after the query is performed succesfully. But you know disadvantages of transaction safe tables and my tables are already non trans. safe and if there is a way to parse sql statements then I will get rid of lot of work. I need your help. And of your help and suggestions are very appreciated. Best regards M.K. _ Chat with friends online, try MSN Messenger: http://messenger.msn.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 -- ___ Download the free Opera browser at http://www.opera.com/ Powered by Outblaze - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 Query Problem
* Kory Wheatley [...] I'm seeing some discrepancy in the operation of the SEC_TO_TIME function, however. Let's say my Duration is a value of 9.25. When I multiply 9.25 by 3600, I get 33300.00. When I use SEC_TO_TIME(33300.00), it returns 09:15:00, the correct value. But when I try putting it all together in one query like this: SELECT SEC_TO_TIME(Duration * 3600) . . . it returns 09:00:00. Try using a 'float-aware' function: mysql select sec_to_time(floor(3600*9.25)); +---+ | sec_to_time(floor(3600*9.25)) | +---+ | 09:15:00 | +---+ 1 row in set (0.00 sec) -- Roger - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Parsing SQL statements
This is still a little unclear. You want to check the query to see if it can be run succesfully, or that it RAN succesfully. Perhaps I should as if you wish to check the query before or after it runs? Later on, Terrence (BDKR) - Original Message - From: mustafa karabulut [EMAIL PROTECTED] Date: Sat, 04 May 2002 16:36:33 +0300 To: [EMAIL PROTECTED] Subject: Re: Parsing SQL statements Thanks for your reply. I meant the second, to check the query whether it can be executed succesfully. Seems transactions are needed, is there any other way ? From: Terrence Cox [EMAIL PROTECTED] To: mustafa karabulut [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Parsing SQL statements Date: Sat, 04 May 2002 21:30:54 +0800 Just to make sure I understand you, you need to check the sql statements themselves for errors. Is this correct? Or, do you instead need to check that a query ran with success? Late on, BDKR - Original Message - From: mustafa karabulut [EMAIL PROTECTED] Date: Sat, 04 May 2002 12:42:26 +0300 To: [EMAIL PROTECTED] Subject: Parsing SQL statements Hello, I need sql statements parsed before they are sent to be queried. I know-though I am not sure- mysql does these steps: 1-Parse sql statement,check for errors 2-execute the statement Is there a way to intrude in between step1 and step2 so that we could get sql statement parsed without it is executed ? A few people recommended me to do it by transactions, to query first and rollback your work after the query is performed succesfully. But you know disadvantages of transaction safe tables and my tables are already non trans. safe and if there is a way to parse sql statements then I will get rid of lot of work. I need your help. And of your help and suggestions are very appreciated. Best regards M.K. _ Chat with friends online, try MSN Messenger: http://messenger.msn.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 -- ___ Download the free Opera browser at http://www.opera.com/ Powered by Outblaze _ Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com -- Powered by Outblaze - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Transfer data/ Insert +select
Hi everyone! The mySQL DB I have to rebuild was only one big table. Afer developing a new DB design for it, I ran into the problem of transfering the data from the old to the new database. I need to split up the records and insert them into the specific tables. My problem is that I can not figure out (as a total novice on mySQL) how to insert the data properly. Every time I try there's either a SQL error or the data is messed up and not ordered as it should be. I tried to use the following statement: insert into priv_details (hobbies, experi, quali, marital [.]) select me.hobbies, me.experi [..] from memberscopy me, priv_details pd where pd.id=me.id; What can i do? For help I would be really grateful!! Regards, Sven - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: speed optimization on awkward self join
* Colin Anderson [...] SELECT a.name, b.value, bb.value FROM characters a, char_data b, char_data bb, char_data_type c, char_data_type cc WHERE a.id = b.character_id and a.id = bb.character_id and (b.char_data_type_id = c.id and b.value = '18' and c.type = 'Strength') and (bb.char_data_type_id = cc.id and bb.value = '20' and cc.type = 'Age') This works, but it's much too slow. This needs to be able to handle a number of characters in the millions. You did not mention anything about indexing...? I suppose characters.id, char_data.id and char_data_type.id are primary keys, but have you also defined an unique index on the combination character_ID and char_data_type_ID? I would drop char_data_type.id and make (character_ID, char_data_type_ID) the primary key. Then I would add an index for (char_data_type_ID, value). char_data_type.type also needs to be indexed. -- Roger 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
Get the next AUTO INCREMENT value for a column
CREATE table test1 (ID int NOT NULL AUTO INCREMENT, name text, value text, Primary Key (ID)); INSERT into test1 (name, value) values (test1, value1); INSERT into test1 (name, value) values (test2, value2); DELETE from test1 where ID=2; How can obtain the CURRENT value of next ID AUTO INCREMENT value (which is 3 right now) Son Nguyen mysql, query __ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Choosing between 3.23.46 or 4.0.1 alpha
My new webhost has these two mysql servers installed: MySQL 3.23.46 MySQL 4.0.1 alpha which I am going to choose between... (They say they first installed the alpha just for testing because some customers requested it, but then kept it because they then thought it was quite stable) The best thing is of course great performance *and* great reliability (that the data doesn't change in a way it should not..) but the question is to know how *much* faster the alpha 4 is than the 3.23, and how *much* more reliable the 3.23 is ? So, more specifically, the question is if someone has made a test to compare these two database engines with databases with the same data, and testing the performance for the same queries, and also generated lots of updates (with many simultaneous simulated users) and checked if the result is as expected ? The transaction is indeed a nice feature, but only if you really can trust the rollbacks to be performed correctly, so has there been some reviews/tests for the reliability of the alpha 4 rollback functionality ? If someone does not know an exact URL to tests I am looking for, maybe someone has some generally interesting site tips about database web sites which is devoted to doing these kind of database engine tests/reviews ? Regards, Tomas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Searching
Hi Im still fairly new to this but have got a database online an dcan search on a single file without any problems, Im using ASP to create my pages and all is going well. However I now want more, so Im trying to search across the whole dataset for which Im doing something like SQL = Select * From tbl_births Where RegDistrict Like '%term%' SQL = SQL Or county Like '%term%' SQL = SQL Or Date Like '%term%' SQL = SQL Or pofbirth Like '%term%' SQL = SQL Or Forenames Like '%term%' etc this if fine for single words like smith, jone etc but how do I search using say berman and Devon Pointer appreciated Regards John Berman [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: Get the next AUTO INCREMENT value for a column
At 9:01 -0700 5/4/02, Son Nguyen wrote: CREATE table test1 (ID int NOT NULL AUTO INCREMENT, name text, value text, Primary Key (ID)); INSERT into test1 (name, value) values (test1, value1); INSERT into test1 (name, value) values (test2, value2); DELETE from test1 where ID=2; How can obtain the CURRENT value of next ID AUTO INCREMENT value (which is 3 right now) Son Nguyen mysql, query You can't. AUTO_INCREMENT values are not available until you generate them. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Get the next AUTO INCREMENT value for a column
* Son Nguyen CREATE table test1 (ID int NOT NULL AUTO INCREMENT, name text, value text, Primary Key (ID)); INSERT into test1 (name, value) values (test1, value1); INSERT into test1 (name, value) values (test2, value2); DELETE from test1 where ID=2; How can obtain the CURRENT value of next ID AUTO INCREMENT value (which is 3 right now) I don't know if you can, but you shouldn't want to try... :) Unless you have a single user application, the future value of any field can not be determined, unless you introduce locking and thereby a bottleneck. Use LAST_INSERT_ID() _after_ the insertion has been done. That is the easiest and safest way to get the correct key. -- Roger 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: Get the next AUTO INCREMENT value for a column
Actually I think the SHOW TABLE STATUS like 'TABLENAME' command can show you the next auto_increment value. Although I can say I wouldn't really ever use it except for personal use, not in an actual application. Harrison - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Son Nguyen [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, May 04, 2002 12:16 PM Subject: Re: Get the next AUTO INCREMENT value for a column At 9:01 -0700 5/4/02, Son Nguyen wrote: CREATE table test1 (ID int NOT NULL AUTO INCREMENT, name text, value text, Primary Key (ID)); INSERT into test1 (name, value) values (test1, value1); INSERT into test1 (name, value) values (test2, value2); DELETE from test1 where ID=2; How can obtain the CURRENT value of next ID AUTO INCREMENT value (which is 3 right now) Son Nguyen mysql, query You can't. AUTO_INCREMENT values are not available until you generate them. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
fulltext of 2GB data
Hello I want to make a fulltext searching of aprox. 2GB texts. Can you help how to do it ? what database ? I tried it with mysql, but when there was about 500MB, the insert of article takes about 6 seconds. hardware was: RAID 0 - 2x 10k U160 SCSI disks In what hardware should I invest that it works fast.. or isn't better MSSQL ? thanks - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Get the next AUTO INCREMENT value for a column
At 12:29 -0400 5/4/02, Harrison C. Fisk wrote: Actually I think the SHOW TABLE STATUS like 'TABLENAME' command can show you the next auto_increment value. There is no guarantee that this value will actually be used for the next AUTO_INCREMENT value. Suppose another client issues the following query: ALTER TABLE tbl_name AUTO_INCREMENT = 123456; If you were relying on what SHOW TABLE STATUS said, you'd be hosed. :-) Although I can say I wouldn't really ever use it except for personal use, not in an actual application. Harrison - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Son Nguyen [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, May 04, 2002 12:16 PM Subject: Re: Get the next AUTO INCREMENT value for a column At 9:01 -0700 5/4/02, Son Nguyen wrote: CREATE table test1 (ID int NOT NULL AUTO INCREMENT, name text, value text, Primary Key (ID)); INSERT into test1 (name, value) values (test1, value1); INSERT into test1 (name, value) values (test2, value2); DELETE from test1 where ID=2; How can obtain the CURRENT value of next ID AUTO INCREMENT value (which is 3 right now) Son Nguyen mysql, query You can't. AUTO_INCREMENT values are not available until you generate them. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Searching
* John Berman [...] SQL = Select * From tbl_births Where RegDistrict Like '%term%' SQL = SQL Or county Like '%term%' SQL = SQL Or Date Like '%term%' SQL = SQL Or pofbirth Like '%term%' SQL = SQL Or Forenames Like '%term%' etc this if fine for single words like smith, jone etc but how do I search using say berman and Devon If you have a single input field, you must make an array of the search words, and then use something like: SQL = Select * From tbl_births Where (RegDistrict Like '%term[1]%' SQL = SQL Or county Like '%term[1]%' SQL = SQL Or Date Like '%term[1]%' SQL = SQL Or pofbirth Like '%term[1]%' SQL = SQL Or Forenames Like '%term[1]%' SQL = SQL ) AND (RegDistrict Like '%term[2]%' SQL = SQL Or county Like '%term[2]%' SQL = SQL Or Date Like '%term[2]%' SQL = SQL Or pofbirth Like '%term[2]%' SQL = SQL Or Forenames Like '%term[2]%') (I don't know vb, not sure if [1] is correct for array indexing...) I introduced some paranteses, not sure if they are needed, but it makes it easier to read, imo. This will be slow on a table of some size... You could look at the fulltext indexing feature: URL: http://www.mysql.com/doc/F/u/Fulltext_Search.html If you have multiple input fields, the query will also be faster: SQL = Select * From tbl_births Where RegDistrict Like '%RegDistrict_term%' SQL = SQL Or county Like '%county_term%' SQL = SQL Or Date Like '%Date_term%' SQL = SQL Or pofbirth Like '%pofbirth_term%' SQL = SQL Or Forenames Like '%Forenames_term%' This should be improved by using the correct data types and operators... Date Like '%... seems a bit strange you should probably remove the first % of all fields, except maybe Forenames, which may multiple words. Read about the operators here: URL: http://www.mysql.com/doc/C/o/Comparison_Operators.html URL: http://www.mysql.com/doc/S/t/String_comparison_functions.html Finally, what you really should do if you have a big amount of data, is create separate tables for the different entities in your database: RegDistrict table, county table, pofBirth table and Forenames table. This is called database normalization. -- Roger - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Newbee: importing data from .MYD .MYI .frm
Hi all, A colleague has created a database with MySQL. She has provided me three files with the extensions .MYD .MYI .frm, to put them in the server. How can I import them into MySQL? I have MySQL 3.23.49 in Debian Linux 'potato'. I have used myisamchk to check the database, but I do not know how to do something else. Thanks in advance. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Newbee: importing data from .MYD .MYI .frm
Those are the actual table files that MySQL uses for the MyISAM table type. You should be able to just copy them into the datadir under a database directory and MySQL will find them and you should be able to use the tables like normal after copying them. If you don't know where your datadir is you can find out by doing a SHOW VARIABLES like 'datadir'. I recommend shutting down the server first as well, or else you could get into some weird data corruption stuff. One point that people tend to get stuck on is file permissions after copying them in. Make sure they are readable/writable by whomever the mysqld is running as. Harrison - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 04, 2002 1:41 PM Subject: Newbee: importing data from .MYD .MYI .frm Hi all, A colleague has created a database with MySQL. She has provided me three files with the extensions .MYD .MYI .frm, to put them in the server. How can I import them into MySQL? I have MySQL 3.23.49 in Debian Linux 'potato'. I have used myisamchk to check the database, but I do not know how to do something else. Thanks in advance. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
error during sql-bench: create-mysql-SunOS_5.8_i86pc
could you tell me please, what can cause the bellow error? Testing server 'MySQL 3.23.45' at 2002-05-04 20:10:55 Testing the speed of creating and droping tables Testing with 1 tables and 1 loop count Testing create of tables Can't execute command 'create table bench_4497 (i int NOT NULL,d double,f float,s char(10),v varchar(100),primary key (i))' Error: Error writing file './test/bench_4497.frm' (Errcode: 28) thank you in advance Minas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 during sql-bench: create-mysql-SunOS_5.8_i86pc
On my system error 28 is no space left on device. harry@LordBlink:~ perror 28 Error code 28: No space left on device You can verify that is the same on your system with the perror command that should come with your MySQL installation. If it is the same error then make sure that your datadir you have specified has enough space in order to run the tests. I'm not sure how much exactly is needed, but more than you currently have it seems. Hope that helps. Harrison - Original Message - From: Minas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 04, 2002 7:19 PM Subject: error during sql-bench: create-mysql-SunOS_5.8_i86pc could you tell me please, what can cause the bellow error? Testing server 'MySQL 3.23.45' at 2002-05-04 20:10:55 Testing the speed of creating and droping tables Testing with 1 tables and 1 loop count Testing create of tables Can't execute command 'create table bench_4497 (i int NOT NULL,d double,f float,s char(10),v varchar(100),primary key (i))' Error: Error writing file './test/bench_4497.frm' (Errcode: 28) thank you in advance Minas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
Want some help for WindowsXP
Dear Helpinghand, I am a new user of MySQL and my new operating system is WinXP. I want to know what is the stable version of MySQL in XP. So if anyone know this please help me. I'm looking forward hearing from you. Khyrul Islam - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SV: Strategies for maintaining tables calculated from other tables?
Fra: Nick Arnett [mailto:[EMAIL PROTECTED]] Sendt: 3. maj 2002 04:30 Emne: Strategies for maintaining tables calculated from other tables? I'm finding that it's not quite as simple as I had imagined to maintain a table whose values are calculated by analyzing other tables. The source tables contain time series data, which can is updated several times a day. To calculate totals by day, week, month, etc., I don't want to have to start over from scratch, so I want to keep track of which records in the source tables have already been analyzed. Further complicating things, there are several analyses that take place and I may add others later. I don't always want to have to do all of them at the same time. snip add a datetime field to each of your source tables that shows the date/time when the record was inserted/last updated. Then create another table containing these fields calcs id int unsigned auto_increment primary key calculation varchar(100) last_run datetime For each type of calculation, you insert a record into this new table. You now have a way to register when your calculation was last run. The next time one of your calculations are run, select all source-records with a datetime value newer than your last_run. - Carsten #¤@¤#%#%¤ filter!!! (sql,database,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: Want some help for WindowsXP
I want to know what is the stable version of MySQL in XP. That's 3.23.49, and you can download it here ('Windows downloads'): http://www.mysql.com/downloads/mysql-3.23.html Greetings Reto Baudenbacher - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Remote mysqldump
A quick query to save some shoe leather. Is it possible to perform a mysqldump from a remote windows client? Is so how? Have searched the net and MySQL site but have found nothing definitive. Alex --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.346 / Virus Database: 194 - Release Date: 10/04/2002 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Remote mysqldump
At 0:27 +0100 5/5/02, Alexander Shaw wrote: A quick query to save some shoe leather. Is it possible to perform a mysqldump from a remote windows client? Is so how? I can think of a couple of different ways to interpret your question. Offhand, I'd say that you want to specify -h server_host on the mysqldump command line, but if that's not what you mean, perhaps you can be more specific. Have searched the net and MySQL site but have found nothing definitive. Alex - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: need SQL assistance with a few selects
See section 3.5.4 of the manual. The example there can be adapted to give you the date of the max or min disk size in one query. You have it right for MAX and MIN; there is also an AVG function. From the manual: ``Can it be done with a single query?'' Yes, but only by using a quite inefficient trick that I call the ``MAX-CONCAT trick'': SELECT article, SUBSTRING( MAX( CONCAT(LPAD(price,6,'0'),dealer) ), 7) AS dealer, 0.00+LEFT( MAX( CONCAT(LPAD(price,6,'0'),dealer) ), 6) AS price FROM shop GROUP BY article; -- From: Robert L. Yelvington [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: need SQL assistance with a few selects Date: Fri, 3 May 2002 09:24:02 -0500 Greetings folks, I am able to do all this by pulling out data with PHP or PERL...just need some straight MySQL command line advise Specifically, I need some assistance with the following: Here's my table's structure (table name is 'table'): ID, CLIENT_NAME, CLIENT_LOGIN, DISK_SIZE, RUNTIME, RUNDATE Here's example data: 1,ABC INC,abcinc,1.2,00:30:00,2002-01-01 2,Joe's Restaurant,joesrest,0.2,00:30:00,2002-01-01 3,ABC INC,abcinc,3.2,00:30:00,2002-01-02 4,Joe's Restaurant,joesrest,2.2,00:30:00,2002-01-02 5,ABC INC,abcinc,1.0,00:30:00,2002-01-03 6,Joe's Restaurant,joesrest,1.2,00:30:00,2002-01-03 This is what I'd like to find out: 1. An average disksize for each client, date doesn't matter. The result I'd like to see would be something like: ABC INC,1.8 Joe's Restaurant,1.2 2. The date of max disksize and the date of min disksize...in one query...if that's possible. I can get the min and max disksize as follows(please critique): SELECT client_name, min(disk_size) from table group by client_name; and likewise with the max() function. Thanks so much! Respectfully yours, Rob - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Trouble with indexing
filter-fodder: sql,query Hi, I am trying to speed things up a bit by indexing, but am having a bit of trouble. Take two tables: TABLE dances ( danceid smallint(5) unsigned NOT NULL auto_increment, ddref smallint(5) unsigned NOT NULL default '0', has_desc enum('T','F') NOT NULL default 'F', ... ... PRIMARY KEY (danceid), ) TYPE=MyISAM; TABLE dancetitles ( dtidsmallint(5) unsigned NOT NULL auto_increment, danceid smallint(5) unsigned NOT NULL default '0', title varchar(80) NOT NULL default '', PRIMARY KEY (dtid), INDEX danceidx (danceid) ) TYPE=MyISAM; explain select dances.danceid, dancetitles.title from dances, dancetitles where dances.danceid=dancetitles.danceid and dancetitles.title regexp ^A and dances.has_desc='T' order by title; == | table | type | possible_keys | key| key_len | dances | ALL | PRIMARY | NULL |NULL | dancetitles | ref| danceidx| danceidx | 2 - ref | rows| Extra NULL| 10235 | where used; Using temporary; Using filesort dances.danceid | 1 | where used This is TERRIBLE! But I can't figure out how to improve it. Can anyone help? Donna - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
installation problems on freebsd
I have been trying to install mysql on my freebsd box but it won't work. When I use a freebsd package it works but it does not put it where I want it. It seems like there is little control over it The freebsd package is also an older version (3.23.42) I have downloaded the binary for freebsd from the mysql website. I followed the instructions from the o'reilly book ,the mysql manual and the php/mysql web applications. Everything seems to work until I run ./mysqladmin or I want to start mysql. I get the error that /tmp/mysql.sock cannot be found. I can't see it there either. It was there when installed it as a package Any ideas? Guy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: installation problems on freebsd
On Sun, May 05, 2002 at 04:02:44PM +1200, Defryn NZ wrote: I have been trying to install mysql on my freebsd box but it won't work. When I use a freebsd package it works but it does not put it where I want it. It seems like there is little control over it The freebsd package is also an older version (3.23.42) I have downloaded the binary for freebsd from the mysql website. I followed the instructions from the o'reilly book ,the mysql manual and the php/mysql web applications. Everything seems to work until I run ./mysqladmin or I want to start mysql. I get the error that /tmp/mysql.sock cannot be found. I can't see it there either. It was there when installed it as a package Is /tmp/mysql.sock missing after you start the MySQL server using `bin/safe_mysqld'? -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.47-max: up 86 days, processed 2,253,883,132 queries (301/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Trouble with indexing
On Sun, May 05, 2002 at 03:21:59AM +0100, Donna Robinson wrote: explain select dances.danceid, dancetitles.title from dances, dancetitles where dances.danceid=dancetitles.danceid and dancetitles.title regexp ^A and dances.has_desc='T' order by title; [snip] This is TERRIBLE! But I can't figure out how to improve it. Can anyone help? REGEXP queries don't use indexes. Change the: REGEXP ^A to LIKE A% and it'll use the index and give you a nice speed boost. Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.47-max: up 86 days, processed 2,253,903,006 queries (301/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php