schem help...

2006-10-16 Thread Payne
Hi, I need some help. I got a 161 tables that I am trying to create schem on, the problem is I can get any of my boxes to show you know +---+ | | +---+ Here is the command I am doing my -Ae show tables; | while read a ; do my -Ae desc $a; echo myfile.txt ; done what I get the

group by problem

2006-10-16 Thread kalin mintchev
hi all... i have an issue with group by and ordering. apparently group by ignores 'order by id DESC'?! an example is a table that has an id and a category fields. there are a few categories under which records can be filed. so what i want is the latest record from each category by doing

Re: group by problem

2006-10-16 Thread Chris
kalin mintchev wrote: hi all... i have an issue with group by and ordering. apparently group by ignores 'order by id DESC'?! an example is a table that has an id and a category fields. there are a few categories under which records can be filed. so what i want is the latest record from each

Re: Re: Re: Re: Readind a Dump W/o Expanding It

2006-10-16 Thread Ted Johnson
8080The data field's a text field, not a blob! That's the problem, there are no blobs, and I just wanted a second set of eyes on this to confirm what simply makes no sense at all! I'd love to know where the dickens those images went!! Thanks anyway, Ted - Original Message From: Dan

Re: group by problem

2006-10-16 Thread kalin mintchev
Basically you can't do what you want either without temporary tables or using a subselect. Subselects are only available in mysql 4.1+ (I think - check the docs) so that may or may not be an option. thanks... pardon my ignorance - how would i do that using subselects? -- MySQL General

Re: group by problem

2006-10-16 Thread Chris
kalin mintchev wrote: Basically you can't do what you want either without temporary tables or using a subselect. Subselects are only available in mysql 4.1+ (I think - check the docs) so that may or may not be an option. thanks... pardon my ignorance - how would i do that using subselects?

Deadlock avoidance

2006-10-16 Thread Marcus Bointon
I've seen occasional deadlocks reported, and I'm wondering how I should avoid them, or if my approach is just wrong. I have two client processes running in PHP on different machines accessing the same database (all InnoDB on MySQL 5.0.24a). Each has an integer daemon_id which is used to

Re: group by problem

2006-10-16 Thread kalin mintchev
but that will get you all records for that category not just the most recently updated. that's the main problem, isn't it? what i'm looking for is the last record for EACH of the categories in the table. i'm aware of the aformentioned options. my problem with group by is that ignores the

Re: group by problem

2006-10-16 Thread chris smith
On 10/16/06, kalin mintchev [EMAIL PROTECTED] wrote: but that will get you all records for that category not just the most recently updated. that's the main problem, isn't it? what i'm looking for is the last record for EACH of the categories in the table. i'm aware of the aformentioned

How to get into mysql command line?

2006-10-16 Thread Cornelia Menzel
Hello! I have installed MySQL 4.1.21 on my iBook which is running Mac OS X (Tiger 10.4.8). I have installed MySQL without any problems, I activated PHP and CGI-Scripts in httpd.conf and erverything was fine. With 'mysql' I have been able to log in to the mysql command line.

Re: How to get into mysql command line?

2006-10-16 Thread Dominik Klein
The error message I receive is the following: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) This message indicates you tried to login without giving a password. Add -p to your commandline. It will then prompt you for your password and log you in if the

Re: How to get into mysql command line?

2006-10-16 Thread Cornelia Menzel
Am 16.10.2006 um 13:00 schrieb Dominik Klein: The error message I receive is the following: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) This message indicates you tried to login without giving a password. Add -p to your commandline. It will then

Re: How to get into mysql command line?

2006-10-16 Thread Dominik Klein
Unfortunately, that is not the reason, why I get this message. I have tried 'mysql', 'mysql -uroot', mysql -u root', 'mysql -uroot -p', 'mysql -uroot -pMY_PASSWORD', but anything fails. When I am using the password option, the error message is like this: ERROR 1045 (28000): Access denied for

Re: How to get into mysql command line?

2006-10-16 Thread Cornelia Menzel
Am 16.10.2006 um 13:08 schrieb Dominik Klein: Unfortunately, that is not the reason, why I get this message. I have tried 'mysql', 'mysql -uroot', mysql -u root', 'mysql -uroot - p', 'mysql -uroot -pMY_PASSWORD', but anything fails. When I am using the password option, the error message is

Re: How to get into mysql command line?

2006-10-16 Thread Anders Karlsson
The error shows that the passwords doesn't match. You just must have made some mistake when resetting the password. But this can be fixed: 1) You can start the server with the --skip-grant-tables option that disables password checking, then you log in as root, set the password, and the restart

Re: How to get into mysql command line?

2006-10-16 Thread Cornelia Menzel
Am 16.10.2006 um 13:23 schrieb Anders Karlsson: The error shows that the passwords doesn't match. You just must have made some mistake when resetting the password. But this can be fixed: 1) You can start the server with the --skip-grant-tables option that disables password checking, then

Re: How to get into mysql command line?

2006-10-16 Thread Anders Karlsson
Come to think of it, might it be that you are using an old mysql client, possibly one that exists as part of an old installation of MySQL or in the case of Linux, one that was installed as part of the Linux distro installation? Some of these older versions of MySQL Client does not support the

Re: schem help...

2006-10-16 Thread Rolando Edwards
The mysql client program never generates the fixed length, pipe layout from the shell's command line. This is only possible at mysql's command line. 1) Try this: my -Ae show tables; | while read a ; do my -Ae show create table $a; echo myfile.txt ; done 2) Try mysqldump in this manner

Highlight search keywords in Java

2006-10-16 Thread Harini Raghavan
Hello All, I am using MySQL full-text search capability in a java based search application. I have a requirement to highlight search keywords in the results obtained from MySQL database(similar to Google). I found some links to do this using a PHP script. Is this possible to do using Java?

Re: mysql within firewall

2006-10-16 Thread Peter Gershkovich
Firewall issues continue. Once again if anyone had similar problem please help. We did various tests and found out the following: LIMIT 10 , 100, 1000 works fine. On 2000 it breaks. I checked queries of different type against the same table and different tables. It works the same with

Re: How to get into mysql command line?

2006-10-16 Thread Cornelia Menzel
Am 16.10.2006 um 14:10 schrieb Anders Karlsson: Come to think of it, might it be that you are using an old mysql client, possibly one that exists as part of an old installation of MySQL or in the case of Linux, one that was installed as part of the Linux distro installation? Some of these

RE: help with update query

2006-10-16 Thread Jerry Schwartz
You might want to check for an empty string () rather than null. From what I can tell, HTML forms don't give you NULL values if you leave fields empty, they return . Unless your programs internally convert empty strings to NULL, you won't find NULL in your table. Regards, Jerry Schwartz Global

RE: change format of date fields during LOAD DATA INFILE?

2006-10-16 Thread Jerry Schwartz
I just tested it with Excel, as it will save the date as seen if you save the worksheet to a text file. I do this quite a bit, actually, to put spreadsheet data into MySQL. Often I use Excel macros to construct entire UPDATE or INSERT statements, and save those into a text file for MySQL to

MySQL Swapping problem

2006-10-16 Thread Clyde Lewis
A little confused as to why MySql is swapping when there is more than enough real memory still available on the server. I'm having a serious problem with a production server running out of swap space and in turn causing mysql to crash with the following error message. According to the TOP

LOCK TABLES

2006-10-16 Thread mdpeters
I am having a devil of a time moving a database from one server to another. My database is one that is in production to support the mediawiki wiki application. This is a Solaris Sparc 10 system using the mysql-max-5.0.20a-solaris10-sparc version. My database name is horsewiki. I execute this:

RE: Re: Re: Re: Readind a Dump W/o Expanding It

2006-10-16 Thread Jerry Schwartz
This may be too obvious, but what is in that text field? Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 -Original Message- From: Ted Johnson [mailto:[EMAIL PROTECTED] Sent: Monday, October 16, 2006

Re: change format of date fields during LOAD DATA INFILE?

2006-10-16 Thread Ferindo Middleton
I was using OpenOffice... And I couldn't get it to keep the format -mm-dd I saw on screen in that format when I went to save it as a text file I was able to I suppose this should be reported to their developers as an enhancement. There's no way to get MySQL to accept dates in a different

Re: help with update query

2006-10-16 Thread Ferindo Middleton
I agree. I should check for empty strings intead of nulls. The application doesn't convert them to null and the default value when a user leaves the field blank on the web page is to save it as an empty string. Thanks. Ferindo On 10/16/06, Jerry Schwartz [EMAIL PROTECTED] wrote: You might

CREATE TABLE Inv_Id

2006-10-16 Thread Scott Hamm
I'm trying to create a table as follows: CREATE TABLE Inv_Id ( ID INT(12) AUTO_INCREMENT PRIMARY KEY, MID INT NOT NULL, FOREIGN (MID) REFERENCES 'Model' (ID) ); How do I make ID to start out as '0001' for UPC barcode assignment? --

Re: LOCK TABLES

2006-10-16 Thread Dan Buettner
Michael, is the 'archive' table present in your database? e.g., if you do a 'LIST TABLES', does it show up? What happens if you do a SELECT * FROM archive LIMIT 1 ? I'd hazard a guess that you may have a table definition file with no actual table data files, if you're on MyISAM tables. If you

Sum DISTINCT

2006-10-16 Thread Alvaro Cobo
Dear friends: I have two tables. In one of those I store information about loans and the year it was given. The other one stores the families which have received this loans, with infromation abot the number of members in each family (male and women). Each family can receive more than one loan in

Re: CREATE TABLE Inv_Id

2006-10-16 Thread Gerald L. Clark
Scott Hamm wrote: I'm trying to create a table as follows: CREATE TABLE Inv_Id ( ID INT(12) AUTO_INCREMENT PRIMARY KEY, MID INT NOT NULL, FOREIGN (MID) REFERENCES 'Model' (ID) ); How do I make ID to start out as '0001' for UPC barcode assignment? UPC barcodes are not sequential

Re: CREATE TABLE Inv_Id

2006-10-16 Thread Dan Buettner
Hmmm. When the table is first created, the id number should default to starting at 1. Once the table has had entries added and deleted you can run an ALTER TABLE to reset it to 1, provided it is empty I think. There's no way to store an integer left-padded with zeros like that, however. What

Re: CREATE TABLE Inv_Id

2006-10-16 Thread Scott Hamm
Alright, I'll abandon UPC, I'm trying to serialize all components i.e. video cards, keyboards, sound cards, etc and when I process these info into database I would like for it to give me the image of bar code with number on bottom and small enough to put on the metal side of components i.e.

Re: CREATE TABLE Inv_Id

2006-10-16 Thread Rolando Edwards
You may want to simulate autoincrementing by means of Triggers You may need to make ID a 12 character string first. Then create a trigger something like this: CREATE TRIGGER addingInv BEFORE INSERT ON Inv_Id FOR EACH ROW SET @ID= '...' You will have to also add what Gerald mentioned (casecode

Re: CREATE TABLE Inv_Id

2006-10-16 Thread Gabriel PREDA
I would try: CREATE TABLE Inv_Id ( ID INT(12) UNSIGNED ZEROFILL AUTO_INCREMENT PRIMARY KEY, MID INT NOT NULL, FOREIGN (MID) REFERENCES 'Model' (ID) ); Note the UNSIGNED and ZEROFILL flags ! -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Gabriel PREDA Senior Web Developer -- MySQL General

Re: CREATE TABLE Inv_Id

2006-10-16 Thread Scott Hamm
Thanks! On 10/16/06, Gabriel PREDA [EMAIL PROTECTED] wrote: I would try: CREATE TABLE Inv_Id ( ID INT(12) UNSIGNED ZEROFILL AUTO_INCREMENT PRIMARY KEY, MID INT NOT NULL, FOREIGN (MID) REFERENCES 'Model' (ID) ); Note the UNSIGNED and ZEROFILL flags ! -- -- -- -- -- -- -- -- -- -- -- -- --

User Table - exposed

2006-10-16 Thread Michael DePhillips
Hello All, Cyber-security scrutiny has prompted this scenario. I like to have an anonymous login for my slave machines, with read only access, of course. There are quite a few databases that I would like them to read from, so I using a wild card granting them read privileges to all

list of cols that I need to index

2006-10-16 Thread Ahmad Al-Twaijiry
Hi is there anyway or command to run it against a production table to see if there is any column that I should think about indexing it remember this is a production database, so I can't run it in debug mode and I don't have a root access to the database (I'm just a developer). Thanks --

Re: list of cols that I need to index

2006-10-16 Thread Dan Buettner
Ahmad - It's not always a cut-and-dried thing; performance tuning involves a lot of factors, and with living databases should be an ongoing thing. Check out the section on optimization at http://dev.mysql.com/doc/refman/5.0/en/optimize-overview.html and/or Jeremy Zawodny's excellent book, High

install mysql 5.0.26 with php-5.1.6 - issues

2006-10-16 Thread Serban Ghita
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --enable-module=so --enable-cli --with-zlib-dir=/usr/include [...] checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL

Re: LOCK TABLES

2006-10-16 Thread mdpeters
As you can see, it is clearly showing up but I cannot do anything with it. mysql show tables; +-+ | Tables_in_horsewiki | +-+ | archive | | categorylinks | | externallinks | | hitcounter | | horse_archive | |

Re: LOCK TABLES

2006-10-16 Thread Dan Buettner
Try looking in the filesystem for the file(s) called archive in the database directory, and move them somewhere else (or if you know you don't need them, delete them). If it is/was a MyISAM table, or just an errant file, this should work. If it is/was InnoDB, this will be trickier ... Dan On

Re: LOCK TABLES

2006-10-16 Thread mdpeters
I tried mv archive.frm .archive.frm first. Then I ran mysqldump again. It moves past archive and onto another table. I did this 6 times, each time moving the next one it complained about until I stopped and put them all back. Dan Buettner wrote: Try looking in the filesystem for the file(s)

Re: Re: LOCK TABLES

2006-10-16 Thread Dan Buettner
Hmmm, sounds like something's pretty abnormal here. Any idea what may have been done here? I wonder if you could step around this with a call to mysqldump that doesn't explicitly lock tables ... what is the commad you're running again? Dan On 10/16/06, mdpeters [EMAIL PROTECTED] wrote: I

mysql5 onHPUX - no entry for terminal type

2006-10-16 Thread Ian Collins
Hi, I have just upgraded an HPUX 11.00 server to MySQL 5.0.26-pro. Since the upgrade, the readline seems to be broken. (It was OK on 4.1.18). We see the problem when we run, mysql -A -u user -p Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 34782 to server

Re: result set on prepared statements

2006-10-16 Thread Visolve DB Team
Hi, Hope this link will be useful: http://mirrors.sunsite.dk/mysql/doc/refman/5.1/en/c-api-prepared-statement-functions.html Thanks ViSolve DB Team - Original Message - From: Roland Volkmann [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Sunday, October 15, 2006 5:59 PM Subject: