Load data infile 'abcd.txt' into table b.chicago;
Dear friends, Load data infile 'abcd.txt' into table b.chicago; This statement loads half of the data from file and gives error posted below. Any guidance, please. Thank you. -- --- mysql use b Database changed mysql load data infile 'abcd.txt' into table b.chicago; ' for key 1 Duplicate entry '[EMAIL PROTECTED] mysql describe chicago; +---+--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+--+--+-+-+---+ | email | varchar(150) | | PRI | | | +---+--+--+-+-+---+ 1 row in set (0.00 sec) mysql
AW: Brainstorming' time!
Scott, ASP.NET would be just fine ! Freddie -Ursprüngliche Nachricht- Von: Scott Hamm [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 20. August 2004 20:40 An: 'Mysql ' (E-mail) Betreff: Brainstorming' time! Looks like I will need more than just MySQL and Php/ASP.net. I might even look into perl. What else should I be using? (IIS is provided for) I'm willing to learn new tricks. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: newbie question on scrolling through a table one record at a time
Many thanks for your reply Tom. I will read it more closely over the week-end, but wanted to say thanks straight away. Kerry -Original Message- From: Tom Horstmann [mailto:[EMAIL PROTECTED] Sent: 20 August 2004 15:52 To: 'Kerry Frater'; 'MySQL List' Subject: RE: newbie question on scrolling through a table one record at a time Hi Kerry, The problem is more fundamental with the scrolling through the records/rows of Master. [..] It is not sensible to allow 200 million pieces of data to be transferred to the Delphi PC to build a local Dataset to scroll through. [..] Getting the first row is easy select * from Master order by MasterRef limit 1; It is, but LIMIT mostly is executed after getting all records meeting the WHERE-condition. That might be quite slow. but getting the next record isn't as straight forward. Mainly because I have no idea of what the next value of MasterRef is. All I know is that I want to get the next row in sequence. None of the papers I have or have seen addresses this issue. Either this concept is not required in SQL programming or it is so obvious that it doesn't need explaining. Either way I can't see the wood for the trees. If MasterRef is a unique value column then the next record would be: select * from Master order by MasterRef limit 1 where MasterRef MyCurrentMasterRefValue; This simply raises questions 1) how to get the previous row (presume you use the DESCENDING keyword of the table, 2) how to test for Begining and End of Table and 3) what to do if the column being ordered on is not unique. I ran through the same problem the last days (still). This is how i did it: At first you need a unique key (auto-increment). I name it id. If you have records that are non-unique by the column you want to sort them, try to add other columns to sort on to get them as unique as you can. Having non-unique records isn't a problem as long there are not many beeing equal. How to move through records: Starting with a value of '', always SELECT the record having a higher value in that columns you sorted on than the last one. As you said, that's all, if there all records are unique. You will need LIMIT to get through equal records. It's quite easy having an example: record key 1a 2a 3b 4b 5c Get the first record (assuming your id starts with 0): SELECT key FROM table WHERE key='' AND id-1 ORDER BY key,id LIMIT 0,1 Store these: old_key = key old_id = id Get the next record: old_key = SELECT key FROM table WHERE key=old_key AND idold_id ORDER BY key,id LIMIT 1,1 The LIMIT has to be 1 here to get the second record. As long as key stays equal to old_key, increase the limit by one for each record fetched. When getting a new value for key, set the limit to 1 again. You need to find a good relation between the amount of equal records and the columns you use to sort and move on. 500 records having the same key will make things slow, but using a long WHERE- clause will do, too. I tested this for upto 3 records. If there is an index on all columns used in the SELECTs, speed seems to be stable upto that size. hth, TomH -- PROSOFT EDV-Loesungen GmbH Co. KGphone: +49 941 / 78 88 7 - 121 Ladehofstrasse 28, D-93049 Regensburg cellphone: +49 174 / 41 94 97 0 Geschaeftsfuehrer: Axel-Wilhelm Wegmann [EMAIL PROTECTED] AG Regensburg HRA 6608 USt.183/68311http://www.proSoft-Edv.de -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Help with --with-debug
Hello This is probably real simple for someone that knows - I'm having a few problems installing MySQL on a particular server (it's repairing a damaged copy). I'd like to try and fix it myself so I'm recompiling with the --with-debug option. If I manage to fix the problem, is there any overhead of having MySQL built with --with-debug? Or should I eventually recompile without --with-debug when the server is put into production? Thankyou in advance- Jo _ Smart Saving with ING Direct earn 5.25% p.a. variable rate: http://ad.au.doubleclick.net/clk;7249209;8842331;n?http://www.ingdirect.com.au/burst6offer.asp?id=8 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Load data infile 'abcd.txt' into table b.chicago;
mysql load data infile 'abcd.txt' into table b.chicago; ' for key 1 Duplicate entry '[EMAIL PROTECTED] I think you have 2 e-mails that are equal in the file and the e-mail field is declared as a primary key (which implies UNIQUE). -- mack / -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Help: Retrieving time stamp
Is there something wrong with this code ? Still confused after reading the manual. td?php echo $rsJobShortDat-Fields('DATE_FORMAT('LFWJobBank'.'Entered','%m/%d/%Y')); ?/td Entered is a timestamp column. With the apostrophes off the table / column I get errors about unexpected % . Here is my SQL statement SELECT LFWJobBank.JobReferenceCode,DATE_FORMAT(LFWJobBank.Entered,'%m/%d/%Y'), LFWJobBank.DazeLeft, LFWJobBank.JobTitle FROM LFWJobBank WHERE VendorID = colname Thank you, Stuart -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Help: Retrieving time stamp
Stuart, why not change your select statement (assuming it is correct and actually works, in and of itself) to give the date-formatted field an alias: SELECT LFWJobBank.JobReferenceCode,DATE_FORMAT(LFWJobBank.Entered,'%m/%d/%Y') AS date_entered, LFWJobBank.DazeLeft, LFWJobBank.JobTitle FROM LFWJobBank WHERE VendorID = colname Then your php code should change to grab 'date_entered' (probably without having to format it once again). I don't use PHP that often, so I'm not sure of the right syntax myself - let someone else comment on that! But I do remember it is useful in testing to have php output the full SQL query text to the browser, just so you can see it is correct before proceeding. Cheers Terry - Original Message - Is there something wrong with this code ? Still confused after reading the manual. td?php echo $rsJobShortDat-Fields('DATE_FORMAT('LFWJobBank'.'Entered','%m/%d/%Y')); ?/td Entered is a timestamp column. With the apostrophes off the table / column I get errors about unexpected % . Here is my SQL statement SELECT LFWJobBank.JobReferenceCode,DATE_FORMAT(LFWJobBank.Entered,'%m/%d/%Y'), LFWJobBank.DazeLeft, LFWJobBank.JobTitle FROM LFWJobBank WHERE VendorID = colname Thank you, Stuart -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
conflicting messages
I had mysql running great on my Gentoo server, but there was some kind of a problem with my host and my machine had to be rebooted. I restart mysql with /etc/init.d/mysql start (Gentoo syntax), but I'm having some problems: localhost / # mysqladmin test mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! localhost / # /etc/init.d/mysql start * WARNING: mysql has already been started. There is no /var/run/mysqld/mysqld.sock file, and mysql.err doesn't have anything to say. Can anyone help? - Grant __ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
anyone using gnomedb?
I've just installed gnome-db on my redhat system and am getting familiar with how it works. I'm running mysql on the localhost, and the problem right now is connecting my data sources. This seems to require the gnomedb-mgr prog but I don't find it on my machine. Documentation was not help, the mailing list doesn't seem to get much traffic these days, searching the list archives didn't turn up anything useful. Any ideas welcome. Kevin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Help: Retrieving time stamp
Terry , thank you . The query worked on it's own, but within the PHP it got thrown back. Alias worked well. Sorry , sort of new to db / webdev. Stuart --- Terry Riley [EMAIL PROTECTED] wrote: Stuart, why not change your select statement (assuming it is correct and actually works, in and of itself) to give the date-formatted field an alias: SELECT LFWJobBank.JobReferenceCode,DATE_FORMAT(LFWJobBank.Entered,'%m/%d/%Y') AS date_entered, LFWJobBank.DazeLeft, LFWJobBank.JobTitle FROM LFWJobBank WHERE VendorID = colname Then your php code should change to grab 'date_entered' (probably without having to format it once again). I don't use PHP that often, so I'm not sure of the right syntax myself - let someone else comment on that! But I do remember it is useful in testing to have php output the full SQL query text to the browser, just so you can see it is correct before proceeding. Cheers Terry - Original Message - Is there something wrong with this code ? Still confused after reading the manual. td?php echo $rsJobShortDat-Fields('DATE_FORMAT('LFWJobBank'.'Entered','%m/%d/%Y')); ?/td Entered is a timestamp column. With the apostrophes off the table / column I get errors about unexpected % . Here is my SQL statement SELECT LFWJobBank.JobReferenceCode,DATE_FORMAT(LFWJobBank.Entered,'%m/%d/%Y'), LFWJobBank.DazeLeft, LFWJobBank.JobTitle FROM LFWJobBank WHERE VendorID = colname Thank you, Stuart -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re-installing db/tables from dumpfile
I am moving my database(s) from one server to another, did a full dump of the data and have a large file with all the create instruction sets etc. My question, what is the best way to recreate these db, tables etc. on the new server. MySQL is already installed running. Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
LOAD DATA
Dear friends, I use following code use databasea load data infileabcd.txt' into table databasea.tablename; Data gets loaded in table, however at the end of each record I see a square symbol, the symbol usually we see in compiled code. Can anyone give insight into these extra squares appearing at the end of each record, and to load data without getting these squares. Thank you
A new Machine
After 2 days in Microsoft HELL with my SQLsvr databases, I'm ready to rob the piggy bank and build a new linux mysql server. Here's my problem: I have, at present, two rather large databases. (A: 4Million records in one table, 15 Million in another; B: 1.5Million and 5Million) The databases are relatively static. That is, they they are updated by batch processes twice per year or so. They are realatively well normalized. (I'd say well, but that would be bragging. :) The business is a harvest type of operation, I ignore them for months then beat them to death for 120 days. I'm not rich, but what hardware and distro do you experts suggest? (My current Win2K server is a dual p3-650, 1gb with the databases on 2 36gb U160 10K drives. ) I've got no problem moving the drives out of that system (especially since I just bought a new one...)-- (I'd put my redhat 8 on it this afternoon, except it also runs my exchange server and that's a different migration...) sign me... Fed up at the Beach... [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: A new Machine
On Sat, 21 Aug 2004 10:18:06 -0700, Info [EMAIL PROTECTED] wrote: After 2 days in Microsoft HELL with my SQLsvr databases, I'm ready to rob the piggy bank and build a new linux mysql server. Here's my problem: I have, at present, two rather large databases. (A: 4Million records in one table, 15 Million in another; B: 1.5Million and 5Million) The databases are relatively static. That is, they they are updated by batch processes twice per year or so. They are realatively well normalized. (I'd say well, but that would be bragging. :) The business is a harvest type of operation, I ignore them for months then beat them to death for 120 days. I'm not rich, but what hardware and distro do you experts suggest? (My current Win2K server is a dual p3-650, 1gb with the databases on 2 36gb U160 10K drives. ) I've got no problem moving the drives out of that system (especially since I just bought a new one...)-- (I'd put my redhat 8 on it this afternoon, except it also runs my exchange server and that's a different migration...) I would say it has more to do with what you are doing with the database (query request wise) than the size --- I'd up the memory to 2GB and Just go with a single PIV 2.8 I'd suggest not buying a 'server' from a company, becuase they are typically just really heavy desktops... as for drives, I would raid 5 with at least 100GB - migrate towards SATA if you can make sure that what ever apps you have running will be easily migrated to making the calls against MySQL - some of the SQL is different (ie LIMIT instead of TOP, no stored procedures, different foreign key relationships, etc..) sign me... Fed up at the Beach... [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: A new Machine
I have to agree with Chis on the single cpu box. We have been building our own boxes using AMD Athlon 64 3400+. Make sure you get the chip with 1mb cache. The hyperchannel on these make IO so much faster. A couple of fast SATA drives in a raid config and you are ready to go. There is a new ASUS MB out that supports dual channel ddr memory for the Athlon 64. Should be really good. Just my 2 cents worth. Larry - Original Message - From: Chris McKeever [EMAIL PROTECTED] To: Info [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, August 21, 2004 1:19 PM Subject: Re: A new Machine On Sat, 21 Aug 2004 10:18:06 -0700, Info [EMAIL PROTECTED] wrote: After 2 days in Microsoft HELL with my SQLsvr databases, I'm ready to rob the piggy bank and build a new linux mysql server. Here's my problem: I have, at present, two rather large databases. (A: 4Million records in one table, 15 Million in another; B: 1.5Million and 5Million) The databases are relatively static. That is, they they are updated by batch processes twice per year or so. They are realatively well normalized. (I'd say well, but that would be bragging. :) The business is a harvest type of operation, I ignore them for months then beat them to death for 120 days. I'm not rich, but what hardware and distro do you experts suggest? (My current Win2K server is a dual p3-650, 1gb with the databases on 2 36gb U160 10K drives. ) I've got no problem moving the drives out of that system (especially since I just bought a new one...)-- (I'd put my redhat 8 on it this afternoon, except it also runs my exchange server and that's a different migration...) I would say it has more to do with what you are doing with the database (query request wise) than the size --- I'd up the memory to 2GB and Just go with a single PIV 2.8 I'd suggest not buying a 'server' from a company, becuase they are typically just really heavy desktops... as for drives, I would raid 5 with at least 100GB - migrate towards SATA if you can make sure that what ever apps you have running will be easily migrated to making the calls against MySQL - some of the SQL is different (ie LIMIT instead of TOP, no stored procedures, different foreign key relationships, etc..) sign me... Fed up at the Beach... [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: What is a good MySQL database manager for newbies?
--- [EMAIL PROTECTED] wrote: I posted this a little while ago, but it faded out with very few responses due to my not posting the necessary information, so I seek to rectify my err now. Info: OS: Windows XP PHP: 5 Use: I'm looking for something that can easily create and manage databases, doing stuff like creating and editing tables. Something simple for newbies like me not seeking to do really complicated things. There that should be better. I tried several and favored Navicat and SQLYog (I don't know if I spelled it right). If I remember correctly, I purchased SQLYog because it's cheaper, and I was/am really pinching pennies. But there was some sort of problem, and I never got my software. I posted a message on their forum, but they deleted it and sent me a really snotty message. So I paid the extra money for Navicat and have no regrets. I'm now more comfortable working with phpMyAdmin, but I still prefer Navicat for importing data. I read a review that raved about Navicat's log feature. I think they were referring to the logs that are created when you import data. If there are errors in your data, the logs help you track them down. I don't know if Navicat is the only software with this feature, but it is a tremendous help. I just recently learned about two new programs on another list. I think one is called Lasso, or something similar, and I believe one or both are designed to complement Dreamweaver. __ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Brainstorming' time!
At 11:02 AM 8/20/2004, you wrote: Ok. I'm looking into alternatives. I'm trying to figure out an alternative to mysql exporting into xls file. Is there any another way you can export into file and make it readable? What format do you use? I'm open to ideas from experienced database programmers :) I'm upgrading the whole database system from stupid Access database into SQL variant, whether it be MySQL or SQL server (MeowSoft) Try these: http://www.shareware4u.com/Business-Finance/Database-Management/MySQL-to-Excel.htm http://ems-hitech.com/mysqlutils/ You should also be able to use the MySQL ODBC driver and open the database table in Excel directly. Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Bug #3933
Hi! On Aug 21, Robert Nagy wrote: Hi. Can u point me to the fixed file(s) please? Or can u send me the diff if you have it? http://bugs.mysql.com/bug.php?id=3933 Roger, it is explained my reply to the bugreport, and in my reply to you. The bug is fixed in 4.0.21. According to the manual http://dev.mysql.com/doc/mysql/en/News-4.0.x.html and to our download site http://dev.mysql.com/downloads/mysql/4.0.html the last released version in 4.0.20. If you want to get the bugfix now, you have to follow the link that is mentioned in bugreport and my first reply http://www.mysql.com/doc/en/Installing_source_tree.html Regards, Sergei -- __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Bug #3933
Stardate [040822 00:26]. Sergei Golubchik of Borg wrote: Roger, it is explained my reply to the bugreport, and in my reply to you. Thanks I can read. But the question was not that. http://www.mysql.com/doc/en/Installing_source_tree.html I'd like to see the diff between the two revisions. But I couldn't find any info in connection with #3933 in the ChangSet. So can u please point me to a *diff*. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Bug #3933
Hi! On Aug 22, Robert Nagy wrote: Stardate [040822 00:26]. Sergei Golubchik of Borg wrote: Roger, it is explained my reply to the bugreport, and in my reply to you. Thanks I can read. But the question was not that. http://www.mysql.com/doc/en/Installing_source_tree.html I'd like to see the diff between the two revisions. But I couldn't find any info in connection with #3933 in the ChangSet. So can u please point me to a *diff*. Ah, ok. Here it is: http://mysql.bkbits.net:8080/mysql-4.0/[EMAIL PROTECTED] Regards, Sergei -- __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Bug #3933
Stardate [040822 01:45]. Sergei Golubchik of Borg wrote: Ah, ok. Here it is: http://mysql.bkbits.net:8080/mysql-4.0/[EMAIL PROTECTED] Regards, Sergei Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]