Re: How to Run SQL Commands from a Text File stably?

2001-11-12 Thread Denis Hammond
Giuseppe Maxia wrote: 12/11/2001 05:32:28, PI Xu [EMAIL PROTECTED] wrote: Hi, Buddies: I used perl to run sql commands from a Text file, it always can't finish totally and report error in unstable lines . The error report that sql syntax error, but the syntax is same, just same, and

Accessing mysql database from a servlet

2001-11-12 Thread Luigi Fonti
I can't access mysql databases from servlets, using mmjdbc. When a servlet tries to execute: Connection conn = DriverManager.getConnection( jdbc:mysql://archive.infn.it/work?user=...password=...); it always gets this exception: java.sql.SQLException: Cannot connect to MySQL server on

Re: Cannot add blob data to innodb table

2001-11-12 Thread Stephen Lee
Hi Heikki, Comments inserted in text below: Steve, Date: Mon, 12 Nov 2001 08:52:54 To: [EMAIL PROTECTED] From: Heikki Tuuri [EMAIL PROTECTED] Subject: Re: Cannot add blob data to innodb table Stephen, Hi, I have an Access97 table containing binary fields (gifs) that I would like to migrate

Re: Cannot add blob data to innodb table

2001-11-12 Thread Heikki Tuuri
Stephen, At 12:53 AM 11/12/01 -0800, you wrote: Hi Heikki, Comments inserted in text below: Steve, Date: Mon, 12 Nov 2001 08:52:54 To: [EMAIL PROTECTED] From: Heikki Tuuri [EMAIL PROTECTED] Subject: Re: Cannot add blob data to innodb table Stephen, Hi, I have an Access97 table containing

Re: Accessing mysql database from a servlet

2001-11-12 Thread Nguyen Trong Phuc
i think you should check the privileges : grant all on work.* to user@host identified by pass check again the host, because host in servlet seem does not like in another application. i'm working on my own computer, MySQL query from PHP is my domain, but from servlet is localhost :) u should test:

Re: pass variable in JS to php and mysql-query

2001-11-12 Thread M . Hompus
I'm working in an application using JS with ASP and MSQL. We use Remote Scripting for real-time updating and reading the Database without reloading a page or move to another page. It works very well. More details on this one can be found at http://msdn.microsoft.com/scripting/ I guess it isn't

Adding LoginName and Passwords programmatically

2001-11-12 Thread Norman Khine
Hello, I have a database of about 40K members, which I want to port to MySQL. This is not the problem, my problem is that I have the following table: CREATE TABLE Person ( PersonID int(11) NOT NULL auto_increment, Title varchar(10) default NULL, FirstName varchar(35) NOT NULL default '',

Re: C API mysql_query() malfunctioning (long)

2001-11-12 Thread M. A. Alves
So you mean to replace joining with combined condition? I think it is simply a terminological/syntactical difference. I simply never use LEFT JOIN commands. I always use '='. I think they do the same think, namely what is called a join in relational _theory_. I *understand* '=' better then

Any possibility for userstamp column type?

2001-11-12 Thread Rich Bartell
It occurred to me that a column type that functioned similar to timestamp but for the id of user initiating the update would be very useful. What I mean is a column that would automatically capture the userid that last changed a row, much as a first timestamp column is automatically updated to

Re: Using MySQL++ with CodeWarrior 7

2001-11-12 Thread Sinisa Milivojevic
Brice Ruth writes: Greetings list members. I'm trying to build an application for OS X using CW7 - and though I've gotten mysql++ to build and install properly (from the command line, using configure gcc) - I can't seem to get CW happy with using mysql++ ... when I include the sqlplus

how to auto_decrement a primary key?

2001-11-12 Thread yilmaz
Hi all, i want to keep the track of row numbers to display the results , say, five by five. the most common way to do this is defining a column which is auto_incrementing and not null. but htere is a problem with this approach. say, i have a table which stores the subject and contents of

RE: how to auto_decrement a primary key?

2001-11-12 Thread Don Read
On 12-Nov-2001 yilmaz wrote: Hi all, i want to keep the track of row numbers to display the results , say, five by five. the most common way to do this is defining a column which is auto_incrementing and not null. but htere is a problem with this approach. say, i have a table which stores

MySQL and Physical strorage

2001-11-12 Thread Sebastien Dubois
Hello my name is Sebastien and i am french student in database administration. I'm searching for vues or tables in MySQL like dba_ or dbms_ in Oracle db soft. How are stored data in the files etc... Are they tablespaces, segments, extents or blocs. If exists, what is the structure of

currency: which data type?

2001-11-12 Thread Saqib Shaikh
Hi, I'm interested to know what data type people consider suitable for storing currency. In a table in my database for a university assignment, i have: create table Products( ... price double(4,2) not null, ...); However it has been suggested to me that double(4,2) is inappropriate and that

RE: problem to compile mysql on HPux 11

2001-11-12 Thread Cyril LAGUERRE
Hi I want to install MySql on my HP server. I take the source and : I have made a ./configure then # make No suffix list. make all-recursive No suffix list. Making all in include No suffix list. Making all in Docs Making all in readline gcc -DUNDEF_THREADS_HACK -DHAVE_CONFIG_H

multiple cpus

2001-11-12 Thread Alex Ranaldi
Hello, Will a single instance of MySQL use multiple CPU's? I didn't see anything about it in the docs... Thanks - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/

auto_increment counter changes even if query fails

2001-11-12 Thread Maciek Dobrzanski
Hi, Is this correct for MySQL to increment the auto_increment counter if the INSERT query fails? For example: mysql CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; Query OK, 0 rows affected (0.25 sec) mysql INSERT INTO test

Re: FROM clause order matters?

2001-11-12 Thread Sinisa Milivojevic
[EMAIL PROTECTED] writes: Description: We recently tried to upgrade from mysql 3.23.27 to 3.23.43 - we switched back caused by we sometimes recieved different results with 3.23.43. The statements below gives the same result with 3.23.27 but not with 3.23.43. Apperently it matters in what

Re: Problem: myisamchk: error: Checksum for key....

2001-11-12 Thread Sinisa Milivojevic
Grzegorz Paszka writes: Hi. I've problem with mysql. I had i386 RH71 (kernel 2.4.13, 1.5GB RAM, single procesor) with mysql 3.23.36 (now I have 3.23.41 and problem still exists). I run myisamchk on table zawartosc: [root@tygrys rpm]# myisamchk -c -i -v -w zawartosc Checking MyISAM

MySQL Developer's Handbook

2001-11-12 Thread Rick Emery
Jeremy, I was just cruising amazon.com for MYSQL books and I noted you have a MYSQL book due-out in January. Will it cover version 4.0? Since mySQL vers 4.1 is due out soon, do you intend to await the book's release to cover the additional functionality, such as sub-SELECTS? What dose the

Re: updating cached query results as database changes?

2001-11-12 Thread Sinisa Milivojevic
Bennett Haselton writes: I don't know if MySQL handles this, but if a database system knows about a particular type of query that is executed very often (either you enter this query manually as a common query, or the database detects it), can you instruct the DBMS to cache the results of

Re: auto_increment counter changes even if query fails

2001-11-12 Thread Heikki Tuuri
Maciek, Hi, Is this correct for MySQL to increment the auto_increment counter if the INSERT query fails? For example: mysql CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; Query OK, 0 rows affected (0.25 sec) mysql INSERT INTO

Re: Compiling of Mysql++ 1.7.9 under RH7.1

2001-11-12 Thread Sinisa Milivojevic
Rasmus Theede writes: When I try to compile any of the examples in mysql++ I get the errors (RedHat 7.1): In file included from /usr/local/include/sqlplus.hh:9, from simple1.cc:3: /usr/local/include/defs:5:19: mysql.h: No such file or directory In file included from

Re: auto_increment counter changes even if query fails

2001-11-12 Thread Heikki Tuuri
Maciek, Hi, Is this correct for MySQL to increment the auto_increment counter if the INSERT query fails? For example: mysql CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; Query OK, 0 rows affected (0.25 sec) mysql INSERT INTO

Re: auto_increment counter changes even if query fails

2001-11-12 Thread Heikki Tuuri
Maciek, Hi, Is this correct for MySQL to increment the auto_increment counter if the INSERT query fails? For example: mysql CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; Query OK, 0 rows affected (0.25 sec) mysql INSERT INTO

Re: auto_increment counter changes even if query fails

2001-11-12 Thread Heikki Tuuri
Maciek, Hi, Is this correct for MySQL to increment the auto_increment counter if the INSERT query fails? For example: mysql CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; Query OK, 0 rows affected (0.25 sec) mysql INSERT INTO

Re: auto_increment counter changes even if query fails

2001-11-12 Thread Heikki Tuuri
Maciek, Hi, Is this correct for MySQL to increment the auto_increment counter if the INSERT query fails? For example: mysql CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; Query OK, 0 rows affected (0.25 sec) mysql INSERT INTO

Re: auto_increment counter changes even if query fails

2001-11-12 Thread Heikki Tuuri
Maciek, Hi, Is this correct for MySQL to increment the auto_increment counter if the INSERT query fails? For example: mysql CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; Query OK, 0 rows affected (0.25 sec) mysql INSERT INTO

Re: Any possibility for userstamp column type?

2001-11-12 Thread Sinisa Milivojevic
Rich Bartell writes: It occurred to me that a column type that functioned similar to timestamp but for the id of user initiating the update would be very useful. What I mean is a column that would automatically capture the userid that last changed a row, much as a first timestamp column is

Re: Any possibility for userstamp column type?

2001-11-12 Thread Carl Troein
Sinisa Milivojevic writes: Rich Bartell writes: It occurred to me that a column type that functioned similar to timestamp but for the id of user initiating the update would be very useful. No, no plans. This feature is very easy to implement in the application program and there are not

Re: lost in the Land of Oz Parking Lot

2001-11-12 Thread Kevin Donnelly
Hi Jason On Friday 09 November 2001 00:26, [EMAIL PROTECTED] wrote: I am lost. I am a very VERY green newbie, and I am struggling on just how to begin. Basically, I have bought a book, entitled, PHP and MYSQL Web Development . , I have downloaded mysql-3.23.43.tar.gz, the install for

lcc-win32 couldn't compile..........

2001-11-12 Thread Syed Ali Dost Ali Dost
Hi I'm new mySQL user (on Windows). I tried to compile run the example C code myTest.c using lcc-win32 IDE but it throws errors. Although I put proper header path at setting...I think there is some problem with linker. I also included the libmysql.lib file but in vain.. When

RE: How to Run SQL Commands from a Text File stably?

2001-11-12 Thread Daniel J McDonald
I used perl to run sql commands from a Text file, it always can't finish totally and report error in unstable lines . The error report that sql syntax error, but the syntax is same, just same, and many sql lines; Would you please tell me what this happen and how to resolve it? What you ought to

v3: delete based on select

2001-11-12 Thread Kevin Donnelly
I'm using 3.23.37, and I am taking a random subset of records from a table, and putting them into another table: insert into targettable select * from sourcetable; I then want to delete these records from the source table. I have tried various permutations of: delete from sourcetable select *

Re: Large MySQL setup

2001-11-12 Thread Aaron Williams
Hi, Here is what I understand: your queries are already very optimized, you have already played with database scheme and application optimisations so there is little chance to find any gain there. Your setup seems to be right according to disc I/O and RAM since all indexes fit in RAM and you

MySQL 4.0 on FreeBSD?

2001-11-12 Thread Alexei V. Alexandrov
Hellow everyone, I have got a problem building MySQL 4.0 under FreeBSD 4.3-STABLE. So whats went wrong: I was trying to build mysql from a source tarball which i downloaded, unpacked it and created a standart build script which i use to build mysql on our servers: ==[cat build.sh]== #!/bin/sh

where do you hide the temp files?

2001-11-12 Thread Kay Bowen
Hi all, I am running MySQL 3.23.38 on a Sun Solaris 8 platform. During my program's execution, I get an Lost connection to server error and it terminates. This occurred during creation of an index on an existing table. I'll need help with this error once I get my machine back. When the

Re: load_file problem

2001-11-12 Thread Gerald Clark
Does the user mysql have search and read permissions to the directroy and file you are trying to load? Venugopal Allavatam wrote: Hi All! I am sorry that I posted that message with a syntactical error. but what i meant to write was this.. insert into table_name(field_name1,data_file)

'too many connections'

2001-11-12 Thread Christopher Book
Hi, My website database allows 300 connections, but every once and a while the database stops accepting new connections saying that there is too many. PHP *should* automatically close connections when my scripts end, but perhaps its not doing that. Anyhow, is there a way to have my connections

Re: 'too many connections'

2001-11-12 Thread Alexei V. Alexandrov
Hi, My website database allows 300 connections, but every once and a while the database stops accepting new connections saying that there is too many. PHP *should* automatically close connections when my scripts end, but perhaps its not doing that. Anyhow, is there a way to have my

Re: 'too many connections'

2001-11-12 Thread Christopher Book
No, I'm not using mysql_pconnect, and my apache configuration seems fine. I don't have very many users at the moment so there is no reason for the connections filling up. This can be due to your apache configuration. do you use mysql_pconnect function in php. Check you apache setting agains

Help with aggregate query

2001-11-12 Thread John Morrissey
I'm logging RADIUS detail records to a MySQL database. Currently, I crunch the the detail table (containing individual records) once a month into another table that contains aggregate usage (monthly_usage). CREATE TABLE monthly_usage ( UserName varchar(32) NOT NULL, Realm varchar(64) NOT

RE: Help with aggregate query

2001-11-12 Thread Johnson, Gregert
SELECT SUM(d.AcctSessionTime) + IFNULL(m.Minutes, 0) FROM detail d LEFT OUTER JOIN monthly_usage m ON d.UserName = m.UserName WHERE d.UserName = 'foo'; Or, to summarize for all users: SELECT d.UserName as user, SUM(d.AcctSessionTime) + IFNULL(m.Minutes, 0) FROM detail d LEFT OUTER JOIN

Unique and case-insensitivity with indexes

2001-11-12 Thread Fulko Hew
I am using mySQL 3.22.4a-beta yes, I know its old :-( I have just stumbled across a problem with how it treats 'uniqueness' in table contents. I have a table with a column defined as: create table test (name varchar(80) not null); alter table test ADD UNIQUE (name), ADD INDEX (name);

Lots of Aborted Connections and Signal 11s

2001-11-12 Thread Jonathan Hilgeman
I run PHP 4.0.3 and MySQL 3.23.32. I get a fair amount of traffic and host about 1000 very small sites on a fairly fast server with plenty of RAM and space. However, it keeps shutting down frequently and every time it shuts down, the binary log files rotate, and someone will probably try to

Re: Unique and case-insensitivity with indexes

2001-11-12 Thread Bill Adams
Fulko Hew wrote: I am using mySQL 3.22.4a-beta yes, I know its old :-( I have just stumbled across a problem with how it treats 'uniqueness' in table contents. I have a table with a column defined as: create table test (name varchar(80) not null); alter table test ADD UNIQUE

Re: Re: MySQL installation problem

2001-11-12 Thread Boyd Lynn Gerber
database,sql,query,table You have written the following: You need to get gcc-2.95.2 over newer. It is available on the stage.caldera.com site. or http://www.caldera.com/skunkware. Good Luck, -- Boyd Gerber [EMAIL PROTECTED] ZENEZ 3748 Valley Forge Road, Magna Utah 84044 Office

RE: Unique and case-insensitivity with indexes

2001-11-12 Thread Christopher Book
If you create your columns with the 'binary' parm (look in the manual), then all the comparisons will be case-sensitive. Can anyone either point out what I am doing wrong, or a workaround? database, mysql, table -

Re: Unique and case-insensitivity with indexes

2001-11-12 Thread Fulko Hew
Bill Adams [EMAIL PROTECTED] replied: Fulko Hew wrote: I am using mySQL 3.22.4a-beta yes, I know its old :-( I have just stumbled across a problem with how it treats 'uniqueness' in table contents. I have a table with a column defined as: create table test (name

Re: Unique and case-insensitivity with indexes

2001-11-12 Thread Giuseppe Maxia
12/11/2001 17:34:07, Fulko Hew [EMAIL PROTECTED] wrote: I am using mySQL 3.22.4a-beta yes, I know its old :-( I have just stumbled across a problem with how it treats 'uniqueness' in table contents. I have a table with a column defined as: create table test (name varchar(80) not null);

Re: Cannot add blob data to innodb table

2001-11-12 Thread Stephen Lee
how do you communicate the binary strings to MySQL? From the manual I found: If you want to insert binary data into a BLOB column, the following characters must be represented by escape sequences: NUL ASCII 0. You should represent this by `\0' (a backslash and an ASCII `0' character).

RE: v3: delete based on select

2001-11-12 Thread Carsten H. Pedersen
I then want to delete these records from the source table. I have tried various permutations of: delete from sourcetable select * from sourcetable,targettable where sourcetable.id=targettable.id; but with no luck. The archive only seems to have questions relating to multi-table

Re: Unique and case-insensitivity with indexes

2001-11-12 Thread Fulko Hew
Giuseppe Maxia [EMAIL PROTECTED] responded: The workaround is to use the attribute BINARY for your field create table test (myfield varchar(80) BINARY not null, UNIQUE KEY myfield); This way, the index is case sensitive. Unfortunately, this feature was introduced in MySQL 3.23, so your

Re: Problem: myisamchk: error: Checksum for key....

2001-11-12 Thread Grzegorz Paszka
On Mon, Nov 12, 2001 at 03:22:31PM +0200, Sinisa Milivojevic wrote: Grzegorz Paszka writes: Hi. I've problem with mysql. I had i386 RH71 (kernel 2.4.13, 1.5GB RAM, single procesor) with mysql 3.23.36 (now I have 3.23.41 and problem still exists). I run myisamchk on table

Re: Problem: myisamchk: error: Checksum for key....

2001-11-12 Thread Sinisa Milivojevic
Grzegorz Paszka writes: Yes, I say more, that I created new database and filled it by perl script from data source and I have the same situation. I think that is the best way of rebuild index file :) So what I should do in this case ? -- Grzegorz See in our manual what to do when

Fulltext search variable

2001-11-12 Thread Craig Issod
Using 3.23.32 on FreeBsd 3.2 Have gotten a sample fulltext search going, but cannot figure out how to shorten the word length to 2 o3 3, from the default 4. Yes, I've read the docs, and tried the following: Setting variable using mysqld on command line...it won't take it. Looking at the

Losing data

2001-11-12 Thread Simon Windsor
Hi I appear to have lost several records, but on doing mysqldump db the records are there. I have tried optimize|repair and the data hasn't re-appeared. Any ideas ? Simon - Before posting, please check:

Can't stop mysql

2001-11-12 Thread Lad . Gaal
Howdy, I'm running version 3.23.41 on RH7.2. For the life of me I can't figure out why I can't stop mysqld. Linuxconf was where I first noticed this where mysqld would not respond to the stop request. I then tried to reboot the box and watched the shutdown process and noticed that mysqld failed

Re: Load Data with extra field

2001-11-12 Thread Carl Troein
M. A. Alves writes: mysql database $!#$#%$ I know the feeling. :-P On Sun, 11 Nov 2001, Michael Conley wrote: . . . even though the text files that I am importing don't have the customer number of the person who submitted it, if I know the customer number . . . Where from do

Can't start mysql daemon

2001-11-12 Thread root
Description: Error message is: 02 11:31:41 mysqld started InnoDB: Warning: operating system error number 13 in a file operation. InnoDB: Cannot continue operation. 02 11:31:41 mysqld ended How-To-Repeat: Fix: Submitter-Id: Chad Smith [EMAIL PROTECTED]

Re: Fulltext search variable

2001-11-12 Thread Bill Adams
Craig Issod wrote: Using 3.23.32 on FreeBsd 3.2 Have gotten a sample fulltext search going, but cannot figure out how to shorten the word length to 2 o3 3, from the default 4. Yes, I've read the docs, and tried the following: Setting variable using mysqld on command line...it won't take

Re: Can't stop mysql

2001-11-12 Thread Bill Adams
[EMAIL PROTECTED] wrote: Howdy, I'm running version 3.23.41 on RH7.2. For the life of me I can't figure out why I can't stop mysqld. Linuxconf was where I first noticed this where mysqld would not respond to the stop request. I then tried to reboot the box and watched the shutdown process

Re: Can't stop mysql

2001-11-12 Thread Philip Daggett
I'm having the same problem. At 12:27 PM 11/12/2001 -0500, [EMAIL PROTECTED] wrote: Howdy, I'm running version 3.23.41 on RH7.2. For the life of me I can't figure out why I can't stop mysqld. Linuxconf was where I first noticed this where mysqld would not respond to the stop request. I then

Re: Can't stop mysql

2001-11-12 Thread Nguyen Trong Phuc
i don't use linuxconf. if u want to stop mysql, execute : /ect/init.d/mysql stop easiest :) Trong Phuc - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 12, 2001 9:27 AM Subject: Can't stop mysql Howdy, I'm running version 3.23.41 on RH7.2.

Re: Fulltext search variable

2001-11-12 Thread Bill Adams
Craig Issod wrote: Craig Issod wrote: Using 3.23.32 on FreeBsd 3.2 Have gotten a sample fulltext search going, but cannot figure out how to shorten the word length to 2 o3 3, from the default 4. Yes, I've read the docs, and tried the following: Setting variable using

Re: MySQL installation problem

2001-11-12 Thread ???? ?????????
- Original Message - From: Boyd Lynn Gerber [EMAIL PROTECTED] To: é×ÁÎ ðÏÎÏÍÁÒÅ× [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, November 11, 2001 5:57 PM Subject: Re: MySQL installation problem You need to get gcc-2.95.2 over newer. It is available on the stage.caldera.com

Re: Losing data

2001-11-12 Thread Bill Adams
Simon Windsor wrote: Hi I appear to have lost several records, but on doing mysqldump db the records are there. I have tried optimize|repair and the data hasn't re-appeared. Any ideas ? Not with this level of information. (Try including some sql, what you are trying to match, etc.. And

show processlist: status

2001-11-12 Thread Jeff Isom
I'm trying to understand what the status field of the SHOW PROCESSLIST command means. When I execute a query - SELECT count(*) as count from table1 where col1 like name%;, the query takes a long time to execute. The table has over 47,000,000 records and is indexed on col1. What does the status

Re: Can't stop mysql

2001-11-12 Thread Bill Adams
[EMAIL PROTECTED] wrote: I'll agree with you but - when I shutdown my linux box or restart it, it tries to stop the mysql server and it can't. The command /etc/init.d/mysqld stop should work and it isn't. The question is why can't I stop the mysql server with this command. As a matter of

Re: Fulltext search variable

2001-11-12 Thread Sergei Golubchik
Hi! On Nov 12, Craig Issod wrote: Using 3.23.32 on FreeBsd 3.2 Have gotten a sample fulltext search going, but cannot figure out how to shorten the word length to 2 o3 3, from the default 4. Yes, I've read the docs, and tried the following: Setting variable using mysqld on command

Re: MySQL installation problem

2001-11-12 Thread Boyd Lynn Gerber
On Mon, 12 Nov 2001, ? wrote: You need to get gcc-2.95.2 over newer. It is available on the stage.caldera.com site. or http://www.caldera.com/skunkware. I do this, but message is the same: gcc -03 -DDBUG_OFF -DSCO -O conf_to_src conf_tosrc.o -lcrypt -lsocket -lm Undefined

load_file problem

2001-11-12 Thread Venugopal Allavatam
Hi! I am stuck with the load_file problem... I have created the following table : create table table_name (field_number1 int unsigned primary key not null, data_field longblob not null); I then tried to load the contents of a file with permissions -rw-r--r-- located in the /home/user directory

Sub Count

2001-11-12 Thread Bradley
Howdy, I'm trying to write a select statement that produces a SUB COUNT of column PORT_STATUS where (A) PORT_STATUS = 'up' and (B) PORT_STATUS = 'down'. I'd like to do this in one statment with GROUP by LOCATION_T.ADDRESS, LOCATION_T.CITY without altering the outer select. This sort of thing is

Re: Help with aggregate query

2001-11-12 Thread John Morrissey
On Mon, Nov 12, 2001 at 11:14:21AM -0500, Johnson, Gregert wrote: % SELECT SUM(d.AcctSessionTime) + IFNULL(m.Minutes, 0) % FROM detail d LEFT OUTER JOIN monthly_usage m ON d.UserName = m.UserName % WHERE d.UserName = 'foo'; % % Or, to summarize for all users: % % SELECT d.UserName as user,

primary key based on unique value for two columns

2001-11-12 Thread Brendin
I would like to have a table that has a primary key defined on a combination of two columns in the table. In other words a unique key based upon the values in two columns. I don't think I am able to do this in mysql. I think you can only have a primary key on one column and not on a

Re: Can't stop mysql

2001-11-12 Thread Lad . Gaal
The only reference to mysqladmin is for the reload at the end. I think this whole thing started after doing the mysql_install_db and then creating the root password - but it may be a coincidence. Any and all help is welcome as to why /etc/init.d/mysqld stop fails. The /etc/init.d/mysql is as

RE: load_file problem

2001-11-12 Thread Rick Emery
Are you trying to load the contents of a file with an INSERT statement? If so, you can't. The values MUST be constants. What are your really trying to do? -Original Message- From: Venugopal Allavatam [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 12:26 PM To: Sinisa

Managing replication

2001-11-12 Thread Jeremy Wilson
I have a fairly complicated one-way replication set-up, whereby we have multiple master servers and multiple slaves, all replicating unrelated databases from one to another. It's set up and works, but not reliably. Pretty much every day I come into work to find one machine is no longer

Re: Can't stop mysql

2001-11-12 Thread Bill Adams
[EMAIL PROTECTED] wrote: The only reference to mysqladmin is for the reload at the end. I think this whole thing started after doing the mysql_install_db and then creating the root password - but it may be a coincidence. Any and all help is welcome as to why /etc/init.d/mysqld stop fails.

Re: Cannot add blob data to innodb table

2001-11-12 Thread Heikki Tuuri
Hi! At 08:57 AM 11/12/01 -0800, you wrote: how do you communicate the binary strings to MySQL? From the manual I found: If you want to insert binary data into a BLOB column, the following characters must be represented by escape sequences: NUL ASCII 0. You should represent this by

RE: load_file problem

2001-11-12 Thread Rick Emery
oops...I'm wrong...you can load that way. -Original Message- From: Rick Emery Sent: Monday, November 12, 2001 12:56 PM To: [EMAIL PROTECTED] Subject: RE: load_file problem Are you trying to load the contents of a file with an INSERT statement? If so, you can't. The values MUST be

mysql+java: how to use LOAD DATA LOCAL INFILE

2001-11-12 Thread Pawe Szczerba
Hi ! If off-topic, forgive me, please. Environment: Win98 / mysql3.23.42-max / mm.mysql-2.0.7 / jdk1.3.1 Description: I'm trying to load data from file to table using following query: LOAD DATA LOCAL INFILE 'C:\\WINDOWS\\TEMP\\rec222.txt' INTO TABLE ext_call_info_ip FIELDS TERMINATED BY '\t'

RE: primary key based on unique value for two columns

2001-11-12 Thread Rick Emery
Yes, you can have multi-column keys. see the manual, para. 6.5.3 CREATE TABLE Syntax -Original Message- From: Brendin [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 12:37 PM To: [EMAIL PROTECTED] Subject: primary key based on unique value for two columns I would like to

Re: primary key based on unique value for two columns

2001-11-12 Thread Bill Adams
Brendin wrote: I would like to have a table that has a primary key defined on a combination of two columns in the table. In other words a unique key based upon the values in two columns. I don't think I am able to do this in mysql. I think you can only have a primary key on one column

RE: primary key based on unique value for two columns

2001-11-12 Thread Daniel Las
Hi You are wrong. Just try for example: create table test( pk1 int not null, pk2 int not null, primary key(pk1,pk2) ); Regards Daniel £aœ e-direct Polska sp. z o.o.

RE: primary key based on unique value for two columns

2001-11-12 Thread Carsten H. Pedersen
I would like to have a table that has a primary key defined on a combination of two columns in the table. In other words a unique key based upon the values in two columns. I don't think I am able to do this in mysql. I think you can only have a primary key on one column and not on a

RE: primary key based on unique value for two columns

2001-11-12 Thread Jonathan Hilgeman
You can't use a primary key for that, but you CAN make a unique two-column key: ALTER TABLE MyTable ADD UNIQUE MyNewIndex (Column1,Column2) - Jonathan -Original Message- From: Brendin [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 10:37 AM To: [EMAIL PROTECTED] Subject:

RE: primary key based on unique value for two columns

2001-11-12 Thread Brendin
Will this relate the primary keys to one another or just create primary keys on the columns. Ie: Create table test (column1 int(11) not null, column2 int(11) not null, primary key (column1, column2) ) Then could you... Insert into test values (1,2) Insert into test values (1,3) Note that the

RE: primary key based on unique value for two columns

2001-11-12 Thread Brendin
This will work thanks... That's what I want a unique key based on two columns. -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 12:09 PM To: 'Brendin'; [EMAIL PROTECTED] Subject: RE: primary key based on unique value for two

Fulltext search - How to index c++

2001-11-12 Thread Gordan Bobic
Hi. What do I need to do to make FTS index things like c++? I have tried setting ft_min_word_len=0 and ft_min_word_len=1 in /etc/my.cnf. Restarted the mysqld and did a RENAME on the table followed by a new CREATE TABLE and an INSERT ... SELECT to import the data back into the correctly

Re: show processlist: status

2001-11-12 Thread Heikki Tuuri
Hi! I'm trying to understand what the status field of the SHOW PROCESSLIST command means. When I execute a query - SELECT count(*) as count from table1 where col1 like name%;, the query takes a long time to execute. The table has over 47,000,000 records and is indexed on col1. What does the

Re: Losing data

2001-11-12 Thread Simon Windsor
Hi The OS is Redhat 7.1 on a dual processor Pentium box, running MySQL 3.23.36, the standard RedHat version. The machine is running two databases, one is a full archive while the other ones holds current data. The same five records are unavailable using SQL in the two databases, but using

Re: primary key based on unique value for two columns

2001-11-12 Thread primej
sure you can CREATE TABLE xx (field1 INT NOT NULL,field2 INT NOT NULL,PRIMARY KEY (field1,field2)) and you have table xx with unique key in two fields hand primoz - Original Message - From: Brendin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 12, 2001 7:37 PM

Natural Sort

2001-11-12 Thread Michael Kedl
Looking thru the MYSQL archives I see a few people had interest in a natural sort method to sort text fields containing numbers. I to would like this feature. Has anything been done for this? Currently sorts text like: 1200 - A tale of 3 dogs 3 bright lights go on Should be: 3

Re: Can't stop mysql / possible bug?

2001-11-12 Thread Lad . Gaal
I changed the script and now all is well. However I have two concerns: 1) Paranoid about the password being in this script. Is there a way around this. 2) Since I had to change the script to make it work, Is there a bug in 3.23.41?? Thanks for pointing me in the right direction. Bill Adams

Re: Can't stop mysql / possible bug?

2001-11-12 Thread Bill Adams
[EMAIL PROTECTED] wrote: I changed the script and now all is well. However I have two concerns: 1) Paranoid about the password being in this script. Is there a way around this. chown root:root /etc/rc.d/init.d/mysqld chmod go-rx /etc/rc.d/init.d/mysqld 2) Since I had to change the script

RE: primary key based on unique value for two columns

2001-11-12 Thread Jonathan Hilgeman
I have not tested this with the primary key - my previous suggestion went off the logic in my head at the time (most likely not a good thing, since I'm tired right now), but I have a feeling Bill here is probably correct if he says it's possible with the primary key as well. I stand corrected. -

how to move db

2001-11-12 Thread Lad . Gaal
I'm switching over to a bigger better faster server. My old server is running version 3.23.22-6 mysql on RH and I need to move all the db's to my new box using 3.23.41 installed on RH7.2. So do I just simply move all of the db directories from /var/lib/mysql from one box to the next or are

Re: Natural Sort

2001-11-12 Thread Dan Nelson
In the last episode (Nov 12), Michael Kedl said: Looking thru the MYSQL archives I see a few people had interest in a natural sort method to sort text fields containing numbers. I to would like this feature. Has anything been done for this? Currently sorts text like: 1200 - A tale

Mysqladmin help please help

2001-11-12 Thread Wells, Kenneth L
Please help I'm at the end of my rope... I just ran a script to create databases in my SQl server, it runs fine When it completes it says remember to set a password for the mysql root user! I entered this? /usr/local/mysql/bin/mysqladmin -u root -p password password (I want password to

  1   2   >