Re: Joining tables, duplicating none

2005-10-10 Thread Joerg Bruehe
Hi Jonathan, all! Jonathan Mangin wrote: I have two tables with date and uid cols. in common. Table 1 has one row per date, Table 2 has a maximum of 7 rows per date. select t1.date, t1.val, t2.val from t1 right join t2 on t1.date = t2.date where t1.date between '2005-08-01' and '2005-08-14'

Re: Triggers

2005-10-10 Thread Ian Sales (DBA)
Steffan A. Cline wrote: Upon insert or update I get the following error: ERROR 1442 (HY000): Can't update table 'locations' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. What exactly is the meaning of this? Is there no way

creating socket

2005-10-10 Thread Octavian Rasnita
Hi, I have installed mysql and loaded mysqld, but I cannot connect to it with mysql because it gives an error telling that it cannot connect using socket /var/lib/mysql/mysql.sock. I have checked that dir, but I don't have that socket file there. Please tell me how to create it. I don't know

Re: creating socket

2005-10-10 Thread Peter
Hey, you need to tun mysql SERVERom what is the output of the command ps aux |grep mysql Peter Octavian Rasnita wrote: Hi, I have installed mysql and loaded mysqld, but I cannot connect to it with mysql because it gives an error telling that it cannot connect using socket

RE: creating socket

2005-10-10 Thread Sujay Koduri
This error means that the mysql server has not started in the first place. So try to have a look in the logs (generally this should be in /var/lib/mysql/) and find out the reason why the server hasn't started. sujay -Original Message- From: Octavian Rasnita [mailto:[EMAIL PROTECTED]

Re: creating socket

2005-10-10 Thread Octavian Rasnita
From: Sujay Koduri [EMAIL PROTECTED] This error means that the mysql server has not started in the first place. So try to have a look in the logs (generally this should be in /var/lib/mysql/) and find out the reason why the server hasn't started. sujay I have discovered that mysql creates

Message could not be delivered

2005-10-10 Thread bsekabembe
The original message was received at Mon, 10 Oct 2005 10:13:03 +0100 from educ.mak.ac.ug [70.49.161.47] - The following addresses had permanent fatal errors - mysql@lists.mysql.com - Transcript of session follows - ... while talking to host 15.180.121.117: DATA 400-aturner;

RE: creating socket

2005-10-10 Thread Sujay Koduri
Add the following entry in the my.cnf to create the socket file in the desired location. socket=/var/lib/mysql/mysql.sock (Any desired path can be given here) sujay -Original Message- From: Octavian Rasnita [mailto:[EMAIL PROTECTED] Sent: Monday, October 10, 2005 3:50 PM To: Sujay

Out of memory (Needed 8164 bytes)

2005-10-10 Thread Andrei
Hi list, i have a linux server with mysql 4.1.14 and i'm trying to execute a program wich read a file with 100's tohusands lines and for every line must do a SELECT and then an INSERT . the SELECT use 2 InnoDB tables and the INSERT use a MyISAM table. the problem is that after around 160,000

Out Of Memory problems: One MySQL user, 86 minutes sleeping

2005-10-10 Thread thomas Armstrong
Hi. Using MySQL 4.1.9 on Linux FedoraCore2 (kernel 2.6.9), I'm suffering several memory problems ('Out Of Memory' problem) on my server. Playing around with my server: SHOW PROCESSLIST Id | User | Host | db | Command | Time | State | Info 20138 | user1 | localhost | user1_db |

Re: Out of memory (Needed 8164 bytes)

2005-10-10 Thread Andrei
On Monday 10 October 2005 13:42, Hugh Sasse wrote: On Mon, 10 Oct 2005, Andrei wrote: Hi list, Hi, i have a linux server with mysql 4.1.14 and i'm trying to execute a program wich read a file with 100's tohusands lines and for every line must do a SELECT and then an INSERT .

DELETE syntax

2005-10-10 Thread mark
Hi, I need to know the syntax I can use for a certain delete statement. This is the idea: - A table with users, which has at least these fields, a user id field and a field containing its status (active, disabled, review). - A table that links certain users to each other, containing at least

Relocation of database store

2005-10-10 Thread William Fry
I'm trying to relocate the database files for MySQL 4.1 I've seen two primary techniques for doing this: 1) create/alter a my.cnf file with 'datadir' set to new location 2) moving the physical files and creating a symlink in the original location Unfortunately, neither of these methods work for

'/var/log/mysqld.log' is 2Mb. Too high?

2005-10-10 Thread thomas Armstrong
Hi. Using MySQL 4.1.9 on Linux FedoraCore2 (kernel 2.6.9), I'm suffering several memory problems ('Out Of Memory' problem) on my server. I've noticed that '/var/log/mysqld.log' is 2Mb, and '/var/log/mysqld.log.1', 'mysqld.log.2', .. are empty. Is 2Mb to high to be handled? Thank you very much.

Re: DELETE syntax

2005-10-10 Thread Remo Tex
http://dev.mysql.com/doc/mysql/en/delete.html ... Multiple-table syntax: DELETE [LOW_PRIORITY] [QUICK] [IGNORE] tbl_name[.*] [, tbl_name[.*] ...] FROM table_references [WHERE where_definition] Or: DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name[.*] [,

Re: Select values based on array containment?

2005-10-10 Thread SGreen
T.J. Mahaffey [EMAIL PROTECTED] wrote on 10/08/2005 07:09:35 PM: I'm working on a PHP script which will already have gathered a large array of string values from a text file. These values will correspond to item numbers in a MySQL table. What I need to do is select rows in the table based

Re: selecting from 2 tables

2005-10-10 Thread SGreen
Nurullah Akkaya [EMAIL PROTECTED] wrote on 10/08/2005 08:43:27 PM: i have two tables one of them is a que of urls and the other is list of urls that have been processed now i want to select a url from Que that is not in the processed urls table how can i do this in one select i do not want

Re: Relocation of database store

2005-10-10 Thread Hassan Schroeder
William Fry wrote: I'm trying to relocate the database files for MySQL 4.1 I've seen two primary techniques for doing this: 1) create/alter a my.cnf file with 'datadir' set to new location 2) moving the physical files and creating a symlink in the original location It appears that both

Re: Distance between Zip codes

2005-10-10 Thread SGreen
You might try doing exactly what you ask to speed things up. Create a temporary table to hold the results of an intermediate query from locations then use the temp table as the source data for the greater circle calculation. By limiting the distance combinations that need to be calculated by

Re: deleting rows in 2 tables

2005-10-10 Thread SGreen
Merlin [EMAIL PROTECTED] wrote on 10/09/2005 01:31:17 PM: Hi there, I am wondering if there is a possiblity to delete rows in more than one table with one query. At the moment I am doing this: I do have at the moment 3 querys!: # get table1_id SELECT table1_id from ...

Re: Relocation of database store

2005-10-10 Thread Hank
You can also create a sym-link for the seperate databases/directories, and leave my.cnf as-is. I've been doing that since 3.23, and it's never caused me any problems. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

MySQL 5.0 certification

2005-10-10 Thread Allyson Young
Has anyone been involved with the 5.0 certification program. I purchased three books in regards to 5.0 certification from MySQL but am totally unable to find anything about the new certification program on the web site. The new program is structured COMPLETELY different from the old program and

Re: Triggers

2005-10-10 Thread Steffan A. Cline
This does not work as I am drawing the information from 2 tables. I did use the NEW operator and every combination I could think of. Below I'll include the triggers and so on. What the deal is that I have a query to find locations within a certain radius. BUT from what I read in the table with

Re: Triggers

2005-10-10 Thread Steffan A. Cline
This does not work as I am drawing the information from 2 tables. I did use the NEW operator and every combination I could think of. Below I'll include the triggers and so on. What the deal is that I have a query to find locations within a certain radius. BUT from what I read in the table with

Re: MySQL 5.0 certification

2005-10-10 Thread Scott Noyes
Has anyone been involved with the 5.0 certification program. I've read that the new MySQL 5 certificates will be available about 2 or 3 months after MySQL 5 becomes a Production Release. http://db4free.blogspot.com/2005/10/mysql-5-certifications.html -- Scott Noyes [EMAIL PROTECTED] -- MySQL

UPDATE statement optimization

2005-10-10 Thread Jeffrey Santos
Hey all! I'm a very novice MYSQL user of the mentality of get it working, then get it working the right way, feeling the best way to learn is to just do it. I got things working but now I'm looking back and trying to get better efficiency out of my SQL statements. Database is setup like

Re: Triggers

2005-10-10 Thread SGreen
You could re-write your query so that you get the lat and lon for each location as you run the query. Since each location has a zip code, this just means only one extra join per query. That also means you won't need the triggers as you are looking up each locations lat and lon on the fly. The

Oracle buys InnoDb! Arghhh!

2005-10-10 Thread mos
http://www.crmbuyer.com/story/Kp6sQkF1sF59LB/Oracle-Puts-Squeeze-on-MySQL-With-Latest-Buy.xhtml How is this going to affect MySQL users? Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Lost .frm files

2005-10-10 Thread Sujay Koduri
I have changed the OS on my database server. At that time, I forgot to take the backup of the .frm files in /var/lib/mysql. I have taken all the backup of all the data files. I can recreate all the tables. How can I map these tables to existing data files. Is this possible. Please help me out as

Re: UPDATE statement optimization

2005-10-10 Thread SGreen
Jeffrey Santos [EMAIL PROTECTED] wrote on 10/10/2005 01:07:03 PM: Hey all! I'm a very novice MYSQL user of the mentality of get it working, then get it working the right way, feeling the best way to learn is to just do it. I got things working but now I'm looking back and trying to

Re: Oracle buys InnoDb! Arghhh!

2005-10-10 Thread SGreen
mos [EMAIL PROTECTED] wrote on 10/10/2005 01:26:04 PM: http://www.crmbuyer.com/story/Kp6sQkF1sF59LB/Oracle-Puts-Squeeze-on- MySQL-With-Latest-Buy.xhtml How is this going to affect MySQL users? Mike So far (check today's archives) not at all. We will have to wait to see what develops.

RE: UPDATE statement optimization

2005-10-10 Thread Jeffrey Santos
I understand and it's actually the original way I was designing the databases. Only thing that stopped me from doing it that way was the fact that the sets a user belongs to (vsets) is also dynamic, the user can change which sets he/she belongs to. Meaning that if there are 50 sets and 50 users

RE: UPDATE statement optimization

2005-10-10 Thread SGreen
Unless you are on a severely underpowered machine, MySQL will handle 3 million rows without any problems. If you are on such an underpowered machine, then your current process must absolutely CRAWL!!! Don't worry numbers in the millionsl when you are working with enterprise-quality database

RE: UPDATE statement optimization

2005-10-10 Thread Jeffrey Santos
Shawn, Thank you for the advice, I had a feeling you'd say something like that. Will reorganize my databases. Makes my code a little easier to follow to boot :-P Thanks again, - Jeff _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 10, 2005 1:55

Re: Triggers

2005-10-10 Thread Gleb Paharenko
Hello. I just skimmed the article on CREATE TRIGGER in the manual and don't see any prohibition against making the triggered action take place in the same table I hope this is a temporary limitation. From: http://dev.mysql.com/doc/mysql/en/news-5-0-12.html Recursive triggers are

Re: Select values based on array containment?

2005-10-10 Thread Gleb Paharenko
Hello. In my opinion you have two choices (hope someone has better :). First - you can generate dynamically your query (the IN part of your query). See definition of the IN operator at: http://dev.mysql.com/doc/mysql/en/comparison-operators.html Second available way is to create a

Re: Select values based on array containment?

2005-10-10 Thread SGreen
Gleb Paharenko [EMAIL PROTECTED] wrote on 10/09/2005 05:17:20 PM: Hello. In my opinion you have two choices (hope someone has better :). First - you can generate dynamically your query (the IN part of your query). See definition of the IN operator at:

Re: Select values based on array containment?

2005-10-10 Thread T.J. Mahaffey
In my opinion you have two choices (hope someone has better :). First - you can generate dynamically your query (the IN part of your query). See definition of the IN operator at: http://dev.mysql.com/doc/mysql/en/comparison-operators.html This would be my plan at the moment. I sought out the

LASSO TIPS for MYSQL: 3.1 THREE LIL TOYS

2005-10-10 Thread m i l e s
- Hi and Welcome to - LASSO TIPS FOR MYSQL: 3.0 I'm your host, M i l e s. First and foremost, a good place for you to start with Lasso is the following 5 things: The FIRST LASSO TIPS FOR NEWBIES -

Re: databse design and table join problems

2005-10-10 Thread Peter Brawley
Cristi, I have the following tables: ( some in Microsoft Access and some in Excel ) and I want to migrate the data into MySQL and develop an interface in PHP for easy administration and control... A few points: 1. Instead of spaces, use underscores or nothing in table names 2. If

Question about innodb, ibdata1

2005-10-10 Thread Fredrik Carlsson
Hi, I'm using InnoDB with tablespaces for almost all tables. The last few week the file ibdata1 has started to grow, should it really do this when using tablespaces? i did an alter on one of the bigger tables some time ago to alter the size of a varchar collumn, could this has something to

Re: databse design and table join problems

2005-10-10 Thread inferno
Hi, First of all thank you for your reply. The table names I've wrote in the e-mail were just for info, I do use underscore instead of space, as you can see I do the same for the fields in the table. In theory it is simple but I need some help on how that will be translated to mysql,

How do you set a Primary Key when uploading data into a table?

2005-10-10 Thread Bill Abel
How do you load data into a table and generate a primary key which increments by 1. I want to end up with a primary key value of int 1, 2, 3, 4, and so on. My table has three rows, Id, Code, Description. I'm loading data from a text file into the table like this: load data local infile

Re: databse design and table join problems

2005-10-10 Thread Peter Brawley
Cristi, In theory it is simple but I need some help on how that will be "translated" to mysql, I have a concept in mind, but I do not know how to exactly apply it to the situation. I am in a situation where I have the data gathered from more persons and everybody had a personal way of

Help on writing a sql statement

2005-10-10 Thread Imran
Hi all: I need some help in writing a sql statement. I have three tables (Sales, Cust and Product). The sales table contains a large volume of data and I want to create a sql to group the sales table then join the resultant to both the Cust and Prod and to have additional fields selected

SOCKET directory

2005-10-10 Thread Barbara Deaton
With MySQL 4.0 when I wanted to run my application on any of the unix boxes I had to set the MYSQL_UNIX_PORT environment variable to point to the location of my socket file. Looking through my 4.1.9 install I no longer see a mysql/socket directory. However, when I try to connect I get the

Re: Help on writing a sql statement

2005-10-10 Thread SGreen
Imran [EMAIL PROTECTED] wrote on 10/10/2005 03:52:21 PM: Hi all: I need some help in writing a sql statement. I have three tables (Sales, Cust and Product). The sales table contains a large volume of data and I want to create a sql to group the sales table then join the resultant to both

Query help

2005-10-10 Thread John Nichel
Hi, I have this query below, and I have been pulling my hair out for the past couple of hours trying to get it to do what I want. As is, it works, but I need it to consider other conditions. One of the columns in the products table is called groupid. I need it to pull all products with a

Re: databse design and table join problems

2005-10-10 Thread inferno
Hi, I have the data from MS Access to MySQL, half imported by now, that is not the problem, the same with importing from excel files. The problem is how can I get all the data in one big table ? Best regards, Cristian Stoica Peter Brawley wrote: Cristi, In theory it is simple

How do you set a Primary Key when uploading data into a table?

2005-10-10 Thread Bill Abel
How do you load data into a table and generate a primary key which auto increments by 1. I want to end up with a primary key value of int 1, 2, 3, 4, and so on. My table has three rows, Id (pri_key), Code, Description. I'm loading data from a text file into the table like this: load data

Re: How do you set a Primary Key when uploading data into a table?

2005-10-10 Thread Fredrick Bartlett
If you are clearing table. Truncate will reset auto_increment to 0 - Original Message - From: Bill Abel [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Monday, October 10, 2005 12:10 PM Subject: How do you set a Primary Key when uploading data into a table? How do you load data into

Re: How do you set a Primary Key when uploading data into a table?

2005-10-10 Thread Greg Donald
On 10/10/05, Bill Abel [EMAIL PROTECTED] wrote: How do you load data into a table and generate a primary key which auto increments by 1. I want to end up with a primary key value of int 1, 2, 3, 4, and so on. My table has three rows, Id (pri_key), Code, Description. I'm loading data from a

Suppress table header when using ODBC

2005-10-10 Thread Gerald Taylor
Hello, I am using a desktop program that imports data from a mysql database using the ODBC mysql driver and everything works fine except for one little glitch: it adds one extra row at the beginning of the dataset with the names of the columns in it. I need for that column name row to NOT

Re: Easy or not so easy GROUP BY

2005-10-10 Thread Ed Reed
Can anyone please help me with this? I'm just not getting it. - Thanks Ed Reed [EMAIL PROTECTED] 10/6/05 2:50:46 PM Thanks for the reply, Sorry; I'm using 4.1.11 Thanks again. Pooly [EMAIL PROTECTED] 10/6/05 1:51 AM 2005/10/6, Ed Reed [EMAIL PROTECTED] : I'm trying to group some sub

Re: Help on writing a sql statement

2005-10-10 Thread Imran
Hi Shawn .. Thanks for the offer. I am attaching the info that you requested. mysql SHOW CREATE TABLE salesmaster\G; *** 1. row *** Table: salesmaster Create Table: CREATE TABLE `salesmaster` ( `ID` int(10) NOT NULL auto_increment,

Non-linear degradation in bulk loads?

2005-10-10 Thread Jon Frisby
Everyone, We're trying to do some bulk data loads on several different tables (on several different machines, using several different techniques) and seeing dramatically worse-than-linear performance. We've tried the bulk-INSERT syntax, and the LOAD DATA INFILE syntax. We've done ALTER TABLE ...

problem about the mysql test suite

2005-10-10 Thread lu ming
I run a test against to the MySQL Server with the test tool of the binary distribution in Linux OS(red hat 9.0). But many of the test cases failed. My test method and the output results are following: 1.batch test command mysqltest -h localhost -u root -R r/alias.result test

Re: Non-linear degradation in bulk loads?

2005-10-10 Thread Manoj
Not sure but given that you suffer from non-linear degradation in performance;my guess is you might be extending your ibdata file every too frequently during the batch load process. Check the ibdata_data_file_path variable in my.cnf for more details. Cheers Manoj On 10/11/05, Jon Frisby [EMAIL

RE: Non-linear degradation in bulk loads?

2005-10-10 Thread Jon Frisby
Manoj, Thanks for the reply! Unfortunately, I failed to note that we don't have an auto-extending data pool. Our data pool is about 212GB, in 4GB chunks, with about 4.5GB free right now. We extend it explicitly, and monitor to make sure it doesn't fill up. -JF -Original Message-

Re: Non-linear degradation in bulk loads?

2005-10-10 Thread C.R. Vegelin
Hi Jon, Well, may be the next suggestions might help you. Disable Keys does apply to non-unique keys only. So I suggest to focus on your unique Email key. You could do some tests with: a. drop the unique key on Email b. load the various bulks c. after loading, define Email, eg. as (unique)