store file in MySQL database

2004-04-30 Thread joe collins
Hi, I want to store a .txt file in a table in a MySQL database, typically what is the best type of data type/ column to use for this. The .txt will not exceed 100K. Thanks Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: store file in MySQL database

2004-04-30 Thread Egor Egorov
joe collins [EMAIL PROTECTED] wrote: I want to store a .txt file in a table in a MySQL database, typically what is the best type of data type/ column to use for this. The .txt will not exceed 100K. You need MEDIUMTEXT/MEDIUMBLOB column types: http://dev.mysql.com/doc/mysql/en/BLOB.html

Storing a space

2004-04-30 Thread John Mistler
Is there a way to force an invisible space character to be stored at the END of a string in a column (either VARCHAR or CHAR), so that when it is retrieved the space at the end is not cut off? theString + space or even, theString + space + space + space, etc. Currently, I can only get the

Re: Storing a space

2004-04-30 Thread Matt W
Hi John, I *think* VARCHAR is *supposed* to work that way, but doesn't in MySQL. So you'll have to use TINYTEXT. Its storage requirements are the same as VARCHAR(255) and it behaves the same way, except for, I think, 3 things: 1) the trailing space thing, obviously; 2) it can't have a DEFAULT

Replication and Grants nightmare

2004-04-30 Thread Nico Sabbi
Hi, I'm running mysql-max 4.0.18 on two servers on separate networks, master is A and slave is B. The problem is that if I don't grant on the master the full range of privileges to the slave the replication doesn't even start. Even worse is the fact that grants seems to be totally managed at

Re: Error dropping databases [in InnoDb]

2004-04-30 Thread Heikki Tuuri
Michael, Marko has fixed this to 4.0.19. Best regards, Heikki Tuuri Innobase Oy Foreign keys, transactions, and row level locking for MySQL InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM tables http://www.innodb.com/order.php Order MySQL technical support from

RE: Error dropping databases [in InnoDb]

2004-04-30 Thread Michael McTernan
Many Thanks :) Mike -Original Message- From: Heikki Tuuri [mailto:[EMAIL PROTECTED] Sent: 30 April 2004 11:56 To: Michael McTernan; Tom O'Neil Cc: [EMAIL PROTECTED] Subject: Re: Error dropping databases [in InnoDb] Michael, Marko has fixed this to 4.0.19. Best regards,

Re: Command for getting back an auto_increment field?

2004-04-30 Thread Egor Egorov
Leandro Melo [EMAIL PROTECTED] wrote: If it`s a InnoDB table :-? my case If you want to start auto_increment sequence from the beginning, you must recreate InnoDB table. --- Paul DuBois [EMAIL PROTECTED] escreveu: At 12:27 -0300 4/29/04, Leandro Melo wrote: Hi, i got a table wich its pk

Create a table from SHOW TABLE STATUS ?

2004-04-30 Thread Richard A. DeVenezia
I'm running 4.1.1a-alpha-max-nt using innodb tables with foreign keys . I know how to use SHOW TABLE STATUS to see the referential linkages in the COMMENT column. Supppose I am typing away in MySQL monitor: Q: Is there a way to create a table from the SHOW TABLE STATUS command ? Q: Does v5 have

Re: Create a table from SHOW TABLE STATUS ?

2004-04-30 Thread Victoria Reznichenko
Richard A. DeVenezia [EMAIL PROTECTED] wrote: I'm running 4.1.1a-alpha-max-nt using innodb tables with foreign keys . I know how to use SHOW TABLE STATUS to see the referential linkages in the COMMENT column. Supppose I am typing away in MySQL monitor: Q: Is there a way to create a table

Re: SQL SELECT HELP

2004-04-30 Thread Egor Egorov
[EMAIL PROTECTED] wrote: Sorry. My english is not so good. :( I try to explain. I have table1 : ID value -- 1 100 1 101 1 102 1 200 2 100 2 300--- 2 310 | 3 100 |

Re: Storing a space

2004-04-30 Thread Paul DuBois
At 1:54 -0700 4/30/04, John Mistler wrote: Is there a way to force an invisible space character to be stored at the END of a string in a column (either VARCHAR or CHAR), so that when it is retrieved the space at the end is not cut off? No. I suggest that you use one of the TEXT types instead,

Re: Replication and Grants nightmare

2004-04-30 Thread Paul DuBois
P.S. the manual doesn't say that grants super, reload, replication client and replication slave can be used only on *.* and not on DB.*. Each of those privileges is listed as an administrative privilege here: http://dev.mysql.com/doc/mysql/en/Privileges_provided.html There are not listed as

Re: Replication and Grants nightmare

2004-04-30 Thread Nico Sabbi
Alle Friday 30 April 2004 15:22, Victoria Reznichenko ha scritto: Hmm.. Your queries worked fine for me: ANT REPLICATION SLAVE, REPLICATION CLIENT, SUPER, RELOAD ON *.* TO 'replica'@'B' IDENTIFIED BY PASSWORD '715a443962d324cc'; Query OK, 0 rows affected (0.00 sec) mysql show grants for

Re: Command for getting back an auto_increment field?

2004-04-30 Thread Paul DuBois
At 14:48 +0300 4/30/04, Egor Egorov wrote: Leandro Melo [EMAIL PROTECTED] wrote: If it`s a InnoDB table :-? my case If you want to start auto_increment sequence from the beginning, you must recreate InnoDB table. To add to this, I'll mention something else that is relevant in the context of

Re: Replication and Grants nightmare

2004-04-30 Thread Nico Sabbi
Alle Friday 30 April 2004 15:51, hai scritto: P.S. the manual doesn't say that grants super, reload, replication client and replication slave can be used only on *.* and not on DB.*. Each of those privileges is listed as an administrative privilege here:

SELECT HELP

2004-04-30 Thread Andre MATOS
Hi, Is it possible to create a Select performing a math formula? For example: First I need to add two values come from the same table but from different records. The result will be divided from one number got from another table. Now, the new result will be added with another value got from

Case Sensitive on Windows

2004-04-30 Thread shaun thornburgh
Hi, I am trying to synchronize two databases - the source is on a FreeBSD web server and the target is on our local Windows 2000 Server machine. I am trying to do this using Webyog (www.webyog.com) which tells Windows to sync with the source machine every hour. However, this is producing

Re: Replication and Grants nightmare

2004-04-30 Thread Paul DuBois
At 16:22 +0200 4/30/04, Nico Sabbi wrote: Alle Friday 30 April 2004 15:51, hai scritto: P.S. the manual doesn't say that grants super, reload, replication client and replication slave can be used only on *.* and not on DB.*. Each of those privileges is listed as an administrative privilege

Re: SELECT HELP

2004-04-30 Thread Thomas Spahni
Andre, have a look at JOIN. This can solve your problem. Thomas Spahni On Fri, 30 Apr 2004, Andre MATOS wrote: Is it possible to create a Select performing a math formula? For example: First I need to add two values come from the same table but from different records. The result will be

Re: Case Sensitive on Windows

2004-04-30 Thread Robert J Taylor
shaun thornburgh wrote: Hi, I am trying to synchronize two databases - the source is on a FreeBSD web server and the target is on our local Windows 2000 Server machine. I am trying to do this using Webyog (www.webyog.com) which tells Windows to sync with the source machine every hour. Side

Re: Replication and Grants nightmare

2004-04-30 Thread Nico Sabbi
Alle Friday 30 April 2004 16:44, hai scritto: At 16:22 +0200 4/30/04, Nico Sabbi wrote: Alle Friday 30 April 2004 15:51, hai scritto: P.S. the manual doesn't say that grants super, reload, replication client and replication slave can be used only on *.* and not on DB.*. Each of those

Re: Case Sensitive on Windows

2004-04-30 Thread Paul DuBois
At 14:43 + 4/30/04, shaun thornburgh wrote: Hi, I am trying to synchronize two databases - the source is on a FreeBSD web server and the target is on our local Windows 2000 Server machine. I am trying to do this using Webyog (www.webyog.com) which tells Windows to sync with the source

Re: SELECT HELP

2004-04-30 Thread Robert J Taylor
Andre MATOS wrote: Hi, Is it possible to create a Select performing a math formula? For example: First I need to add two values come from the same table but from different records. The result will be divided from one number got from another table. Now, the new result will be added with

Database structure

2004-04-30 Thread Alain Reymond
Hello, I would like an advise on the following problem : I have a table of patients. Each patient can make different biological assessments. Each assessment is always decomposed into different laboratory tests. A laboratory test is made of a test number and two values coming from analysers.

Mac OSX MySQL Client 4.1.1

2004-04-30 Thread Sam Peterson
My Mac mysql client does not appear to work correctly. The DB is fine and setup working great but I cannot use that version of the mysql client. Right now I'm using the 4.0.18 client on my mac. Are there known bugs with the 4.1.1 Mac OSX client? Sam Peterson

5.0 stored procedures

2004-04-30 Thread Peter Brawley
The MySQL 5.0 implementation of stored procedures is appreciated, but skeletal. Not much of it works very well. It would be very helpful indeed if the development team could give us a hint on when improvements in SP implementation might be expected. TIA. PB

Re: Mac OSX MySQL Client 4.1.1

2004-04-30 Thread Paul DuBois
At 9:26 -0600 4/30/04, Sam Peterson wrote: My Mac mysql client does not appear to work correctly. The DB is fine and setup working great but I cannot use that version of the mysql client. Right now I'm using the 4.0.18 client on my mac. Are there known bugs with the 4.1.1 Mac OSX client? Yes:

Re: SELECT HELP

2004-04-30 Thread Andre MATOS
Hi Robert, the criteria for the record_1 and record_15 is that both are in the same table, but in different records and to find each one it is necessary to perform a WHERE clause. Let's I give you the real example: My problem is while inserting a new record in my table named

One Mysql For loads and one for query

2004-04-30 Thread rmck
I have a Mysql db that is loaded with about 500,000 records a night using LOAD DATA INFILE. This goes on for a month then a new table is created and so on. Then data is then just queryed nothing else. To take some stress off of this server I was wondering if there is a way to have One Mysql

Re: 5.0 stored procedures

2004-04-30 Thread Paul DuBois
At 10:42 -0500 4/30/04, Peter Brawley wrote: The MySQL 5.0 implementation of stored procedures is appreciated, but skeletal. Not much of it works very well. It would be very helpful indeed if the development team could give us a hint on when improvements in SP implementation might be expected.

triggers

2004-04-30 Thread joe collins
Hi Are there any plans to have triggers introduced into MySQL? Regards Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: triggers

2004-04-30 Thread Josh Trutwin
On Fri, 30 Apr 2004 17:04:57 +0100 joe collins [EMAIL PROTECTED] wrote: Are there any plans to have triggers introduced into MySQL? version 5.1 - probably a ways off with 5.0 still alpha. http://dev.mysql.com/doc/mysql/en/ANSI_diff_Triggers.html -- MySQL General Mailing List For list

Re: triggers

2004-04-30 Thread Paul DuBois
At 17:04 +0100 4/30/04, joe collins wrote: Hi Are there any plans to have triggers introduced into MySQL? http://dev.mysql.com/doc/mysql/en/Roadmap.html -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com -- MySQL General Mailing List For list archives:

Re: triggers

2004-04-30 Thread Paul DuBois
At 10:17 -0500 4/30/04, Josh Trutwin wrote: On Fri, 30 Apr 2004 17:04:57 +0100 joe collins [EMAIL PROTECTED] wrote: Are there any plans to have triggers introduced into MySQL? version 5.1 - probably a ways off with 5.0 still alpha. That's true, but if history is any guide, the very next posting

Re: Create a table from SHOW TABLE STATUS ?

2004-04-30 Thread Garth Webb
On Fri, 2004-04-30 at 06:03, Richard A. DeVenezia wrote: I'm running 4.1.1a-alpha-max-nt using innodb tables with foreign keys . I know how to use SHOW TABLE STATUS to see the referential linkages in the COMMENT column. Supppose I am typing away in MySQL monitor: Q: Is there a way to

Re: triggers

2004-04-30 Thread Jochem van Dieten
Paul DuBois wrote: At 10:17 -0500 4/30/04, Josh Trutwin wrote: On Fri, 30 Apr 2004 17:04:57 +0100 joe collins [EMAIL PROTECTED] wrote: Are there any plans to have triggers introduced into MySQL? version 5.1 - probably a ways off with 5.0 still alpha. That's true, but if history is any guide, the

Re: One Mysql For loads and one for query

2004-04-30 Thread rmck
I thought I could use mysqlimport, but I notice that the text files need to be the same name as the table. My text files are named with a time stamp every hour so I have 24 files that get loaded. And the table name is nothing like the text files names. Is there a way to have mysqlimport

Re: One Mysql For loads and one for query

2004-04-30 Thread Paul DuBois
At 10:34 -0700 4/30/04, rmck wrote: I thought I could use mysqlimport, but I notice that the text files need to be the same name as the table. My text files are named with a time stamp every hour so I have 24 files that get loaded. And the table name is nothing like the text files names. Is

Re: triggers (or too-many-crappy-questions)

2004-04-30 Thread David Griffiths
That's true, but if history is any guide, the very next posting on this subject will contain the question: So, when will 5.1 be available as a production release? When we were evaluating databases, I looked both at Postgres, SAPDB, and MySQL. I've been subscribed to the MySQL and Postgres

Another Trailing Spaces Issue

2004-04-30 Thread John Mistler
The TINYTEXT format solves the problem of storing the string with spaces at the end. Now, I'm having trouble SELECTING a row WHERE the TINYTEXTcolumn = theStringWithTheSpacesAtTheEnd; If the string is theString + space and another row has an entry with theString (+ no space), the query returns

Re: triggers (or too-many-crappy-questions)

2004-04-30 Thread Chris W
David Griffiths wrote: Maybe a new MySQL list is needed - one called Dumb Questions, and when someone posts one to any other list, someone can quickly respond, Please repost this on the MySQL Dumb Questions list, as that's where it belongs. The footer for the Dumb Questions list should be, This

Re: Another Trailing Spaces Issue

2004-04-30 Thread Chris W
John Mistler wrote: The TINYTEXT format solves the problem of storing the string with spaces at the end. Now, I'm having trouble SELECTING a row WHERE the TINYTEXTcolumn = theStringWithTheSpacesAtTheEnd; If the string is theString + space and another row has an entry with theString (+ no space),

Re: triggers (or too-many-crappy-questions)

2004-04-30 Thread Eric
Hi, Can we have list for people who just like to give newbies shit? How about [EMAIL PROTECTED] How much have you guys paid for your support hmm? This is a free mailing list and I don't really see why people have to moan about a few simple questions every once in a while. The people who moan

Re: Database structure

2004-04-30 Thread Daniel Clark
I used to program for a medical tester. I used method 2: 2 - a table with 60 rows for one assessment : results(#assessment_nr, labtest_nr, p, d) where p and d are my two results. The BIG advantage was changes to the tests, adding new ones, or deleting fields. Made it much more flexible.

Group By Order By problem

2004-04-30 Thread Erich Beyrent
Hi all, I am trying to get a bunch of results, group them by category, and then order each group of categories. My query is thus: SELECT l.CatalogNumber, l.MP3Name, l.PDFLink, l.PDFName, l.Title, p.PublisherName, c.ComposerLname,

mysql-3.23.35.0 on AIX 4.3: CPU Hog

2004-04-30 Thread Paul Sue
Hi, I downloaded mysql-3.23.35.0 for AIX 4.3 from bullfreeware.com and as I soon as I start mysqld, it starts consuming almost all the CPU (hovers around 97%). Any idea what might be the cause of this?? Thanks, Paul

problem (bug?) with LOCATE(substr,str,pos)

2004-04-30 Thread Boris Mueller
Hi I need to do a LOCATE(substr,str,pos) request where pos must be taken from a column. for unknown reason (bug?) it does not work. I made the following example to ilustrate the problem: select ERW, locate('xyz', A, 3000) as loc1, locate('xyz', A, ERW) as loc2 from B;

Re: Database structure

2004-04-30 Thread beacker
The schema is : Patients(#patient_nr,name,etc...) Assessment(#assessment_nr, #patient_nr, assessment_type, other usefull values). Assessment_types(assessment_type, labtest_nr) An assessment is composed of different tests, let's say assessment type 1 is composed of lab test 1,2,3,5 and

Re: Another Trailing Spaces Issue

2004-04-30 Thread Stephen E. Bacher
If the string is theString + space and another row has an entry with theString (+ no space), the query returns BOTH rows. Is there a way to get around returning the latter entry? You could do something like: select stuff from mytable where stuff = 'foo ' and length(stuff) = 4; -- Steve

date format problem

2004-04-30 Thread Matt Tucker
Hi, I'm moving a JavaServlet app over from Tomcat on Win2K with a MS SQL 7 DB to Tomcat on Red Hat Linux with mySQL. Of course, there's about a hundred queries that use dates and of course, they're all in the format mm-dd-. is there a way to format the date column in my mysql tables to

Reports

2004-04-30 Thread lga2
hi, Is there a way to do report writing from Mysql databases? I want to transfer all the records from Mysql to a file. i used the Into OUTFILE but it doesnt display properly.I want to diplay it properly like records or reports. is there a way?? Thanks, Liz -- MySQL General Mailing List

Re: Reports

2004-04-30 Thread Stephen E. Bacher
Is there a way to do report writing from Mysql databases? I want to transfer all the records from Mysql to a file. i used the Into OUTFILE but it doesnt display properly.I want to diplay it properly like records or reports. I wrote a basic Perl script to prettify the output of a MySQL

Re: Reports

2004-04-30 Thread David Griffiths
EMS MySQL Manager (costs about $120 US) has a nice report-design and generation facility in addition to many other great things. Also, you could connect to your DB with PERL or Java, select your data out, and generate your reports in any format you wish. David. - Original Message - From:

[MYSQL] Multiple instances of server starting

2004-04-30 Thread jim
Hi, I've just set up a mySQL server and, upon starting it, and running ps ax | grep mysql , it appears that there are multiple instances running: [EMAIL PROTECTED] var]# ps ax | grep mysql 7808 pts/0S 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/var

Re: Reports

2004-04-30 Thread Bob Ramsey
[EMAIL PROTECTED] wrote: hi, Is there a way to do report writing from Mysql databases? I want to transfer all the records from Mysql to a file. i used the Into OUTFILE but it doesnt display properly.I want to diplay it properly like records or reports. is there a way?? Thanks, Liz You

RE: Reports

2004-04-30 Thread electroteque
i'm using an app called report manager, its a report designer for linux and windows done in delphi and kylix. -Original Message- From: Bob Ramsey [mailto:[EMAIL PROTECTED] Sent: Saturday, May 01, 2004 8:36 AM To: [EMAIL PROTECTED] Subject: Re: Reports [EMAIL PROTECTED] wrote: hi,

INTO OUTFILE

2004-04-30 Thread lga2
hi, I am trying to put the output of certain queries into a file using SELECT * INTO OUTFILE FILENAME FROM TABLE NAME WHERE CONDITION; I am able to see the file and the records are there. But is there a way I can see one record per line??? If i do the above i see all the records continously

Re: [MYSQL] Multiple instances of server starting

2004-04-30 Thread Paul DuBois
At 18:02 -0400 4/30/04, jim wrote: Hi, I've just set up a mySQL server and, upon starting it, and running ps ax | grep mysql , it appears that there are multiple instances running: [EMAIL PROTECTED] var]# ps ax | grep mysql 7808 pts/0S 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe

Re: INTO OUTFILE

2004-04-30 Thread Paul DuBois
At 19:18 -0400 4/30/04, [EMAIL PROTECTED] wrote: hi, I am trying to put the output of certain queries into a file using SELECT * INTO OUTFILE FILENAME FROM TABLE NAME WHERE CONDITION; I am able to see the file and the records are there. But is there a way I can see one record per line??? If i

Re: INTO OUTFILE

2004-04-30 Thread Dan Bowkley
If you're using notepad to view it, it'll display it all as one line because notepad only recognises the complete CR/LF as a new line. A CR or an LF by themselves will just show up as a square, non-displayable character and won't break the line. Wordpad, on the other hand, understands that a CR