RE: Getting the unique auto-increment primary key after an insert
Thanks, I found it but I wasn't sure if it could be changed between my INSERT and the SELECT LAST..() by another instance of my application. I'll suck-it-and-see ! Matt [EMAIL PROTECTED] wrote: The good ol' LAST_INSERT_ID() function is what you probably need. Check it out in manual. Lian -Original Message- From: Matt Hyne [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 5:58 AM To: [EMAIL PROTECTED] Subject: Getting the unique auto-increment primary key after an insert Hi Folks, needs a little advice. I have a table that contains a unique auto-incrementing primary key called 'id' (eg 1,2,3,4...). When inserting data, I let mySQL allocate the value that goes into this field. Now I want to insert a new row into this table and get the 'id' value that mySQL has allocated (so I can then do some more work such as attaching a filename called 'id'.xxx). Can someone suggest a good way to do this ? I thought of maybe doing a SELECT MAX(id) FROM table first and then using id+1 as the new 'id' for the next entry but this is frought with danger as someone could come along and insert a new entry between my SELECT and INSERT. Because 'id' is the only guaranteed unique column, I cannot think of a way to do a SELECT after an INSERT to get back the 'id' of the last thing inserted. Can anyone help ? Matt -- 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: Getting the unique auto-increment primary key after an insert
As stated only few days ago on this list, the LAST_INSERT_ID() is relevant per connection, i.e. it returns the correct last inserted id of the current connection, disregarding other possible inserts done through other parallel connections. So each connection has its own counter for this. HTH, Lian www.programEz.net -Original Message- From: Matt Hyne [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 9:07 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Getting the unique auto-increment primary key after an insert Thanks, I found it but I wasn't sure if it could be changed between my INSERT and the SELECT LAST..() by another instance of my application. I'll suck-it-and-see ! Matt [EMAIL PROTECTED] wrote: The good ol' LAST_INSERT_ID() function is what you probably need. Check it out in manual. Lian -Original Message- From: Matt Hyne [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 5:58 AM To: [EMAIL PROTECTED] Subject: Getting the unique auto-increment primary key after an insert Hi Folks, needs a little advice. I have a table that contains a unique auto-incrementing primary key called 'id' (eg 1,2,3,4...). When inserting data, I let mySQL allocate the value that goes into this field. Now I want to insert a new row into this table and get the 'id' value that mySQL has allocated (so I can then do some more work such as attaching a filename called 'id'.xxx). Can someone suggest a good way to do this ? I thought of maybe doing a SELECT MAX(id) FROM table first and then using id+1 as the new 'id' for the next entry but this is frought with danger as someone could come along and insert a new entry between my SELECT and INSERT. Because 'id' is the only guaranteed unique column, I cannot think of a way to do a SELECT after an INSERT to get back the 'id' of the last thing inserted. Can anyone help ? Matt -- 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: Infos about the embedded server dll
Thanks I'll get a look libmysql still need a mysql server, isn't it ? I would like to integer the support for mysql whitout having to install a mysql server, that's why I search infos about libmysqld and not mysql. What do you mean with libmysql.dll seems to work better. The purposes are different...or am I wrong ? Wavyx PS: I forgot the list in my reply ... Derick Smith wrote: The function are in chapter 8.4.5 of the manual. I tried using the embedded library in C, then calling it from VB through a DLL without any luck. The libmysql.dll seems to work better. Eric From: Wavyx [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Infos about the embedded server dll Date: Mon, 23 Jun 2003 18:49:02 +0200 Hello, I'm looking for informations about the Embedded Server DLL. There's not a lot of in the manuel (libmysqld section). Where can I Find the available functions? Are they the same as in the C API? I'm planning to use the dll from C#. Does anyone already try to interop with the mysql server engine dll (Pinvoke and DllImport)? Thanks for help Wavyx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _ Envie de discuter en live avec vos amis ? Télécharger MSN Messenger http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Can you get the results of an UPDATE command?
I've looked around and believe this to not be possible, but am checking just to be sure. Basically I want to run the command UPDATE MyTable SET SomeRecord = NewValue WHERE SomeRecord = OldValue But, I need to know which rows were modified, not simply how many. So far this is the best that I have come up with LOCK TABLES MyTable WRITE SELECT * FROM MyTable WHERE SomeRecord = OldValue UPDATE MyTable SET SomeRecord = NewValue WHERE SomeRecord = OldValue UNLOCK TABLES My question is.. isn't there a better way. One that doesn't require 4 queries to do such a simple thing? Or one that can be safely done in a multi user environment without locking the table? The queries run very quickly, and I don't actually process the SELECT results until after the table is unlocked... but it's kinda nagging at me that there must be a **better** solution than this. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Can you get the results of an UPDATE command?
Hi Jason, If I understand correctly you need the SELECT statement first to detemine which records to update. However perhaps on the SELECT statement you could speed up things by showing only the required columns and not all. While this doesnt make a big difference for small tables, it can make one on big tables ;-). I know it is not what you were originally asking for, but in this way you could increase the availability of the server. Best regards Nils Valentin Tokyo/Japan 2003 6 24 16:02Jason : I've looked around and believe this to not be possible, but am checking just to be sure. Basically I want to run the command UPDATE MyTable SET SomeRecord = NewValue WHERE SomeRecord = OldValue But, I need to know which rows were modified, not simply how many. So far this is the best that I have come up with LOCK TABLES MyTable WRITE SELECT * FROM MyTable WHERE SomeRecord = OldValue UPDATE MyTable SET SomeRecord = NewValue WHERE SomeRecord = OldValue UNLOCK TABLES My question is.. isn't there a better way. One that doesn't require 4 queries to do such a simple thing? Or one that can be safely done in a multi user environment without locking the table? The queries run very quickly, and I don't actually process the SELECT results until after the table is unlocked... but it's kinda nagging at me that there must be a **better** solution than this. -- --- Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp Personal URL: http://www.knowd.co.jp/staff/nils -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql ended error
If You install Mysql from .dmg file it doesn't install mysql databases (grant tables, etc.) I think You have a permission problem so open a terminal and type su this command allows You to be root then chown -R mysql.mysql data(data owner must be mysql) chmod -R 577 data (allows everyone to write/read/list data) Then: ./scripts/mysql_install_db --force check again data I hope this solve your problem. Santino At 13:43 -0400 23-06-2003, Pushpinder Singh Garcha wrote: Is there an mysql directory in /usr/local/mysql/data? [psg:/usr/local/mysql] psgarcha% sudo ls data 127.0.0.1.errib_logfile1 psg.local..err ShwetaParekh-Computer.local..err ibdata1 psg.local..err.save ShwetaParekh-Computer.local..pid masterstream test ib_arch_log_00 mydb ib_logfile0 mysql Does mysql own /usr/local/mysql/data? Yes [psg:/usr/local/mysql] psgarcha% ls -la total 11288 drwxr-xr-x 22 root wheel 748 Jun 23 11:50 . drwxr-xr-x 6 root wheel 204 Jun 23 11:50 .. -rw-r--r-- 1 root wheel19106 May 14 16:50 COPYING -rw-r--r-- 1 root wheel28003 May 14 16:50 COPYING.LIB -rw-r--r-- 1 root wheel 181571 May 14 16:24 ChangeLog -rw-r--r-- 1 root wheel 6802 May 14 16:50 INSTALL-BINARY -rw-r--r-- 1 root wheel 1937 May 14 16:24 README drwxr-xr-x 46 root wheel 1564 Jun 23 09:22 bin -rwxr-xr-x 1 root wheel 773 May 14 17:01 configure drwxr-x--- 15 mysql wheel 510 Jun 23 13:29 data drwxr-xr-x 51 root wheel 1734 Jun 23 09:22 include drwxr-xr-x 8 root wheel 272 Jun 23 09:22 lib drwxr-xr-x 3 root wheel 102 Jun 23 09:22 man -rw-r--r-- 1 root wheel 2893112 May 14 16:48 manual.html -rw-r--r-- 1 root wheel 2514300 May 14 16:48 manual.txt -rw-r--r-- 1 root wheel 115727 May 14 16:48 manual_toc.html drwxr-xr-x 9 root wheel 306 Jun 23 09:22 mysql-test drwxr-xr-x 3 root wheel 102 Jun 23 09:22 scripts drwxr-xr-x 3 root wheel 102 Jun 23 09:22 share drwxr-xr-x 31 root wheel 1054 Jun 23 09:22 sql-bench drwxr-xr-x 12 root wheel 408 Jun 23 09:22 support-files drwxr-xr-x 21 root wheel 714 Jun 23 09:22 tests Does mysql have r/w privileges on /usr/local/mysql/data? Yes [psg:local/mysql/bin] psgarcha% cd /usr/local/mysql/ [psg:/usr/local/mysql] psgarcha% [psg:/usr/local/mysql] psgarcha% ./scripts/mysql_install_db --force mkdir: ./data/mysql: Permission denied chmod: ./data/mysql: Permission denied mkdir: ./data/test: Permission denied chmod: ./data/test: Permission denied Preparing db table Preparing host table Preparing user table Preparing func table Preparing tables_priv table Preparing columns_priv table Installing all prepared tables ./bin/mysqld: Can't change dir to '/usr/local/mysql/./data/' (Errcode: 13) 030623 13:27:37 Aborting 030623 13:27:37 ./bin/mysqld: Shutdown Complete Installation of grant tables failed! Examine the logs in ./data for more information. You can also try to start the mysqld daemon with: ./bin/mysqld --skip-grant You can use the command line tool ./bin/mysql to connect to the mysql database and look at the grant tables: shell ./bin/mysql -u root mysql mysql show tables Try 'mysqld --help' if you have problems with paths. Using --log gives you a log in ./data that may be helpful. The latest information about MySQL is available on the web at http://www.mysql.com Please consult the MySQL manual section: 'Problems running mysql_install_db', and the manual section that describes problems on your OS. Another information source is the MySQL email archive. Please check all of the above before mailing us! And if you do mail us, you MUST use the ./bin/mysqlbug script! [psg:/usr/local/mysql] psgarcha% chown -R mysql.mysql data chown: data: Permission denied chown: data: Operation not permitted [psg:/usr/local/mysql] psgarcha% chmod -r 577 data chmod: 577: No such file or directory chmod: data: Operation not permitted [2]Exit 1sudo ./bin/mysqldsafe [psg:/usr/local/mysql] psgarcha% Starting mysqld daemon with databases from /usr/local/mysql/data 030623 13:29:40 mysqld ended [3]Done sudo ./bin/mysqld_safe Thanks again --Pushpinder On Monday, June 23, 2003, at 01:22 PM, Santino wrote: ./bin/safemysql -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Simple Question: MySQL and Shell Scripts
Zach wrote: I am writing a shell script using Born Shell. I am trying to get the result of a SQL statement into a variable. For example: /usr/bin/mysql -uroot -prootpass BOB EOF SELECT * FROM Bobstable WHERE Name=1 EOF How do I get the result into a variable? Thanks in advance! May be: myvar=`/usr/bin/mysql -uroot -prootpass -e 'SELECT * FROM Bobstable WHERE Name=1;' BOB` But this is more a shell than a mysql question, isn't it ? Joseph Bueno -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Simple Question: MySQL and Shell Scripts
On Mon, Jun 23, 2003 at 06:37:17PM -0500, Zach wrote: I am writing a shell script using Born Shell. I am trying to get the result of a SQL statement into a variable. You mean Bourne shell. For example: /usr/bin/mysql -uroot -prootpass BOB EOF SELECT * FROM Bobstable WHERE Name=1 EOF How do I get the result into a variable? If you plan to add LIMIT 1 to your query, consider putting the command line into backquotes. Otherwise, use something like: 8 cut here 8 #!/bin/sh mydb=BOB myuser=user mypass=p4s$w0rd #mysql=/usr/local/bin/mysql mysql=/usr/bin/mysql q=SELECT this,that FROM Bobstable WHERE Name=1 $mysql -u$myuser -p$mypass -e$q $mydb | while read this that; do echo this is $this, that is $that done 8 cut here 8 -- Paul Chvostek [EMAIL PROTECTED] Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Access denied for user: '@localhost' to database 'mysql'
don't piggyback on other people's threads. you can start your own for free. # [EMAIL PROTECTED] / 2003-06-19 13:23:04 -0700: I ran a command which was part of the installation process for some php accounting software. update user set host='%' where host='localhost' and user='root'; that's quite a bug there, and you should report it to the authors. Figured it just let root log in from anywhere. almost. it lets root in from anywhere *except* localhost. Access denied for user: '@localhost' to database 'mysql' right. -- If you cc me or remove the list(s) completely I'll most likely ignore your message.see http://www.eyrie.org./~eagle/faqs/questions.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Foreign Key Concept
# [EMAIL PROTECTED] / 2003-06-24 16:48:24 +0800: After I create this table,and add foreign key tno to this table. If I delete tno in p_program_type table,it would alarm that some data still in p_schedule. How can I define the p_schedule or p_program_type table to make sure that while delete the tno in p_program_type,the p_schedule table would delete the data matching p_schedule table. ON DELETE http://www.mysql.com/doc/en/InnoDB_foreign_key_constraints.html -- If you cc me or remove the list(s) completely I'll most likely ignore your message.see http://www.eyrie.org./~eagle/faqs/questions.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: AES 256-Bit Encryption
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 11 Jun 2003, Herb Wartens wrote: Does anyone know where to find the 256-Bit patch for AES encryption? No patch needed - just edit include/my_aes.h and change the AES_KEY_LENGTH define to the desired value (it defaults to 128 bits). Bye, LenZ - -- For technical support contracts, visit https://order.mysql.com/?ref=mlgr __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mr. Lenz Grimmer [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Production Engineer /_/ /_/\_, /___/\___\_\___/ Hamburg, Germany ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE++B/8SVDhKrJykfIRAnN3AJ0VcHkFqBk8vP/S9SdraCUeuwDoHgCffdXC w0/n1XYPEePNCjyxrGrMZ5c= =oPTe -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Transaction support
Hi, Does MYSQL support transaction concept, which includes issues like commiting data , rollbacking etc??? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Transaction support
# [EMAIL PROTECTED] / 2003-06-24 15:15:33 +0530: Does MYSQL support transaction concept, which includes issues like commiting data , rollbacking etc??? Did you know MySQL has documentation? -- If you cc me or remove the list(s) completely I'll most likely ignore your message.see http://www.eyrie.org./~eagle/faqs/questions.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Simple Question: MySQL and Shell Scripts
Joseph Bueno wrote: Zach wrote: I am writing a shell script using Born Shell. I am trying to get the result of a SQL statement into a variable. For example: /usr/bin/mysql -uroot -prootpass BOB EOF SELECT * FROM Bobstable WHERE Name=1 EOF How do I get the result into a variable? But this is more a shell than a mysql question, isn't it ? Nah, in fairness, it's more of a MySQL question because the issue is how you execute the 'mysql' command in such a way that it's conducive to the shell environment. I vote 60/40 MySQL vs. Shell. May be: myvar=`/usr/bin/mysql -uroot -prootpass -e 'SELECT * FROM Bobstable WHERE Name=1;' BOB` Don't forget to use '-B' in order to make the output silent except for the results: myvar=`/usr/bin/mysql -u root --password=password -B -e SELECT ...` Naturally I'd be out of place not to mention the security implications: You should 1. not be querying your DB as the root database user if possible, and 2. you should stick your password (which shouldn't match your UNIX password) in a textfile readable only by you so that you don't pass the password on the command line. -Fred -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Transaction support
# [EMAIL PROTECTED] / 2003-06-24 12:29:33 +0200: # [EMAIL PROTECTED] / 2003-06-24 15:15:33 +0530: Does MYSQL support transaction concept, which includes issues like commiting data , rollbacking etc??? Did you know MySQL has documentation? # [EMAIL PROTECTED] / 2003-06-24 04:00:02 -0700: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2003-06-24 15:15:33 +0530: Does MYSQL support transaction concept, which includes issues like commiting data , rollbacking etc??? Did you know MySQL has documentation? Yes mysql supports transactions ... they only work on innodb bdb and gemini table types # [EMAIL PROTECTED] / 2003-06-24 19:07:46 +0800: Hello, Roman Neuhauser, Install Innodb,mysql really has transaction,u may use java code with it or run sql statment directly in mysql. === At 2003-06-24, 12:29:00 you wrote: === # [EMAIL PROTECTED] / 2003-06-24 15:15:33 +0530: Does MYSQL support transaction concept, which includes issues like commiting data , rollbacking etc??? Did you know MySQL has documentation? I have sent a followup to a post to this list, and received two off-the-list replies as if I had asked the original question instead of answering it. This is not the first time such thing has happened, and given this behavior is specific to this list I wonder whether MySQL attracts people with reading problems? -- If you cc me or remove the list(s) completely I'll most likely ignore your message.see http://www.eyrie.org./~eagle/faqs/questions.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Can you get the results of an UPDATE command?
# [EMAIL PROTECTED] / 2003-06-24 01:02:17 -0600: But, I need to know which rows were modified, not simply how many. So far this is the best that I have come up with LOCK TABLES MyTable WRITE SELECT * FROM MyTable WHERE SomeRecord = OldValue UPDATE MyTable SET SomeRecord = NewValue WHERE SomeRecord = OldValue UNLOCK TABLES My question is.. isn't there a better way. One that doesn't require 4 queries to do such a simple thing? Or one that can be safely done in a multi user environment without locking the table? http://www.mysql.com/doc/en/SELECT.html (look for FOR UPDATE) http://www.innodb.com/ibman.html#Locking_reads -- If you cc me or remove the list(s) completely I'll most likely ignore your message.see http://www.eyrie.org./~eagle/faqs/questions.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Can't find file: './mysql/host.frm' (errno: 13)
# [EMAIL PROTECTED] / 2003-06-23 16:16:50 -0400: I installed MySQL (mysql-standard-4.0.13-apple-darwin6.4-powerpc) ... but now I get this error in the log file and I am unable to still start the MySQL Server. 030623 15:59:05 Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13) run perror 13 -- If you cc me or remove the list(s) completely I'll most likely ignore your message.see http://www.eyrie.org./~eagle/faqs/questions.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: update to 4.0 mySQL question
# [EMAIL PROTECTED] / 2003-06-23 11:11:28 -0400: I have updated mySQL to the 4.0.13-standard and had no problems UNTIL I attempted to run mysql_fix_privileges. This is the error I get: ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) /tmp is: drwxrwxrwt6 root root 4096 Jun 23 11:21 tmp and mysql.sock is ACTUALLY located in /var/lib/mysql. Where do I need to look to change the location from /tmp to /var/lib/mysql for this particular file? Looks like you have either not upgraded you client (server puts the socket in /var/lib/mysql, but the client expects it in /tmp), and/or you have conflicting definitions my my.cnf file(s). -- If you cc me or remove the list(s) completely I'll most likely ignore your message.see http://www.eyrie.org./~eagle/faqs/questions.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: select * into outfile;mysql-delphi
MySQL won't write data to a file if the file already exists. Make sure you've deleted the old file or given MySQL a new filename to write to. Jan -- Janice Wright Ingenta plc [EMAIL PROTECTED] http://www.ingentaselect.com/ Sometime recently Rahmat Hidayat said: hello my friends.. i have some problem : 1. when i drop data out into a file, sometimes i have some problem like the file can't be opened(when i save into .xls or .mdb or other) how can i solve this problem? 2. how can i use mysql with delphi?please give me more explanation about it.. and must i have some application for it? - Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Release timeframes -- need Internat. support
I am new to MySQL and was wondering if someone could share some past experience on timeframes from alpha to full release ? We need full Internationalization support and since 4.1 has it in it would like to get some guesses on when it will be production release. Thanks
Re: LONGTEXT size problem?
Sam Evans [EMAIL PROTECTED] wrote: I am attempting to insert into my table a huge block of text (talking almost a megabyte). It seems like maybe a quarter of the way through it just cuts off with no errors to my import script. I've changed my max_allowed_packet to 20M as well as my net_buffer_length to 8M in my my.cnf file. Seems like no matter what I set these two values to, nothing helps. My Column is set to LONGTEXT, but I cannot seem to find anywhere that would set the size of the Longtext, and, according to the MySQL documentation -- it seems as if the size of this column is dependant upon your max allowed packet and buffer size? Maximum size of data that you can store in the column depends on column type, size of the data that you can send from client to server depends on max_allowed_packet value. In the 3.23.xx version maximum size of max_allowed_packet is 16M. -- 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Can't find file: './mysql/host.frm' (errno: 13)
Pushpinder Singh Garcha [EMAIL PROTECTED] wrote: I am installing MySQL on my Mac OS Jaguar system. I was having some trouble with the starting up my MySQL Server. I kpt getting mysqld ended error and my logs showed that file user.MYI was corrupted. So I decided to uninstall MySQl and re-install it. I installed MySQL (mysql-standard-4.0.13-apple-darwin6.4-powerpc) ... but now I get this error in the log file and I am unable to still start the MySQL Server. -- -- 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Foreign Key Concept
MaFai [EMAIL PROTECTED] wrote: After I create this table,and add foreign key tno to this table. If I delete tno in p_program_type table,it would alarm that some data still in p_schedule. How can I define the p_schedule or p_program_type table to make sure that while delete the tno in p_program_type,the p_schedule table would delete the data matching p_schedule table. create table p_schedule( sche_no int not null auto_increment, cno int not null, prog_no int not null, start_time datetime, end_timedatetime, index p_schedule_idx01 (cno), foreign key (cno) references p_channel (cno), index p_schedule_idx02 (prog_no), primary key(sche_no), foreign key (prog_no) references p_program( prog_no ), foreign key (tno) references p_program_type(tno) ) TYPE=INNODB; Take a look at ON DELETE clause: http://www.mysql.com/doc/en/InnoDB_foreign_key_constraints.html -- 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Transaction support
Palaparthy [EMAIL PROTECTED] wrote: Does MYSQL support transaction concept, which includes issues like commiting data , rollbacking etc??? Yes. http://www.mysql.com/doc/en/ANSI_diff_Transactions.html -- 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: update to 4.0 mySQL question
Susan Ator [EMAIL PROTECTED] wrote: I have updated mySQL to the 4.0.13-standard and had no problems UNTIL I attempted to run mysql_fix_privileges. This is the error I get: ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) /tmp is: drwxrwxrwt6 root root 4096 Jun 23 11:21 tmp and mysql.sock is ACTUALLY located in /var/lib/mysql. Where do I need to look to change the location from /tmp to /var/lib/mysql for this particular file? Use --socket option of mysqld: http://www.mysql.com/doc/en/Command-line_options.html -- 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysql.sock doesn't exist
I apologize for posting about something which has probably been covered before but I can't remember where I have seen this dealt with. I have been trying to upgrade/install/re-install MySQL 4.0.13 and when I try to do any administrative work (set root password, for example) I get this message: error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! I have run searches for the mysql.sock file and it isn't showing up on my system (RedHat 9.0 fully updated). I had rebuilt 4.0.13 from the source rpm. I thought I remembered that the mysql.sock file was created when the daemon was first run but can't remember where I saw that. Thanks for any help. You may e-mail me directly if you wish. Kevin Phillips -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: mysql.sock doesn't exist
Is the mysql server currently running? You can also use either -S or --socket to specify the socket connection. -Original Message- From: Kevin H. Phillips [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 8:10 AM To: [EMAIL PROTECTED] Subject: mysql.sock doesn't exist I apologize for posting about something which has probably been covered before but I can't remember where I have seen this dealt with. I have been trying to upgrade/install/re-install MySQL 4.0.13 and when I try to do any administrative work (set root password, for example) I get this message: error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! I have run searches for the mysql.sock file and it isn't showing up on my system (RedHat 9.0 fully updated). I had rebuilt 4.0.13 from the source rpm. I thought I remembered that the mysql.sock file was created when the daemon was first run but can't remember where I saw that. Thanks for any help. You may e-mail me directly if you wish. Kevin Phillips -- 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: mysql.sock doesn't exist
Yes, the server is running. One odd thing about my setup is that when I restart the service I get a Failed signal for the shutdown phase but an OK for the start phase. Thanks, Kevin Victor Pendleton wrote: Is the mysql server currently running? You can also use either -S or --socket to specify the socket connection. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: mysql.sock doesn't exist
From the mysql monitor `show variables` to see what socket the server is connecting on. -Original Message- From: Kevin H. Phillips [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 8:33 AM Cc: [EMAIL PROTECTED] Subject: Re: mysql.sock doesn't exist Yes, the server is running. One odd thing about my setup is that when I restart the service I get a Failed signal for the shutdown phase but an OK for the start phase. Thanks, Kevin Victor Pendleton wrote: Is the mysql server currently running? You can also use either -S or --socket to specify the socket connection. -- 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: Getting the unique auto-increment primary key after an insert
last_insert_id() returns the last auto-increment your connection. Another connection might make an insert and the auto-increment may change between the time you insert and get your last_insert_id(); Curtis On Tue, 24 Jun 2003, Matt Hyne wrote: Thanks, I found it but I wasn't sure if it could be changed between my INSERT and the SELECT LAST..() by another instance of my application. I'll suck-it-and-see ! Matt [EMAIL PROTECTED] wrote: The good ol' LAST_INSERT_ID() function is what you probably need. Check it out in manual. Lian -Original Message- From: Matt Hyne [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 5:58 AM To: [EMAIL PROTECTED] Subject: Getting the unique auto-increment primary key after an insert Hi Folks, needs a little advice. I have a table that contains a unique auto-incrementing primary key called 'id' (eg 1,2,3,4...). When inserting data, I let mySQL allocate the value that goes into this field. Now I want to insert a new row into this table and get the 'id' value that mySQL has allocated (so I can then do some more work such as attaching a filename called 'id'.xxx). Can someone suggest a good way to do this ? I thought of maybe doing a SELECT MAX(id) FROM table first and then using id+1 as the new 'id' for the next entry but this is frought with danger as someone could come along and insert a new entry between my SELECT and INSERT. Because 'id' is the only guaranteed unique column, I cannot think of a way to do a SELECT after an INSERT to get back the 'id' of the last thing inserted. Can anyone help ? Matt -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- -- Curtis Maurand mailto:[EMAIL PROTECTED] http://www.maurand.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
how to do multipul Joins
Hello all I am having trouble with joining tables i will explain. I have four tables Cat - CatFile - File - User. thay are related in the order. I need to join them around the file table. i tryed 'SELECT cat.name, catfile.catid, file.fileid, user.name FROM cat RIGHT JOIN catfile ON catfile.catid=cat.catid RIGHT JOIN file ON file.fileid=catfile.fileid LEFT JOIN user ON file.userid=user.userid' i get a list as long as my arm most of which are not what i am trying to get -- eschew obfuscation. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld question
Linux shows threads. BSD shows processes. The difference is in the way ps runs, not mysqld. Henrik Leghissa wrote: On my server running linux several daemons opens when I run msqld -u mysql or safe_mysqld. A listing of the process shows this: mysql24475 0.5 2.1 83292 2012 ?S15:46 0:03 mysqld -u mysql mysql24476 0.0 2.1 83292 2012 ?S15:46 0:00 mysqld -u mysql mysql24477 0.0 2.1 83292 2012 ?S15:46 0:00 mysqld -u mysql mysql24478 0.0 2.1 83292 2012 ?S15:46 0:00 mysqld -u mysql mysql24479 0.0 2.1 83292 2012 ?S15:46 0:00 mysqld -u mysql mysql24480 0.0 2.1 83292 2012 ?S15:46 0:00 mysqld -u mysql mysql24481 0.0 2.1 83292 2012 ?S15:47 0:00 mysqld -u mysql mysql24482 0.0 2.1 83292 2012 ?S15:47 0:00 mysqld -u mysql mysql24483 0.0 2.1 83292 2012 ?S15:47 0:00 mysqld -u mysql mysql24484 0.0 2.1 83292 2012 ?S15:47 0:00 mysqld -u mysql A friend has a mysqld running on his *bsd-server with this single daemon listed when listing the processes: mysql5602 0.0 1.2 44592 4968 q4 S15Jun03 29:30.21 /usr/local/libexec/mysqld -u mysql Can you please point out wgat I should do to make something similar? (I suspect that these multiple daemons slow down the performance on the server I run) Thank you. / H -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql.sock doesn't exist
Kevin H. Phillips wrote: Yes, the server is running. One odd thing about my setup is that when I restart the service I get a Failed signal for the shutdown phase but an OK for the start phase. Thanks, Kevin Victor Pendleton wrote: Is the mysql server currently running? You can also use either -S or --socket to specify the socket connection. If you get a failed when the script is stopping the server, it's more than likely that the server is dying right after it's started. When you think it's running do a ps -ax | grep mysqld If that doesn't return anything (or it only returns the grep), then the server isn't running. Check your logs to see why it's dying. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld question
At 16:21 2003-06-24, gerald_clark wrote: Linux shows threads. BSD shows processes. The difference is in the way ps runs, not mysqld. *doh* I guess the sun got to me, sorry mate! :-) But do you have any good ways to get the database to run any faster? I am running it on a really beat up piece of junk (p200 with 98MB in ram, don't tell me to get new hardware - 'cause I will! hehe) and would like some hands on settings in the cnf-file from you if possible. / H -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: mysqld question
it really depends on how big your database is what else is running on the server (apache..) how many connections at once percentage of selects to updates/inserts do you have indexes what version are you running what is your mom's maiden name if you look at the sun, how long to you blink :-) Id start w/ making sure you have indexes. They help abunch. -Original Message- From: Henrik Leghissa [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 9:26 AM To: [EMAIL PROTECTED] Subject: Re: mysqld question At 16:21 2003-06-24, gerald_clark wrote: Linux shows threads. BSD shows processes. The difference is in the way ps runs, not mysqld. *doh* I guess the sun got to me, sorry mate! :-) But do you have any good ways to get the database to run any faster? I am running it on a really beat up piece of junk (p200 with 98MB in ram, don't tell me to get new hardware - 'cause I will! hehe) and would like some hands on settings in the cnf-file from you if possible. / H -- 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: mysqld question
Not a silly question... we all had to start somewhere... you can do it during the create table ( primary key ) http://www.mysql.com/doc/en/CREATE_TABLE.html or after http://www.mysql.com/doc/en/CREATE_INDEX.html what indexes do... lets say you do ALOT of queries on column user_id in the table user... select * from user where user_id = x or you sort,join,match on user_id alot. Then indexes will use a little more memory and it will make those queries a little (sometimes ALOT) faster. However, if you are inserting new rows ALOT vs selects... then indexes might actually slow you down a little because the database has to write to the table and then write to the index on each insert... So you dont want to add indexes on EVERY column... just the ones that you select or sory on most of the time. Good Luck Also check this out for a little help http://www.mysql.com/doc/en/Tips.html -Original Message- From: Henrik Leghissa [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 9:42 AM To: Christopher Knight Subject: RE: mysqld question At 16:39 2003-06-24, Christopher Knight wrote: it really depends on how big your database is what else is running on the server (apache..) Well, it has some free capacity, both cpu and memory-wise. what version are you running 4.x what is your mom's maiden name if you look at the sun, how long to you blink :-) haha Id start w/ making sure you have indexes. They help abunch. Pardon my stupid question, but where do I set these? (and the syntax etc) Thanks. / H -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: mysqld question
At 16:52 2003-06-24, Christopher Knight wrote: Not a silly question... we all had to start somewhere... you can do it during the create table ( primary key ) http://www.mysql.com/doc/en/CREATE_TABLE.html snip Thanks for the explanation, I'm no sql-guru at all, so all info is welcome! :-) I'm running some forum and I think this did this by default when it installed itself... not sure though... Well, thanks for the info anyways! :-) / H -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld question
Sometime recently Henrik Leghissa said: At 16:21 2003-06-24, gerald_clark wrote: Linux shows threads. BSD shows processes. The difference is in the way ps runs, not mysqld. *doh* I guess the sun got to me, sorry mate! :-) But do you have any good ways to get the database to run any faster? I am running it on a really beat up piece of junk (p200 with 98MB in ram, don't tell me to get new hardware - 'cause I will! hehe) and would like some hands on settings in the cnf-file from you if possible. Well, in the Managing MySQL course run by MySQL AB; they taught us that upgrading hardware is the *last* thing you do to get the database to run faster, not the first. Before you buy new hardware you should: -Optimize your queries -Make sure you're using the right Indices -Use MyISAM table locking if appropriate -Look at your logical database structure -Look at your physical database structure -Set your MySQL server memory parameters appropriately -Optimize your OS for MySQL Info on all of these is available at: http://www.mysql.com/doc/en/MySQL_Optimisation.html When you've got some more specific questions, we'll be happy to help :) Jan -- Janice Wright Ingenta plc [EMAIL PROTECTED] Tel: +44 (0) 01865 799114 http://www.ingentaselect.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Browsing Tables
Hi, New, brand new to MySQL: are there software or apps to browse the TABLES? and if possible, add/edit/delete rows?? Thanks __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqldump 8.22 and inifinite double values: Bug?
Hi All, I use MySQL 3.23.53 and mysqldump 8.22 and there is a behaviour in mysqldump I consider a bug. Anyone agrees? % mysql test mysql create table doubletest (d double not null); mysql insert into doubletest values(inf); mysql insert into doubletest values(-inf); mysql exit % mysqldump test doubletest d1.sql % mysql test mysql drop table doubletest mysql source d1.sql ERROR 1048: Column 'd' cannot be null ERROR 1054: Unknown column 'inf' in 'field list' mysql exit % cat felix.sql CREATE TABLE doubletest ( d double NOT NULL default '0' ) TYPE=MyISAM; INSERT INTO doubletest VALUES (NULL); INSERT INTO doubletest VALUES (-inf); The problem seems to be as follows: Apparently, mysqldump checks the value of the fields using isalpha. If isalpha returns true, the value is mapped to NULL (which is problematic if the column is defined NOT NULL). In the instance of -inf, isalpha returns false so mysqldump believes -inf to be a really numeric value and will dump the value unquoted. Questions: Is there a good workaround? I have found no option of mysqldump to force quoting on values of all colunm types. What possible values can be stored in a column of type double that are not merely numeric? Thanks, Thomas -- SIGOS Systemintegration GmbH - TESTING IS OUR COMPETENCE - Fon +49 911 95168-0 www.sigos.de -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Browsing Tables
Hi there, you can download this or download phpMyAdmin http://www.mysql.com/downloads/mysqlcc.html - Original Message - From: Deosaran Bisnath [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 12:01 PM Subject: Browsing Tables Hi, New, brand new to MySQL: are there software or apps to browse the TABLES? and if possible, add/edit/delete rows?? Thanks __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- 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: Delete orphan records
Jake, Since I am running MySQL 3.23.5x, I cannot do subselects. I am able to do the following: SELECT * FROM Items_Pictures LEFT JOIN Items ON Items_Pictures.Items_ID = Items.Items_ID WHERE Items.Items_ID IS NULL; *BUT*, if I try to do a DELETE instead DELETE FROM Items_Pictures LEFT JOIN Items ON Items_Pictures.Items_ID = Items.Items_ID WHERE Items.Items_ID IS NULL; I get: ERROR 1064: You have an error in your SQL syntax near 'LEFT JOIN Items ON Items_Pictures.Items_ID = Items.Items_ID WHERE Items.Items_ID' I have a couple of databases I need to clean up this way manually. Any help appreciated.. On Wed, Jun 18, 2003 at 10:10:57PM -0700, Jake Johnson wrote: Hello Greg, You are much better off using a not exists clause... delete from child c where not exists ( select 1 from parent p where p.id = c.id) Regards, Jake Johnson [EMAIL PROTECTED] -- Plutoid - http://www.plutoid.com Shop Plutoid for the best prices on Rims and Car Audio Products On Wed, 18 Jun 2003, Greg Klaus wrote: I am trying to delete some orphaned records in an old database on a website that I've recently taken over. Although the website is php driven, I am doing this manually in a mysql client. Mysql 3.23.54 Tables: Items: Items_ID Pictures: Picture_ID Items_ID I want to get rid of any entries in Pictures that are orphaned (No Items_ID in Items) Here is the query I'm trying to do, which I thought was correct, according to my surfing around google. DELETE FROM Pictures WHERE Picture_ID IN ( SELECT Pictures.Picture_ID FROM Pictures LEFT JOIN Items using (Items_ID) WHERE Items_ID IS NULL ) I also may have to do this in a 3 table scheme as well where the Cat_ID is gone and there are orphaned Items, which in turn means orphaned Pictures. Cats: Cat_ID Items: Items_ID Cat_ID Pictures: Picture_ID Items_ID Any help would be appreciated. Am I left to create a php script to do the cleaning for me or delete items individually? -- Greg Nec Mors, Nec Requies. Carpe Noctum! -- 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] -- Greg Klaus-[EMAIL PROTECTED] - TIMEatics web: http://www.timeatics.com voice: 785.456.7600 fax: 785.456.7601 aim: TIME Greg Klaus -=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=- Nec Mors, Nec Requies. Carpe Noctum! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Browsing Tables
If you're using Windows, you can use an application like urSQL (http://www.urbanresearch.com/ursql) for easy viewing, adding, editing, deleting, etc, or any of a number of available graphical clients... You may also want to have a look around http://www.mysql.com and the list archives for several clients that do what you describe. On Tue, 24 Jun 2003, Deosaran Bisnath wrote: Hi, New, brand new to MySQL: are there software or apps to browse the TABLES? and if possible, add/edit/delete rows?? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Simple Question: MySQL and Shell Scripts
On 24-Jun-2003 Fred Whipple wrote: snip Don't forget to use '-B' in order to make the output silent except for the results: and -N to suppress column names. snipagain 2. you should stick your password (which shouldn't match your UNIX password) in a textfile readable only by you so that you don't pass the password on the command line. ~/.my.cnf Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Delete orphan records
Nevermind... Just read an interesting comment in the MySQL online docs. http://www.mysql.com/doc/en/ANSI_diff_Sub-selects.html First user comment pointed me in the right direction. Thanks for your help though. Much appreciated! (Especially when I upgrade to 4.x) -- Greg On Tue, Jun 24, 2003 at 11:50:01AM -0500, Greg Klaus wrote: Jake, Since I am running MySQL 3.23.5x, I cannot do subselects. I am able to do the following: SELECT * FROM Items_Pictures LEFT JOIN Items ON Items_Pictures.Items_ID = Items.Items_ID WHERE Items.Items_ID IS NULL; *BUT*, if I try to do a DELETE instead DELETE FROM Items_Pictures LEFT JOIN Items ON Items_Pictures.Items_ID = Items.Items_ID WHERE Items.Items_ID IS NULL; I get: ERROR 1064: You have an error in your SQL syntax near 'LEFT JOIN Items ON Items_Pictures.Items_ID = Items.Items_ID WHERE Items.Items_ID' I have a couple of databases I need to clean up this way manually. Any help appreciated.. On Wed, Jun 18, 2003 at 10:10:57PM -0700, Jake Johnson wrote: Hello Greg, You are much better off using a not exists clause... delete from child c where not exists ( select 1 from parent p where p.id = c.id) Regards, Jake Johnson [EMAIL PROTECTED] -- Plutoid - http://www.plutoid.com Shop Plutoid for the best prices on Rims and Car Audio Products On Wed, 18 Jun 2003, Greg Klaus wrote: I am trying to delete some orphaned records in an old database on a website that I've recently taken over. Although the website is php driven, I am doing this manually in a mysql client. Mysql 3.23.54 Tables: Items: Items_ID Pictures: Picture_ID Items_ID I want to get rid of any entries in Pictures that are orphaned (No Items_ID in Items) Here is the query I'm trying to do, which I thought was correct, according to my surfing around google. DELETE FROM Pictures WHERE Picture_ID IN ( SELECT Pictures.Picture_ID FROM Pictures LEFT JOIN Items using (Items_ID) WHERE Items_ID IS NULL ) I also may have to do this in a 3 table scheme as well where the Cat_ID is gone and there are orphaned Items, which in turn means orphaned Pictures. Cats: Cat_ID Items: Items_ID Cat_ID Pictures: Picture_ID Items_ID Any help would be appreciated. Am I left to create a php script to do the cleaning for me or delete items individually? -- Greg Nec Mors, Nec Requies. Carpe Noctum! -- 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] -- Greg Klaus-[EMAIL PROTECTED] - TIMEatics web: http://www.timeatics.com voice: 785.456.7600 fax: 785.456.7601 aim: TIME Greg Klaus -=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=- Nec Mors, Nec Requies. Carpe Noctum! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- Greg Klaus-[EMAIL PROTECTED] - TIMEatics web: http://www.timeatics.com voice: 785.456.7600 fax: 785.456.7601 aim: TIME Greg Klaus -=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=- Nec Mors, Nec Requies. Carpe Noctum! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
[MYSQL] Question about 'SHOW PROCESSLIST' output columns
Hello All, I'm having an intermittent problem with a MySQL server that I have running on a Windows 2000 Advance server systems. This issue occurs every few days depending on the load of the system. Here are the details. MySQL version 3.23.42-nt (I know I need to upgrade. Soon). Machine: Windows 2000 Advanced Server 2G memory 36G disk space. I have a Web page that allows my operators to monitor various process tasks on this server. Sometimes they receive an error that PHP cannot connect to MySQL. If this happens during the day they call me. I log into the server and bring up the WinMySQLadmin 3.1 client and click on the 'Process' tab. There are a few (maybe 250 attached processes). I know there are many machines connecting to this database to feed updates from enterprise applications. So I bumped up the 'max_connections' limit to 1000. This just seems to delay the limit and the phone call. My question is in looking at the output form the 'Process' tab I see the columns 'Command' and 'Time'. In all of the rows for 'Command' the value is 90% 'Sleep'. This would tell me I have some processes out there that are not dis-connecting (right?). In the 'Time' column is see numbers ranging from 150 to 1000+. I'm guessing this is the time the connection is idle (correct?). What I would like to do is define my parameters so that these dead processes will be disconnected by MySQL after a shorter time but not sure which variable to change. Advice? Paul
Anyone had a chance to try an Opteron yet?
I'm surprised there is not more interest in this; is it that not many work with large-ish (10+ gig) databases that need high-end performance? A 64-bit CPU won't have the 4-gig memory limit that a 32-bit processor will; even worse, Linux is apparently limited to about a 2-gig process. SuSe Enterprise Linux supports 512-gigabyte processes with 16 processors. Imagine 10 gigabyte database all in memory. Even better, larger file sizes - no more 2-gig files. Max file size is 9-Exabytes ( 9 followed by 18 0's ). All the posts I see about people trying to get around the 2 gig file limit should be really excitied. I guess I'm just surprised by lack of interest. I've been bugging our CTO once a week about this, and hopefully should have a server on my desk by mid summer to late fall. If you're interested, SuSe has a good PDF on AMD64 and SuSe Enterprise Linux 1.0: http://www.suse.com/en/business/products/server/sles/misc/sles8_amd64.pdf Anyone have some practical experience with the software and hardware? David. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysql 4.1 authentication problems
Just installed mysql 4.1. The same perl/DBIscripts which worked fine on 4.0 now failing toconnect with the following error: DBI connect('host=localhost;database=webdb','webdev',...) failed: Client does not support authentication protocol requested by server. Consider upgrading MySQL client at ./intro7.pl line 7 Any ideas, anyone? Thank you. Eugene -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Freeing memory
Other than mysql_free_result() how can I free up memory upon the completion of a query? TIA! jay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: mysql.sock doesn't exist
check that the permissions in the data directory are correct. If mysqld does not have write perms in that directory, it will not start. ls -l /var/lib/mysql mysql_install_db used to set the permissions to the user that ran the script (usually root). -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 9:26 AM To: Kevin H. Phillips Cc: [EMAIL PROTECTED] Subject: Re: mysql.sock doesn't exist Kevin H. Phillips wrote: Yes, the server is running. One odd thing about my setup is that when I restart the service I get a Failed signal for the shutdown phase but an OK for the start phase. Thanks, Kevin Victor Pendleton wrote: Is the mysql server currently running? You can also use either -S or --socket to specify the socket connection. If you get a failed when the script is stopping the server, it's more than likely that the server is dying right after it's started. When you think it's running do a ps -ax | grep mysqld If that doesn't return anything (or it only returns the grep), then the server isn't running. Check your logs to see why it's dying. -- 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: mysql.sock doesn't exist
The output of the grep is: [EMAIL PROTECTED] root]# ps -ax | grep mysqld 4578 ?S 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf 4601 ?S 0:01 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mail.9-5usa.org.pid --skip-locking 10785 pts/0S 0:00 grep mysqld The /var/log/boot.log files shows this for the last few entries: un 24 13:27:15 mail mysqld: Stopping MySQL: failed Jun 24 13:27:15 mail mysqld: Starting MySQL: succeeded Jun 24 13:31:30 mail mysqld: Stopping MySQL: failed Jun 24 13:31:30 mail mysqld: Starting MySQL: succeeded The /var/log/mysqld.log files shows this (it hasn't registered anything since yesterday so maybe it isn't logging???): 030623 11:16:53 mysqld ended 030623 11:17:06 mysqld started 030623 11:17:06 Can't start server: Bind on TCP/IP port: Address already in use 030623 11:17:06 Do you already have another mysqld server running on port: 3306 ? 030623 11:17:06 Aborting 030623 11:17:06 /usr/libexec/mysqld: Shutdown Complete 030623 11:17:06 mysqld ended It seems I'm locked out of doing anything at all with it. Kevin John Nichel wrote: If you get a failed when the script is stopping the server, it's more than likely that the server is dying right after it's started. When you think it's running do a ps -ax | grep mysqld If that doesn't return anything (or it only returns the grep), then the server isn't running. Check your logs to see why it's dying. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysql 4.1 client authentication
Does anyone know what is different in mysql 4.1 client authentication from mysql 4.0? After upgrading to 4.1 my scripts can no longer connect and produce the following message: Client does not support authentication protocol requested by server. Consider upgrading MySQL client -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: mysql.sock doesn't exist
Stop the process you currently have or start up the server on a port other than 3306. -Original Message- From: Kevin H. Phillips [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 1:46 PM Cc: [EMAIL PROTECTED] Subject: Re: mysql.sock doesn't exist The output of the grep is: [EMAIL PROTECTED] root]# ps -ax | grep mysqld 4578 ?S 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf 4601 ?S 0:01 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mail.9-5usa.org.pid --skip-locking 10785 pts/0S 0:00 grep mysqld The /var/log/boot.log files shows this for the last few entries: un 24 13:27:15 mail mysqld: Stopping MySQL: failed Jun 24 13:27:15 mail mysqld: Starting MySQL: succeeded Jun 24 13:31:30 mail mysqld: Stopping MySQL: failed Jun 24 13:31:30 mail mysqld: Starting MySQL: succeeded The /var/log/mysqld.log files shows this (it hasn't registered anything since yesterday so maybe it isn't logging???): 030623 11:16:53 mysqld ended 030623 11:17:06 mysqld started 030623 11:17:06 Can't start server: Bind on TCP/IP port: Address already in use 030623 11:17:06 Do you already have another mysqld server running on port: 3306 ? 030623 11:17:06 Aborting 030623 11:17:06 /usr/libexec/mysqld: Shutdown Complete 030623 11:17:06 mysqld ended It seems I'm locked out of doing anything at all with it. Kevin John Nichel wrote: If you get a failed when the script is stopping the server, it's more than likely that the server is dying right after it's started. When you think it's running do a ps -ax | grep mysqld If that doesn't return anything (or it only returns the grep), then the server isn't running. Check your logs to see why it's dying. -- 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: Anyone had a chance to try an Opteron yet?
In the last episode (Jun 24), David Griffiths said: I'm surprised there is not more interest in this; is it that not many work with large-ish (10+ gig) databases that need high-end performance? I think we have a mysql database running on Tru64, and I'm sure it runs great on Solaris. My guess is the people that needed over 2gb of RAM have switched to 64-bit CPUs long ago. -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Anyone had a chance to try an Opteron yet?
Excellent point. How does MySQL run on Tru64? Any familiarity with it on Intel32? But there are some big drawbacks to these platforms: - they only run apps that have been specifically ported and compiled for them. The Opteron runs the same 32-bit code that an Athalon or Pentium class computer will run. Ports aren't always available, and they can lag behind w/regards to the versions available. Ports can be buggier as well. - Those systems are expensive. Opteron hardware is relatively cheap ($1000 for a motherboard and two processors), and much of the hardware is generic (no super-expensive RAM from Sun). Because the hardware is generic, you have more options at a lower price point. I'm not sure how a 32-bit IDE RAID driver would do in a 64-bit version of Linux. If a 64-bit driver is needed, then there might be some issues. - This is new hardware. People who work with computers like new toys. They like to set them up, test them, and then tell everyone what they thought. Anyway, hopefully someone will have some insight. David - Original Message - From: Dan Nelson [EMAIL PROTECTED] To: David Griffiths [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 12:09 PM Subject: Re: Anyone had a chance to try an Opteron yet? In the last episode (Jun 24), David Griffiths said: I'm surprised there is not more interest in this; is it that not many work with large-ish (10+ gig) databases that need high-end performance? I think we have a mysql database running on Tru64, and I'm sure it runs great on Solaris. My guess is the people that needed over 2gb of RAM have switched to 64-bit CPUs long ago. -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Anyone had a chance to try an Opteron yet?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David Griffiths wrote: I'm surprised there is not more interest in this; is it that not many work with large-ish (10+ gig) databases that need high-end performance? A 64-bit CPU won't have the 4-gig memory limit that a 32-bit processor will; even worse, Linux is apparently limited to about a 2-gig process. SuSe Enterprise Linux supports 512-gigabyte processes with 16 processors. Imagine 10 gigabyte database all in memory. Even better, larger file sizes - no more 2-gig files. Max file size is 9-Exabytes ( 9 followed by 18 0's ). All the posts I see about people trying to get around the 2 gig file limit should be really excitied. I guess I'm just surprised by lack of interest. I've been bugging our CTO once a week about this, and hopefully should have a server on my desk by mid summer to late fall. [snip] I suppose this might be stating the obvious, but you did see our Opteron binary for Linux at http://www.mysql.com/downloads/mysql-4.0.html (listed as AMD 64), didn't you? :) -Mark - -- For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, SW Dev. Manager - J2EE/Windows /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE++Ke/tvXNTca6JD8RAgKKAKCZywbtpcoIWdJ/QKtLO8m5nSdHKQCff9VK +LWVgvixsO3uHuLJdAjdZI8= =rP3f -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
InnoDB foreign keys
Hello, Is it possible to create a foreign key that referencestwo columns, if the referenced table uses more two colums for it's primary key? If possible, what is the syntax? Mikael Engdahl -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Anyone had a chance to try an Opteron yet?
Not necessarily. People that need relatively affordable 64 bit systems may be waiting for the Opteron to stabilize. My experience is the Wintel solutions (like Opteron) tend to have at least a 2-1 price performance over Sun and Dec. Also, given that HP has basically dropped Alpha, I don't think a lot of people are likely to be implementing that platform. Dan Nelson wrote: In the last episode (Jun 24), David Griffiths said: I'm surprised there is not more interest in this; is it that not many work with large-ish (10+ gig) databases that need high-end performance? I think we have a mysql database running on Tru64, and I'm sure it runs great on Solaris. My guess is the people that needed over 2gb of RAM have switched to 64-bit CPUs long ago. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Bug in last CVS
try to bk pull the mysql 4.0 from CVS tree... after I run: aclocal; autoheader; autoconf; automake inside dir... the error is: autoconf: Undefined macros: configure.in:8:AC_CONFIG_HEADERS(config.h) configure.in: 8: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER' - ++ Dyego Souza do Carmo ++ Dep. Desenvolvimento - E S C R I B A I N F O R M A T I C A - The only stupid question is the unasked one (somewhere in Linux's HowTo) Linux registred user : #230601 --ICQ : 1647350 $ look into my eyes Phone : +55 041 296-2311 look: cannot open my eyes Fax : +55 041 296-6640 - Reply: [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Anyone had a chance to try an Opteron yet?
64 bit servers have different performance characteristics and tend to be used for different things. than PC systems. They are generally backplanes to which are attached some number of processors and some amount of memory, and a lot of IO. They aren't used as much for processor speed (you could get a bunch of PCs to do that) as they are for doing a lot of IO. Even a small server like the old Sun e450's (4 processors) had something like 6 or 8 PCI busses on them. Larger systems could be configured with a large number of IO cards for those computers that just need a few gigabit per second of network IO and a ton of disk space (multiple disk controllers, or FC controllers all going full speed). You would use the memory to store temp information as a query would run and you rely on the systems fast access to the disks to scan through the tables. You would generally attach anywhere from a few hundred gigs of disk (spread out over many smaller disks) up to many terabytes (it's been a while since I've done large system admin work, so I have no idea what the largest systems are doing, but imagine 72 cabinets full of 72 GB or larger disks). This way instead of getting speed from caching the data you get speed by reading the data off the disks quickly. 64 bit workstations had an advantage over PC systems most of the time in that the memory bus was not the bottleneck it can be on the PC avoiding delays due to cache misses, which made them great for visualization workstations where the system had to scan through a lot of memory quickly to generate an image or process scientific data. There's a lot of other things going back to the fact that Digital, HP Sun and IBM have always had a head start on superscalar and multi-core CPU designs, so comparing Mz was never even close between two processors. On the other hand many people never saw that advantage because they would compile with gcc which was never the best choice for pure speed on a given processor. If you need a 64 bit processor for memory and file size concerns and can sacrifice some of the processing speed (which often goes away because of the faster IO) there's always been a good used market, in particular for Sun equipment. I've seen some dirt cheap prices on fully loaded Sun E450 systems which are very nice for their size. I think they hold 20 disks internally and there's PCI slots for a lot more if you need large files. On the other hand I think need 64 bit and affordable are rare situations. -- Michael Conlen Mike Wexler wrote: Not necessarily. People that need relatively affordable 64 bit systems may be waiting for the Opteron to stabilize. My experience is the Wintel solutions (like Opteron) tend to have at least a 2-1 price performance over Sun and Dec. Also, given that HP has basically dropped Alpha, I don't think a lot of people are likely to be implementing that platform. Dan Nelson wrote: In the last episode (Jun 24), David Griffiths said: I'm surprised there is not more interest in this; is it that not many work with large-ish (10+ gig) databases that need high-end performance? I think we have a mysql database running on Tru64, and I'm sure it runs great on Solaris. My guess is the people that needed over 2gb of RAM have switched to 64-bit CPUs long ago. The best in online adult entertainment http://www.tarrob.com/ads.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql.sock doesn't exist
Kevin H. Phillips wrote: The output of the grep is: [EMAIL PROTECTED] root]# ps -ax | grep mysqld 4578 ?S 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf 4601 ?S 0:01 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mail.9-5usa.org.pid --skip-locking 10785 pts/0S 0:00 grep mysqld The /var/log/boot.log files shows this for the last few entries: un 24 13:27:15 mail mysqld: Stopping MySQL: failed Jun 24 13:27:15 mail mysqld: Starting MySQL: succeeded Jun 24 13:31:30 mail mysqld: Stopping MySQL: failed Jun 24 13:31:30 mail mysqld: Starting MySQL: succeeded The /var/log/mysqld.log files shows this (it hasn't registered anything since yesterday so maybe it isn't logging???): 030623 11:16:53 mysqld ended 030623 11:17:06 mysqld started 030623 11:17:06 Can't start server: Bind on TCP/IP port: Address already in use 030623 11:17:06 Do you already have another mysqld server running on port: 3306 ? 030623 11:17:06 Aborting 030623 11:17:06 /usr/libexec/mysqld: Shutdown Complete 030623 11:17:06 mysqld ended It seems I'm locked out of doing anything at all with it. Kevin Are you trying to stop the server as root, or some other user? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Anyone had a chance to try an Opteron yet?
not exactly relevant to this discussion but... Apple did just release the new G5, 64bit PowerMacs. Could be another alternative for the inexpensive 64bit market. Granted, they don't ship until august, but they are nice to look at: http://www.apple.com/powermac/ from their site: The Power Mac G5 is the worlds fastest personal computer and the first with a 64-bit processor which means it breaks the 4 gigabyte barrier and can use up to 8 gigabytes of main memory. The new G5 processor available at speeds up to dual 2GHz with a new ultrahigh-bandwidth system architecture featuring AGP 8X and PCI-X makes the Power Mac G5 a breakthrough in desktop processing power. And models start at just $1999. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySqL running very slow on HP 900-UX 11 - 32 bit
Hi all, I am trying to create tables and insert data into MySql Version 3.23.53-Max database on HP 900-UX 11 - 32 bit server. For some reason a job , which is suppose to take 45 mins, is not completing even after 2 days. It means all jobs against mysql are running very slow on HP 900-UX 11 - 32 bit server. I did check file system, system load and other system related things, they are fine. I wonder anything to do with MySql installation of 32-bit v/s 64-bits. MySql is installed on /data drive and all mysql database files, log files and dump files are on same drive i.e I am having everything /data drive as we have only one external drive on this server If anyone of you think of anything on this, please let me know. Thanks, shanth
Replication Performance
Hello 1/ I have a search engine which crawls auction sites and returns information which is inserted into a mysql database. This activity represents on average about 3 inserts per second with a combined payload of 450 bytes per second added to the database. This updating occurs continuously throughout the day. Since this activity puts a burden on the machine on which it occurs (not only the mysqld inserts but also the scripts and http client activity), I am planning to dedicate one box to the crawling/inserting and replicate the data to one (or possibly more) other servers. These slave servers will handle all client requests (almost exclusively reads). The mysql documentation states: You should set up one server as the master, and direct all writes to it, and configure as many slaves as you have the money and rackspace for, distributing the reads among the master and the slaves. My questions are: Since the updating occurs throughout the day and the same amount of data has to be eventually inserted into the slaves I assume the updating will require the same amount of resources (disk, cpu usage) on the slaves as on the master - the same number of writes will occur on the slaves. So the the benefit of this configuration (in terms of performance) is that it is the extra processing required to do the crawling will be offloaded to the one master server, not the resources required for the mysql writes. I assume inserts done thru replication are not more efficient than regular inserts. What is the performance hit of replication and is there a way to limit the effect of the writes on the slave servers, thru configuration parameters, for example, or would it even make sense to take the slave offline at regular intervals while replication is taking place? 2/ Is there any documentation on handling and configuring large tables? Hope this is not too confusing... Many thanks Todd Burke phbnyc.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql 4.1 authentication problems
Funny. I was just readin about this on the www.mysql.com web site. Under the documentation section about upgrading form 3.23 to 4.0. The exact URL is http://www.mysql.com/doc/en/Upgrading-from-3.23.html Ensure that you don't have any MySQL clients that use shared libraries (like the Perl DBD-mysql mode). If you do, you should recompile them, because the data structures used in `libmysqlclient.so' have changed. The same applies to other MySQL interfaces as well, such as the Python MySQLdb module. MySQL 4.0 will work even if you don't do the above, but you will not be able to use the new security privileges that MySQL 4.0 and you may run into problems when upgrading later to MySQL 4.1 or newer [EMAIL PROTECTED] wrote: Just installed mysql 4.1. The same perl/DBIscripts which worked fine on 4.0 now failing toconnect with the following error: DBI connect('host=localhost;database=webdb','webdev',...) failed: Client does not support authentication protocol requested by server. Consider upgrading MySQL client at ./intro7.pl line 7 Any ideas, anyone? Thank you. Eugene -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
Re: Anyone had a chance to try an Opteron yet?
On Tue, Jun 24, 2003 at 01:25:25PM -0700, Gabriel Guzman wrote: not exactly relevant to this discussion but... Apple did just release the new G5, 64bit PowerMacs. Could be another alternative for the inexpensive 64bit market. Granted, they don't ship until august, but they are nice to look at: http://www.apple.com/powermac/ from their site: The Power Mac G5 is the world's fastest personal computer and the first with a 64-bit processor - which means it breaks the 4 gigabyte barrier and can use up to 8 gigabytes of main memory. The new G5 processor - available at speeds up to dual 2GHz with a new ultrahigh-bandwidth system architecture featuring AGP 8X and PCI-X - makes the Power Mac G5 a breakthrough in desktop processing power. And models start at just $1999. Strangely, I didn't see an Xserve models with the G5 announced yet. Did I miss that? -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! [EMAIL PROTECTED] | http://jeremy.zawodny.com/ MySQL 4.0.13: up 21 days, processed 674,756,009 queries (361/sec. avg) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Anyone had a chance to try an Opteron yet?
Michael Conlen wrote: 64 bit servers have different performance characteristics and tend to be used for different things. than PC systems. They are generally backplanes to which are attached some number of processors and some amount of memory, and a lot of IO. They aren't used as much for processor speed (you could get a bunch of PCs to do that) as they are for doing a lot of IO. Even a small server like the old Sun e450's (4 processors) had something like 6 or 8 PCI busses on them. Larger systems could be configured with a large number of IO cards for those computers that just need a few gigabit per second of network IO and a ton of disk space (multiple disk controllers, or FC controllers all going full speed). I think you are definitely overgeneralizing here. I used DEC Alpha's back when they were in Alpha testing and I've also used several machines with the MIPs chip in them. Not all 64 bit machines are of the sort you describe. I've had several different 64 bit machines on my desktop. As far as mysql is concerned, there is definitely a market for cheap machines with 4GB of memory in one process. My DB server currently is an x86 system with 4GB of memory. I guarantee that having twice as much RAM and having it usable by the MySQL process would be a big win. And an opteron system with a 64 bit processor is roughly the same price as an Intel system configured similiarly. Where as similar machines from companies like Sun, HP or IBM are definitely much more pricey. I do understand if you want terabytes of disk and very wide I/O buses that costs more no matter what CPU you have. But its also true that given a particular requirement for CPU, I/O and memory, if an Intel system with relatively stock parts can handle it, it will be cheaper due to the economics of scale and the amount of competition in that marketplace. You would use the memory to store temp information as a query would run and you rely on the systems fast access to the disks to scan through the tables. You would generally attach anywhere from a few hundred gigs of disk (spread out over many smaller disks) up to many terabytes (it's been a while since I've done large system admin work, so I have no idea what the largest systems are doing, but imagine 72 cabinets full of 72 GB or larger disks). This way instead of getting speed from caching the data you get speed by reading the data off the disks quickly. 64 bit workstations had an advantage over PC systems most of the time in that the memory bus was not the bottleneck it can be on the PC avoiding delays due to cache misses, which made them great for visualization workstations where the system had to scan through a lot of memory quickly to generate an image or process scientific data. There's a lot of other things going back to the fact that Digital, HP Sun and IBM have always had a head start on superscalar and multi-core CPU designs, so comparing Mz was never even close between two processors. On the other hand many people never saw that advantage because they would compile with gcc which was never the best choice for pure speed on a given processor. If you need a 64 bit processor for memory and file size concerns and can sacrifice some of the processing speed (which often goes away because of the faster IO) there's always been a good used market, in particular for Sun equipment. I've seen some dirt cheap prices on fully loaded Sun E450 systems which are very nice for their size. I think they hold 20 disks internally and there's PCI slots for a lot more if you need large files. On the other hand I think need 64 bit and affordable are rare situations. -- Michael Conlen Mike Wexler wrote: Not necessarily. People that need relatively affordable 64 bit systems may be waiting for the Opteron to stabilize. My experience is the Wintel solutions (like Opteron) tend to have at least a 2-1 price performance over Sun and Dec. Also, given that HP has basically dropped Alpha, I don't think a lot of people are likely to be implementing that platform. Dan Nelson wrote: In the last episode (Jun 24), David Griffiths said: I'm surprised there is not more interest in this; is it that not many work with large-ish (10+ gig) databases that need high-end performance? I think we have a mysql database running on Tru64, and I'm sure it runs great on Solaris. My guess is the people that needed over 2gb of RAM have switched to 64-bit CPUs long ago. The best in online adult entertainment http://www.tarrob.com/ads.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Confused about MyISAM vs InnoDB tabel types
Can anyone either summarize for me a comparison between the MyISAM and InnoDB MySQL table type? I am getting ready to upgrade from MySQL 3.23.42 to 4.0.13 in the coming week and started reading the upgrade documents on the www.mysql.com site. Never had even thought about using another table type since my current database seems to work fine. But thought I would ask.
Searchable docs in french, german, russian etc
Hi MySQL doc team, I have was wondering if a change could be made so that when I browse the MySQL docs in some selected language there is a search window that searchs first the language I have currently selected. The search always returns the english documentation page even when the page exists in the language I am browsing! Browse in french, http://www.mysql.com/doc/fr/index.html then use the search and it returns english! (Still helpful for me, but not really ideal, and the URL seems to include the language as part of the path http://www.mysql.com/doc/search.php?q=binlogfrom=%2Fdoc%2Ffr%2Findex.html ) . And even more, non english language words, like etendre, cannot be searched at all! It is very cool to have the manual in other languages. I am making suggestions that should help non english speakers (you may already have thought of this and not gotten around to it yet). Thanks for the very helpful documentation, you guys do a fantastic job! Ken - Ken Menzel ICQ# 9325188 www.icarz.com [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: AES 256-Bit Encryption and /etc/my.cnf
It would be really nice if ANY of these kinds of configuration options were settable via the /etc/my.cnf file. I use RPM's almost exclusively for their ease of maintenance, compatibility and stability and I certainly wouldn't want to go and have to re-compile anything just to change a value from 128 to 256. As a feature request/suggestion on behalf of every other RPM (or package such as .deb or .mdk or whatever) user, I implore you guys at mysql.com to consider this going forward. -Original Message- From: Lenz Grimmer [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 2:55 AM To: Herb Wartens Cc: [EMAIL PROTECTED] Subject: Re: AES 256-Bit Encryption -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 11 Jun 2003, Herb Wartens wrote: Does anyone know where to find the 256-Bit patch for AES encryption? No patch needed - just edit include/my_aes.h and change the AES_KEY_LENGTH define to the desired value (it defaults to 128 bits). Bye, LenZ - -- For technical support contracts, visit https://order.mysql.com/?ref=mlgr __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mr. Lenz Grimmer [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Production Engineer /_/ /_/\_, /___/\___\_\___/ Hamburg, 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: Strange Mull in show fields and table keeps crashing
Hi, What about upgrading to MySQL 4.0.13 ? 4.0.0 is not a production release, and a lot of bugs have been fixed between 4.0.0 and 4.0.13. Regards, Jocelyn - Original Message - From: Karl J. Stubsjoen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 11:13 PM Subject: Strange Mull in show fields and table keeps crashing Hello, I have this table: CLUB Field Type Null Key Default Extra clubid int(11) PRI NULL auto_increment clubusgf int(11) UNI 0 program char(3) url varchar(75) email varchar(75) phone varchar(14) fax varchar(14) address1 varchar(75) MUL address2 varchar(75) city varchar(75) notes varchar(255) zip varchar(10) clubname varchar(75) contact_primary varchar(40) state char(2) contact_secondary varchar(40) See address1 above the the MUL next to it. What is that? Also, this table keeps crashing, it crashes when I make an edit to anything in this field. So I copy the column, move the data over and then I can make edits in this field. However, another field in my table will get this strange MUL indication. From this point forward then, any changes to the data in that column will cause the table to crash. I've succesfully repaired the table a 1/2 dozen times or so... and copied/renamed about 4 of the columns as they took on this MUL characteristic. Any ideas how to fix this problem? Any ideas what is going on? Here is my version of MySQL: Server version: 4.0.0-alpha Karl -- 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: Anyone had a chance to try an Opteron yet?
Linux compiled on an opteron and targeted for it will lose the 2-gig process limit. the 2-gig number is based on a 32 bit integer. You now would a have 64 bit integer (5 Quintillion as an unsigned integer. :-)). Imagine the 10GB database in memory, plus the temp and heap tables and the indexes. Lets not forget about the ability to have large heap tables, too. Life gets very interesting in the 64 bit space, especially since IA64's aren't exactly plentiful. As soon as I can afford one, I'm buying one. I'm very interesting. Curtis On Tue, 24 Jun 2003, David Griffiths wrote: I'm surprised there is not more interest in this; is it that not many work with large-ish (10+ gig) databases that need high-end performance? A 64-bit CPU won't have the 4-gig memory limit that a 32-bit processor will; even worse, Linux is apparently limited to about a 2-gig process. SuSe Enterprise Linux supports 512-gigabyte processes with 16 processors. Imagine 10 gigabyte database all in memory. Even better, larger file sizes - no more 2-gig files. Max file size is 9-Exabytes ( 9 followed by 18 0's ). All the posts I see about people trying to get around the 2 gig file limit should be really excitied. I guess I'm just surprised by lack of interest. I've been bugging our CTO once a week about this, and hopefully should have a server on my desk by mid summer to late fall. If you're interested, SuSe has a good PDF on AMD64 and SuSe Enterprise Linux 1.0: http://www.suse.com/en/business/products/server/sles/misc/sles8_amd64.pdf Anyone have some practical experience with the software and hardware? David. -- -- Curtis Maurand mailto:[EMAIL PROTECTED] http://www.maurand.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql.sock doesn't exist
I changed the port in /etc/my.cnf and restarted the service but still get a message that I can't connect to the server, etc. I am still not seeing any fresh log messages. Why would there not be any output on that? Is there someplace I should look for a log file besides /var/log ? Kevin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Anyone had a chance to try an Opteron yet?
On Tue, Jun 24, 2003 at 05:37:24PM -0400, Curtis Maurand wrote: Linux compiled on an opteron and targeted for it will lose the 2-gig process limit. the 2-gig number is based on a 32 bit integer. You now would a have 64 bit integer (5 Quintillion as an unsigned integer. :-)). Imagine the 10GB database in memory, plus the temp and heap tables and the indexes. Lets not forget about the ability to have large heap tables, too. Life gets very interesting in the 64 bit space, especially since IA64's aren't exactly plentiful. As soon as I can afford one, I'm buying one. I'm very interesting. Yeah, the operton should kick major ass with MySQL and sufficient memory. :-) Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! [EMAIL PROTECTED] | http://jeremy.zawodny.com/ MySQL 4.0.13: up 21 days, processed 675,596,767 queries (361/sec. avg) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Strange Mull in show fields and table keeps crashing
MUL indicates a that the column is part of a composite INDEX. SHOW INDEX FROM tablename Should let you know what columns make up the MUL column INDEX. If this was not supposed to be indexed, your table is corrupt, best try MyIsamChk Regards, Mike Hillyer www.vbmysql.com -Original Message- From: Karl J. Stubsjoen [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 3:13 PM To: [EMAIL PROTECTED] Subject: Strange Mull in show fields and table keeps crashing Hello, I have this table: CLUB Field Type Null Key Default Extra clubid int(11) PRI NULL auto_increment clubusgf int(11) UNI 0 program char(3) url varchar(75) email varchar(75) phone varchar(14) fax varchar(14) address1 varchar(75) MUL address2 varchar(75) city varchar(75) notes varchar(255) zip varchar(10) clubname varchar(75) contact_primary varchar(40) state char(2) contact_secondary varchar(40) See address1 above the the MUL next to it. What is that? Also, this table keeps crashing, it crashes when I make an edit to anything in this field. So I copy the column, move the data over and then I can make edits in this field. However, another field in my table will get this strange MUL indication. From this point forward then, any changes to the data in that column will cause the table to crash. I've succesfully repaired the table a 1/2 dozen times or so... and copied/renamed about 4 of the columns as they took on this MUL characteristic. Any ideas how to fix this problem? Any ideas what is going on? Here is my version of MySQL: Server version: 4.0.0-alpha Karl -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Replication Performance
On Tue, Jun 24, 2003 at 03:34:48PM -0500, Todd Burke wrote: Hello 1/ I have a search engine which crawls auction sites and returns information which is inserted into a mysql database. This activity represents on average about 3 inserts per second with a combined payload of 450 bytes per second added to the database. This updating occurs continuously throughout the day. Since this activity puts a burden on the machine on which it occurs (not only the mysqld inserts but also the scripts and http client activity), I am planning to dedicate one box to the crawling/inserting and replicate the data to one (or possibly more) other servers. These slave servers will handle all client requests (almost exclusively reads). [snip] My questions are: Since the updating occurs throughout the day and the same amount of data has to be eventually inserted into the slaves I assume the updating will require the same amount of resources (disk, cpu usage) on the slaves as on the master - the same number of writes will occur on the slaves. Yes. So the the benefit of this configuration (in terms of performance) is that it is the extra processing required to do the crawling will be offloaded to the one master server, not the resources required for the mysql writes. The real benefit is that clients reading the data don't block writes on the master AND you can have many, many, many more clients reading the data this way--more than a single machine could ever handle. I assume inserts done thru replication are not more efficient than regular inserts. Right. What is the performance hit of replication and is there a way to limit the effect of the writes on the slave servers, thru configuration parameters, for example, or would it even make sense to take the slave offline at regular intervals while replication is taking place? The performance hit of replication on the master is trivial. I've had 40 slaves (or was it 30?) replicating from a master with no side-effects. I can think of no reason to pause replication on the slave(s). 2/ Is there any documentation on handling and configuring large tables? Yes, here's something I wrote to explain it a bit more than the manual does (or used to): http://jeremy.zawodny.com/blog/archives/000796.html Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! [EMAIL PROTECTED] | http://jeremy.zawodny.com/ MySQL 4.0.13: up 21 days, processed 675,697,506 queries (361/sec. avg) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Installing On Red Hat 9?
Can anyone point me to docs on installing MySQL on Red Hat 9 on an Intel box? Thanks, -m === -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld question
At 12:44 2003-06-24, Janice Wright wrote: Well, in the Managing MySQL course run by MySQL AB; they taught us that upgrading hardware is the *last* thing you do to get the database to run faster, not the first. Before you buy new hardware you should: snip Thanks for the info! (appreciate it) Though I don't have the time to set myself into how to fiddle with the server in order to make it work, I am more of an out of the box kind of guy, as I'd rather not dig myself into any deeper technical matters. Anywho, I'm leaving the list for now - again. Thanks for all your help! (I appreciate it) / H -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Installing On Red Hat 9?
On Tue, Jun 24, 2003 at 02:54:23PM -0700, Mike wrote: Can anyone point me to docs on installing MySQL on Red Hat 9 on an Intel box? I don't think it's any different from previous RedHats. Downlaod the RPMs from www.mysql.com. Install them using rpm -i *.rpm Granted, I'm no RH expert, but I set it up on servers for a few friends recently... -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! [EMAIL PROTECTED] | http://jeremy.zawodny.com/ MySQL 4.0.13: up 21 days, processed 676,166,490 queries (361/sec. avg) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql 4.1 client authentication
in Version 4.1 the passwords are 45 bits in Version 4.1 passwords are 16 bits Upgrade your client will make it work again. You sould be able to connect from any 4.1 mysql client. Best regards 2003 6 25 03:[EMAIL PROTECTED] : Does anyone know what is different in mysql 4.1 client authentication from mysql 4.0? After upgrading to 4.1 my scripts can no longer connect and produce the following message: Client does not support authentication protocol requested by server. Consider upgrading MySQL client -- --- Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp Personal URL: http://www.knowd.co.jp/staff/nils -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: InnoDB foreign keys
If possible, what is the syntax? It's possible, but if you can't search, I'm not sure you can handle it. ;P http://www.innodb.com/ibman.html#InnoDB_foreign_keys Edward Dudlik Becoming Digital www.becomingdigital.com Did I help you? Want to show your thanks? www.amazon.com/o/registry/EGDXEBBWTYUU - Original Message - From: Mikael Engdahl [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, 24 June, 2003 15:36 Subject: InnoDB foreign keys Hello, Is it possible to create a foreign key that referencestwo columns, if the referenced table uses more two colums for it's primary key? If possible, what is the syntax? Mikael Engdahl -- 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]
Temporary tables - MySQL 4.1 alpha
Hi MySQL Fans ;-), I have some questions about temporary tables. I would appreciate any replies: I created a temporary table f.e. like this: mysql create temporary table temp SELECT * FROM relations; Query OK, 4 rows affected (2.35 sec) Records: 4 Duplicates: 0 Warnings: 0 When I do mysql show create table temp; Then it will give me this: | temp | CREATE TEMPORARY TABLE `temp` ( `member_id` int(16) NOT NULL default '0', `company_id` int(16) NOT NULL default '0', `membership_id` int(16) NOT NULL default '0' ) TYPE=MyISAM CHARSET=latin1 | Now what confuses me is that a) it says here TYPE=MyISAM b) I understood that only HEAP tables are stored in the memory. I was assuming (until now) that HEAP tables are (the only one type of) temporary tables. I tried CREATE TEMPORARY TABLE temp TYPE= InnoDB SELECT * FROM relations; or CREATE TEMPORARY TABLE temp TYPE= HEAP SELECT * FROM relations; and they are all created as in-memory tables no files are created. Can I use any table format (ISAM,MYISAM,BDB,InnoDB,HEAP) for temporary tables ? If, so what would be the difference between a temporary table in general and a HEAP table ? -- --- Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp Personal URL: http://www.knowd.co.jp/staff/nils -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql.sock doesn't exist
Kevin H. Phillips wrote: I changed the port in /etc/my.cnf and restarted the service but still get a message that I can't connect to the server, etc. I am still not seeing any fresh log messages. Why would there not be any output on that? Is there someplace I should look for a log file besides /var/log ? Kevin Did you install by RPM? If so, look in /var/lib/mysql The file will be you machine name dot err, eg... localhost.err -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
about desc command
Hello, mysql, After create a table,it can use desc tablename to describe the table scheme. But it can not demonstrate that the column is unique or not.It just simplely show the column is MUL type. How can I get more information from the table by using mysql commend?(Except use mysqldump to read the sql file) or How can I type command to show the table structure? mysqltype some command mysqlcreate tabe //Show the specifing created table sql information .. ... Best regards. MaFai [EMAIL PROTECTED] 2003-06-25 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Query Execution Time in mysql
Hi All, I have 2 tables say table1 and table2 in the database. I am using the following query to copy all the data from table2 to table1. insert into table1 select * from table2; Table2 has some 10,000 records while table1 has around 11,00,000 records. The time reqd. to execute the above query is round about 80- 90 secs. The table1 has 7 columns out of which 5 are composite primary keys. No other indexing is provided. I have also tried to use the optimize table table1 command but to no effect. Please let know if any solution is available. Thanks Amit Lonkar __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
datetime column dummy question
Hello, mysql, A table contains a column named mydate. //Wrong sql statement alter table p_asset add mydate datetime default now(); alter table p_asset add mydate datetime default time(); alter table p_asset add mydate datetime default now; alter table p_asset add mydate datetime default time; alter table p_asset add mydate datetime default date(); alter table p_asset add mydate datetime default datetime(); How can I add the default now value into the specified column? I try to find in the mysql manual,but in the default value charter,no relative information can be found. I also know this question is stupid,but hope you help. Best regards. MaFai [EMAIL PROTECTED] 2003-06-25 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: about desc command
On Wed, 25 Jun 2003 11:29:25 +0800 MaFai [EMAIL PROTECTED] wrote: Hello, mysql, After create a table,it can use desc tablename to describe the table scheme. But it can not demonstrate that the column is unique or not.It just simplely show the column is MUL type. How can I get more information from the table by using mysql commend?(Except use mysqldump to read the sql file) or How can I type command to show the table structure? mysqltype some command mysqlcreate tabe //Show the specifing created table sql information .. ... Best regards. MaFai [EMAIL PROTECTED] 2003-06-25 === TELKOMNet Instan memberikan diskon 40% untuk akses malam hari dari pukul 23.00 sampai 06.00. Berlaku untuk wilayah Jawa Timur mulai 1 Mei 2003 sampai 30 Juni 2003. === -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Database replication
I want to be able to take a database running on a primary server and duplicate/mirror it on a secondary server. I want to be able to update the secondary server on a selectable interval (every 15 mins, every hour, etc). What is the best way to accomplish this task? Consider that at least one table is InnoDB and does use transactions. There may be others as I develop the database further. Additionally, where does MySQL write it's transactions? If the power to the box dies and the system crashes, What does MySQL do to recover? What about tables that are not InnoDB? Thanks. -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom pgp0.pgp Description: PGP signature
Re: Freeing memory
At 13:19 -0500 6/24/03, Jay Blanchard wrote: Other than mysql_free_result() how can I free up memory upon the completion of a query? Why don't you want to use the function that is provided for that purpose? TIA! jay -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Sorting Countries
I am getting a list of all countries from database, and then I am sorting by country name. However since most orders will be from US I want the US to appear first over the rest of the countries. How can I go about doing this? Currently, this is my query: SELECT countries_id, countries_name FROM TABLE_COUNTRIES ORDER BY countries_name; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
SQL Query
Hi all, I just looked at the mysql doc and I didnt find an answer to my question. does mysql has the minus statement ? or is there something similar ? SELECT something FROM somewhere MINUS SELECT something_else FROM somewhere; Or this one could do the job but mysql doesnt seems to accept it either.. SELECT id FROM there WHERE id != ( SELECT id FROM this_one ); so Here's what I want to do... my Tables are : CREATE TABLE Place ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, Name VARCHAR(60) NOT NULL, Desc TEXT, PRIMARY KEY (id) ); CREATE TABLE Place_link ( Place INT UNSIGNED NOT NULL REFERENCES Place(id), LinkTo INT UNSIGNED NOT NULL REFERENCES Place(id), PRIMARY KEY (Place, LinkTo) ); I got a table with different places (Amusement park, Store, etc... ) and the Place_linf table contains the id of a place (Place) and if from that place, you can go to another place, its in the LinkTo. example : You got the 1:Market, 2:Zoo, 3:Pool, 4:Arena, 5:Stadium From the market you can go to the zoo and the Arena, and from the pool, you can go to the zoo, and the market... so we have : Place - LinkTo 1 2 3 1 3 2 1 4 so my query is: I want Place(id,Name) from Place but not the market (id != '1') and not the place where the market has a link to (not 2, 4). And I dont know how to do this query... Anyone knows ? (if someone understand what im trying to do hehe) Thx Gregory -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Authentication problem with MyODBC 3.51
At 9:17 +0200 6/17/03, Laura del Cano wrote: Hello, I have intalled Mysql 4.1.0 and MyODBC 3.51 under Windows 2000. I create a new database in Mysql and a user with all the privileges on it (using GRANT ALL privileges...). I create a User DSN in the windows Control Panel and when I test the connection (in the same DSN panel) I get the following message: [MySQL][ODBC 3.51 Driver]Client does not support authentication protocol requested by server. Consider upgrading MySQL client I get the same error if I try to connect using the Mysqlgui or from another application, but only if the mysql user has a password. If it does not have a password, it connects ok. Last comment, this does not happen in all the machines, I have the same configuration installed in other machine (Windows2000, Mysql 4.1.0 and MyODBC 3.51) and I do not have this problem. Does anybody knows what I am missing? The authentication protocol and password hashing has changed in 4.1. When you install MySQL 4.1, you should run the server with the --old-passwords option to tell it not to create new-style password hashes. After starting the server this way, you should also change the passwords of any accounts that you created while the server was running without --old-passwords. Otherwise, older clients will not be able to use those accounts. You can recognize which accounts have new-style password hashes by looking in the user table of the mysql database. 16-byte values in the Password column use old hashing, longer values use new hashing. http://www.mysql.com/doc/en/What-to-do-from-4.0.html thanks, Laura. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MyODBC 3.51 for MySQL 4.1
At 9:54 +0100 6/17/03, [EMAIL PROTECTED] wrote: I am using MySQL 4.1 alpha for windows for new development. Is MyODBC 3.51.06 supposed to work for MySQL 4.1 alpha? I get message [MySQL][ODBC 3.51 Driver]Client does not support authentication protocol requested by server. Consider upgrading MySQL client. Any clue about when MyODBC 3.52 will be released? The MyOLEDB version I am using is 3.0 many thanks, rajendra The authentication protocol and password hashing has changed in 4.1. When you install MySQL 4.1, you should run the server with the --old-passwords option to tell it not to create new-style password hashes. After starting the server this way, you should also change the passwords of any accounts that you created while the server was running without --old-passwords. Otherwise, older clients will not be able to use those accounts. You can recognize which accounts have new-style password hashes by looking in the user table of the mysql database. 16-byte values in the Password column use old hashing, longer values use new hashing. http://www.mysql.com/doc/en/What-to-do-from-4.0.html -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql 4.1 client authentication
Uuups I meant 16 bytes and 45 bytes of course ;-) - otherwise anybody with a 286 could have found out ;-) Best regards Nils Valentin Tokyo/Japan 2003 6 25 07:35Nils Valentin : in Version 4.1 the passwords are 45 bits in Version 4.1 passwords are 16 bits Upgrade your client will make it work again. You sould be able to connect from any 4.1 mysql client. Best regards 2003 6 25 03:[EMAIL PROTECTED] : Does anyone know what is different in mysql 4.1 client authentication from mysql 4.0? After upgrading to 4.1 my scripts can no longer connect and produce the following message: Client does not support authentication protocol requested by server. Consider upgrading MySQL client -- --- Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp Personal URL: http://www.knowd.co.jp/staff/nils -- --- Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp Personal URL: http://www.knowd.co.jp/staff/nils -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqlhotcopy does not read configuration files.
Description: mysqlhotcopy does not read defaults from my.cnf and .my.cnf files. How-To-Repeat: Run mysqlhotcopy and observe it doesn't read client defaults. Fix: See below for patch, shown as a context diff Submitter-Id: submitter ID Originator:Larry Stone Organization: MIT (Massachusetts Institute of Technology) MySQL support: none Synopsis: mysqlhotcopy does not read defaults from my.cnf and .my.cnf files. Severity: non-critical Priority: medium Category: mysql Class: sw-bug Release: mysql-4.0.12-standard (Official MySQL-standard binary) C compiler:gcc (GCC) 3.2 C++ compiler: gcc (GCC) 3.2 Environment: System: SunOS speaker-to-teletypes.mit.edu 5.8 Generic_108528-18 sun4u sparc SUNW,Sun-Blade-100 Architecture: sun4 Some paths: /usr/athena/bin/perl /usr/ccs/bin/make /usr/athena/bin/gmake /mit/gnu/arch/sun4x_58/bin/gcc /usr/athena/bin/cc GCC: Reading specs from /mit/gnu/arch/sun4x_58/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs gcc version 2.95.3 20010315 (release) Compilation info: CC='gcc' CFLAGS='-O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' ASFLAGS='' LIBC: lrwxrwxrwx 1 root root 18 Aug 9 2002 /lib/libc.a - /os/usr/lib/libc.a lrwxrwxrwx 1 root root 11 Aug 9 2002 /lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1157924 Mar 18 21:34 /lib/libc.so.1 lrwxrwxrwx 1 root root 18 Aug 9 2002 /usr/lib/libc.a - /os/usr/lib/libc.a lrwxrwxrwx 1 root root 11 Aug 9 2002 /usr/lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1157924 Mar 18 21:34 /usr/lib/libc.so.1 Configure command: ./configure '--prefix=/usr/local/mysql' '--with-comment=Official MySQL-standard binary' '--with-extra-charsets=complex' '--with-server-suffix=-standard' '--enable-thread-safe-client' '--enable-local-infile' '--enable-assembler' '--with-named-z-libs=no' '--with-named-curses-libs=-lcurses' '--disable-shared' '--with-innodb' 'CC=gcc' 'CFLAGS=-O3 -fno-omit-frame-pointer' 'CXXFLAGS=-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti' 'CXX=gcc' -- Here is my patch that fixes the problem, agains the version 4.0.12 source: *** mysqlhotcopy.orig Sat Mar 15 12:06:50 2003 --- mysqlhotcopyFri Apr 11 19:33:13 2003 *** *** 80,85 --- 80,100 die @_, $OPTIONS; } + ## get defaults from my.cnf, .my.cnf files: + my $my_print_defaults = 'my_print_defaults'; + if ($0 =~ m#^/#) { + my ($mybindir) = ($0 =~ m#(^.+)/[^/]+$#); + $my_print_defaults = ${mybindir}/my_print_defaults + if length($mybindir); + } + my @defops = `$my_print_defaults client mysqlhotcopy`; + if ($?) { + warn Failed to invoke $my_print_defaults, cannot read defaults from files.; + } else { + chop @defops; + splice @ARGV, 0, 0, @defops; + } + my %opt = ( user = scalar getpwuid($), noindices = 0, -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: LAST_INSERT_ID() returns different values on different connections
At 16:02 +0300 6/17/03, Baris Akin wrote: Hello, I try to get last inserted autoincrement record ID on table with LAST_INSERT_ID() function (SELECT LAST_INSERT_ID() FROM TABLE). Every connection returns it's own last inserted ID not actual ID. Is this a bug? Also it returns more than one record (20 rows). It's supposed to return the last ID generated on that connection. (I'm not sure what you mean by actual ID, because I would expect the connection's last ID and actual ID to mean the same thing.) The reason you get back multiple records is because you're using SELECT LAST_INSERT_ID() FROM TABLE rather than SELECT LAST_INSERT_ID() What's happening with your query is that you're returning the ID once per row in your table. Drop the FROM TABLE in your query and you'll get just one row back. Thanks Baris AKIN Istanbul/TURKEY -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: default value does not set using LOAD DATA INFILE ...
Thank you for your response to my first post on this list. I really appreciate your time to answer my question. I tried every thing I could think following the manual for LOAD DATA before I joined this list. I probably did not explain my problem clearly in my initial post. What I try to do is to import a csv data file into MySQL using LOAD DATA INFILE I would like to leave some fields blank in the csv file, and let MySQL to set default values to those fields in the database when loading the data. But every thing goes fine except the default values do not set. Although it was the first time for me to send the post on this list, I was sure that I did not follow other people's threads. I checked my original post again after read your response, and I did start with a new thread. However, I apologize if somehow I did make any mistake. Thanks Ruth - Original Message - From: Roman Neuhauser [EMAIL PROTECTED] To: Ruth Zhai [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 7:50 PM Subject: Re: default value does not set using LOAD DATA INFILE ... please don't piggyback on other people's threads. you can start your own for free. # [EMAIL PROTECTED] / 2003-06-24 09:46:24 +1000: I am using LOAD DATA INFILE to import some data to MySQL. I would like to leave some fields blank and use the default value set in the tables. I have spent many hours trying to find the problem, but no luck so far. According to the manual, it should work. I am hoping some one on this list would help me. The following is sql query string I used: LOAD DATA LOCAL INFILE \' file \' REPLACE INTO TABLE table FIELDS TERMINATED BY \'terminator\' ENCLOSED BY \'\\' I see no indication as to which columns should be skipped in your statement. What did you actually try? the manual (http://www.mysql.com/doc/en/LOAD_DATA.html) says: LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name.txt' [REPLACE | IGNORE] INTO TABLE tbl_name [FIELDS [TERMINATED BY '\t'] [[OPTIONALLY] ENCLOSED BY ''] [ESCAPED BY '\\' ] ] [LINES [STARTING BY ''] [TERMINATED BY '\n'] ] [IGNORE number LINES] [(col_name,...)] that would translate into (provided you wanted to insert into first, third, and fifth column in your table): LOAD DATA LOCAL INFILE 'file' REPLACE INTO TABLE table FIELDS TERMINATED BY 'terminator' ENCLOSED BY '' (col1, col3, col5) -- If you cc me or remove the list(s) completely I'll most likely ignore your message.see http://www.eyrie.org./~eagle/faqs/questions.html -- 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: SQL Query
SELECT Place.id, Place.name FROM Place LEFT JOIN Place_link ON Place.id=Place_link.Place WHERE Place.id!=1 AND Place_link.LinkTo!=1; This section of the manual will probably help you further. http://www.mysql.com/doc/en/ANSI_diff_Sub-selects.html Edward Dudlik Becoming Digital www.becomingdigital.com Did I help you? Want to show your thanks? www.amazon.com/o/registry/EGDXEBBWTYUU - Original Message - From: Grégory Verret [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, 25 June, 2003 00:31 Subject: SQL Query Hi all, I just looked at the mysql doc and I didnt find an answer to my question. does mysql has the minus statement ? or is there something similar ? SELECT something FROM somewhere MINUS SELECT something_else FROM somewhere; Or this one could do the job but mysql doesnt seems to accept it either.. SELECT id FROM there WHERE id != ( SELECT id FROM this_one ); so Here's what I want to do... my Tables are : CREATE TABLE Place ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, Name VARCHAR(60) NOT NULL, Desc TEXT, PRIMARY KEY (id) ); CREATE TABLE Place_link ( Place INT UNSIGNED NOT NULL REFERENCES Place(id), LinkTo INT UNSIGNED NOT NULL REFERENCES Place(id), PRIMARY KEY (Place, LinkTo) ); I got a table with different places (Amusement park, Store, etc... ) and the Place_linf table contains the id of a place (Place) and if from that place, you can go to another place, its in the LinkTo. example : You got the 1:Market, 2:Zoo, 3:Pool, 4:Arena, 5:Stadium From the market you can go to the zoo and the Arena, and from the pool, you can go to the zoo, and the market... so we have : Place - LinkTo 1 2 3 1 3 2 1 4 so my query is: I want Place(id,Name) from Place but not the market (id != '1') and not the place where the market has a link to (not 2, 4). And I dont know how to do this query... Anyone knows ? (if someone understand what im trying to do hehe) Thx Gregory -- 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]
emalloc() error being thrown {LONG}
Good morning! (My apologies for sending to both lists, I found emalloc() info on both PHP and MySQL that might be applicable and could not make a good call as to where this might be more appropriate) We are attempting to return a rather large file from a set of queries to MySQL via PHP. Each time the query completes we are freeing the result (mysql_free_result) so that we do not get memory errors, but at about 20 MB (tested multiple times) we get ... FATAL: emalloc(): Unable to allocate 2 bytes Here is the code ?php //connect to and select database include(dbconnect.cali.php); //include test data vs. real data include(choose_data.cali.php); // get list of originating RC $qorg = SELECT DISTINCT(originating) AS original FROM . $curtblRCscope . ; if(!($dborg = mysql_query($qorg, $dbconnect))){ print(MySQL Reports: . mysql_error() . \n); exit(); } // create array so memory from query can be freed $a = 0; while ($org = mysql_fetch_object($dborg)){ $orig_array[$a] = $org-original; $a++; } mysql_free_result($dborg); $orig_count = count($org_array); if ($curtblRC == tblRC){ $curpath = /var/lib/apache/htdocs/callscope/output/; } else { $curpath = /usr/feynman/lcs/; } if (!($npanxxfile = fopen($curpath.npanxx.cali..date(Ymd)..txt,w+))){ print(Failed to open file!\n); exit(); } //file was opened for($i = 0; $i $orig_count; $i++){ // start writing loop //get npanxx list $qnpanxx = SELECT DISTINCT c.originating as origin, c.terminating as termination, a.npanxx as o_npanxx, b.npanxx as t_npanxx ; $qnpanxx .= FROM .$curtblRC. a, .$curtblRC. b, .$curtblRCscope. c ; $qnpanxx .= WHERE a.RCname = ' . $orig_array[$i] . ' ; $qnpanxx .= AND a.RCname = c.originating ; $qnpanxx .= AND b.RCname = c.terminating ; $qnpanxx .= ORDER BY c.originating, c.terminating, a.npanxx, b.npanxx ; //$qnpanxx .= LIMIT 5 ; // for test purposes jb if(!($dbnpanxx = mysql_query($qnpanxx, $dbconnect))){ print(MySQL reports: . mysql_error() . \n); exit(); } if (mysql_num_rows($dbnpanxx) 0){ //start if $npanxxcnt = 0; while($urownpanxx = mysql_fetch_object($dbnpanxx)){ //output originating npanxx fputs($npanxxfile, $urownpanxx-o_npanxx); //output terminating npanxx fputs($npanxxfile, $urownpanxx-t_npanxx); //output spaces in characters 13-66 for($spaces = 13; $spaces = 66; $spaces++){ fputs($npanxxfile, ); } //output N fputs($npanxxfile, N); //output spaces in characters 68-86 for($spaces = 68; $spaces = 86; $spaces++){ fputs($npanxxfile, ); } //output terminating newline fputs($npanxxfile, \n); $npanxxcnt++; }// end while mysql_free_result($dbnpanxx); }// end if }// end writing loop fclose($npanxxfile); ? Here are a couple of lines of the output file...(the spaces are necessary). Each line is 87 bytes long including the newline character. 626677213532 N 626677213533 N 626677213534 N 626677213538 N 626677213542 N I have STFW, RTFM taken a couple of SWAG's and still cannot come up with a solution. Is the opened file held in memory and therefore as it gets larger it approaches the memeory limit of the machine? Any insight would help...a BIG THANKS IN ADVANCE! Jay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]