Sql - Problem with Left Join

2003-11-12 Thread Bill Easton
You are taking the INNER JOIN with caddrescontactperson. Presumably, you need something like this: Select A.DepartmentName,A.Address,P.Postcode,P.cityname, CP.firstname from caddress A,cpostinfo P left Join CContactPerson CP on CP.ID =1001 left join caddresscontactperson CACP o

Re: Synchronization and replication of two MYSQL databases

2003-11-12 Thread Karam Chand
Try SQLyog Job Agent at http://www.webyog.com Karam --- Prashant Akerkar <[EMAIL PROTECTED]> wrote: > Dear friends > > We have our application with data tier as mysql > database in our office > running on windows platform which we need to > synchronize with the same > database on a remote sy

Locking Row

2003-11-12 Thread Ben Podoll
I am a bit of a newbie to MySQL so there may be an easy answer, but if I have a multi-threaded application that is accessing a MySQL database is there a way to lock a row in a table so that only one thread can alter an entry? For instance a way to do a query and then cycle thru the recordset by fir

sorting using substring

2003-11-12 Thread Anthony
I am trying to write a query that will sort results using one or two substrings in item number. So for example I have item numbers that start with SE, TS, N0, W00, etc. So let say I want results sorted in the following order TS, SE, N0, W0 I have tried the followi

Re: Number of MySQL children ?

2003-11-12 Thread Jeremy Zawodny
On Wed, Nov 12, 2003 at 08:53:50PM -0500, George Webb wrote: > > # top > 8:45pm up 6 days, 3:52, 8 users, load average: 0.06, 0.17, 0.17 > 84 processes: 82 sleeping, 2 running, 0 zombie, 0 stopped > CPU states: 6.6% user, 5.4% system, 0.0% nice, 87.9% idle > Mem:25468K av, 24268K us

Locking a row

2003-11-12 Thread Ben Podoll
I am a bit of a newbie to MySQL so there may be an easy answer, but if I have a multi-threaded application that is accessing a MySQL database is there a way to lock a row in a table so that only one thread can alter an entry? For instance a way to do a query and then cycle thru the recordset by fir

RE: GRANT TO SELECTED COLUMNS

2003-11-12 Thread richardb
Hi Chris/Lists, Thanks, I'll take note of your comments. As per Paul D, probably the error is by not naming the specific columns in the SELECT query. SELECT * will give an error since testuser has no access for the other columns... Thanks Again, Richard "Chris" <[EMAIL PROTECTED]>13/1

RE: GRANT TO SELECTED COLUMNS

2003-11-12 Thread richardb
Hi Paul/Lists, Thank you for your very clear explanations... In my 1st option, I think I misunderstood p427 of your book(MySQL) by granting first a SELECT privileges on the table before issuing the UPDATE on specific columnsSo now I learned that It should not be the case for SELECTING specif

RE: GRANT TO SELECTED COLUMNS

2003-11-12 Thread Chris
You can't login as testuser and try to give yourself privileges, it just doesn't work. GRANT SELECT ON DATABASE.CHECK_SBIN TO testuser IDENTIFIED BY 'password' Put an entry into mysql.user, with the host set to '%' [Any host, are you sure that's what you want?] and all privileges set to 'N'. It

Re: secure automated access (was "Re: Backing up all databases")

2003-11-12 Thread Randall Perry
That sounds like the solution. Thanks for your help, everyone. > The simplest solution is to keep the password in the .my.cnf file in > your home directory. See http://www.mysql.com/doc/en/Option_files.html > in the manual. > > In the case of root cron jobs then, you need a .my.cnf readable on

RE: GRANT TO SELECTED COLUMNS

2003-11-12 Thread Paul DuBois
At 10:55 AM +0800 11/13/03, [EMAIL PROTECTED] wrote: Hi Chris/Lists, In fact, I was able to login using both ways, here's what I did. 1. mysql -u testuser -ptestuser -hlocalhost DATABASE >> OK 2. In the mysql prompt, I issue the query 'SELECT * FROM CHECK_SBIN' >> Access denied ** This is

RE: GRANT TO SELECTED COLUMNS

2003-11-12 Thread richardb
Hi Chris/Lists, In fact, I was able to login using both ways, here's what I did. 1. mysql -u testuser -ptestuser -hlocalhost DATABASE >> OK 2. In the mysql prompt, I issue the query 'SELECT * FROM CHECK_SBIN' >> Access denied ** This is were I'm getting the error Access denied for user

RE: Page Numbers

2003-11-12 Thread Chris
I have a function that accepts a page number and an amount per page value then generates the numbers for the LIMIT clause. It requires SQL_CALC_FOUND_ROWS to be specified in the query. iNum=10; // Rows per page iPage=1; // Current page, first page is 1 iStart= (iPage-1) * iNum; // Starting row num

RE: GRANT TO SELECTED COLUMNS

2003-11-12 Thread Chris
That second query, byt itself, should have done it, were you logged in as testuser when you tried to run it? Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 5:26 PM To: [EMAIL PROTECTED] Subject: GRANT TO SELECTED COLUMNS Hel

RE: Repeated table corruptions

2003-11-12 Thread Quentin Bennett
Hi, No problems there: 031113 1:18:33 /applic/mysql-max-4.0.13-dec-osf5.1-alphaev67/bin/mysqld: Normal shutdown 031113 1:18:34 InnoDB: Starting shutdown... 031113 1:18:36 InnoDB: Shutdown completed 031113 1:18:36 /applic/mysql-max-4.0.13-dec-osf5.1-alphaev67/bin/mysqld: Shutdown Complete 0

Re: Repeated table corruptions

2003-11-12 Thread Stephen Brownlow
Have a look at the MySQL server error log. It should show messages about Shutting down. If it does not report the shutdowns, Unix would just be killing it, and that could be causing, not solving the problems. MySQL shutdowns might not happen when Unix is shutdown, because sometimes the rc.d script

Re: Number of MySQL children ?

2003-11-12 Thread George Webb
Thanks, Arjen. That is interesting about linux "threads" showing up as separate processes. They each have separate PID's, so I am guessing that it really doesn't matter what you call it; each thread still takes up the same amount of memory as the 'ps' command reports. In my case: # ps vaw |grep

Page Numbers

2003-11-12 Thread Mike Blezien
Hello, we've set up many displays using the "Previous" and "Next" simple linking set up of search results. But now would like to implement the page number style, IE. "Previous" [1] [2] [3] "Next" style format and was hoping someone may have a sample/example queries to accomplish this. Usually w

Max_connections problem

2003-11-12 Thread Kittiphum Worachat
Hi. Can someone help me with problem of max connection when it rech the limit cause some process has lock table so I want to login as root to make some kill that process but I can login because of max connection bloack me. And I known some user with PROCESS_ACL can login is root has this privi

GRANT TO SELECTED COLUMNS

2003-11-12 Thread richardb
Hello List, I have a table named CHECK_SBIN with fields id,jobid,filename,sbin,count, then I would like to create an account lets say testuser with SELECT privileges only to a specific columns. In this case I would like to open only id and jobid to 'testuser'. I have already created an account t

Re: Number of MySQL children ?

2003-11-12 Thread Arjen Lentz
Hi George, On Thu, 2003-11-13 at 08:49, George Webb wrote: > Would someone please explain how to set the number of child mysqld > processes which start when mysql (mysql-standard-4.0.14-pc-linux-i686) > starts up? > > I am using MySQL on a memory-poor (32MB RAM) machine, and MySQL > s

RE: Equivalent Function Needed

2003-11-12 Thread Kevin Fries
The IF function works pretty much like Oracle's decode. But I recommend using CASE..WHEN for compatibility between the two. Check out: http://www.mysql.com/doc/en/Control_flow_functions.html > -Original Message- > From: Jonathan Rosenberg [mailto:[EMAIL PROTECTED] > Sent: Wednesday, No

Equivalent Function Needed

2003-11-12 Thread Jonathan Rosenberg
I use the following function in Oracle SELECT decode(status,'A','Active','L','Active','Former') FROM Table What it means is: if table column status = A, return "Active", if status=L, return "Active", else return "Former" in the select statement. Decode in mysql has nothing to do with this functio

Index Question

2003-11-12 Thread John Berman
Hi. using MYSql 3.28 I have a surname column with a standard index and this is the column were search are performed on, currently the filed only has the one name i.e.: Surname: smith I want to include other column data in the search i.e. fathersname, so I create an index on that column and

RE: Having MySQL listen on multiple(2) ports at the same time

2003-11-12 Thread Misaochankun
We will most likely be using that method. We have to translate our ipchains to iptables first. -Original Message- From: Kevin Carlson [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 2:56 PM To: Misaochankun Cc: [EMAIL PROTECTED] Subject: Re: Having MySQL listen on multiple(2)

Re: Having MySQL listen on multiple(2) ports at the same time

2003-11-12 Thread Kevin Carlson
You can emulate this using IPTables and a FORWARD rule. If you are unfamiliar with IPTables see http://www.iptables.com/ for documentation. Misaochankun wrote: Can this be done? No, I do not mean running multiple MySQL servers. I need to have MySQL listen on two separate ports at the same time.

Number of MySQL children ?

2003-11-12 Thread George Webb
Would someone please explain how to set the number of child mysqld processes which start when mysql (mysql-standard-4.0.14-pc-linux-i686) starts up? I am using MySQL on a memory-poor (32MB RAM) machine, and MySQL seems to hog about 10MB per child process, and there are ten (10) of

RE: maintaining size of a db

2003-11-12 Thread Scott H
Hey - Progress! But first, I had to correct: can't use "-p ", must use the longer form: "--password=" Then I can run it! One problem. It deleted the first 1000 records, rather than leaving the last 1000 records in the db. What twist is needed to get that right? ? --- Scott H <[EMAIL PROTECT

Sql - Problem with Left Join

2003-11-12 Thread Kim G. Pedersen
Hello the little Query1 works until I add the left join : Query 1 ) Select A.DepartmentName,A.Address,P.Postcode,P.cityname from caddress A,cpostinfo P there A.ID=10 and A.PostInfoID=P.ID Query 2) Select A.DepartmentName,A.Address,P.Postcode,P.cityname, CP.firstname left Join CCo

RE: new install failure

2003-11-12 Thread Victor Pendleton
The user you are performing this as does not have the necessary permissions. -Original Message- From: DePhillips, Michael P [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 3:38 PM To: [EMAIL PROTECTED] Subject: new install failure HI list When installing mysql 4.16 on de

RE: LOAD DATA ?

2003-11-12 Thread Victor Pendleton
have you verified that the number of columns match? That the data types are matching as well? -Original Message- From: rmck [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 3:01 PM To: [EMAIL PROTECTED] Subject: LOAD DATA ? Hello, My Load data command seems not to load data

RE: new install failure

2003-11-12 Thread DePhillips, Michael P
That did it thanks Pete I need to my installs earlier in the day ;) -Original Message- From: Peter Lovatt [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 4:44 PM To: DePhillips, Michael P; [EMAIL PROTECTED] Subject: RE: new install failure Have you checked permissions -

RE: maintaining size of a db

2003-11-12 Thread Scott H
When I run: mysql -p -u < deleteold.sql ...and within deleteold.sql, I have only this text (2 lines): select (@aa:=seq) as low_seq from syslogTB order by seq limit 1000,1; delete from syslogTB where seq < @aa; I just get back a screen full of syntax suggestions. Where is my mistake here? --

RE: new install failure

2003-11-12 Thread Peter Lovatt
Have you checked permissions - the files should be owned by mysql Peter -Original Message- From: DePhillips, Michael P [mailto:[EMAIL PROTECTED] Sent: 12 November 2003 21:38 To: [EMAIL PROTECTED] Subject: new install failure HI list When installing mysql 4.16 on debian linux 2.4.20-2

RE: C API

2003-11-12 Thread Brad Teale
There is a C++ package called OTL (http://otl.sourceforge.net/home.htm). It supports both MySQL through MyODBC, and Oracle. It works great with Oracle applications, but we have not used it with MySQL. Thanks, Brad Teale Universal Weather and Aviation, Inc. mailto:[EMAIL PROTECTED] 713-944-1440 ex

new install failure

2003-11-12 Thread DePhillips, Michael P
HI list When installing mysql 4.16 on debian linux 2.4.20-20.8smp I get the following errors... ---snip- -- 031112 16:05:08 mysqld started 031112 16:05:08 InnoDB: Started 031112 16:05:08 Fatal error: Can't open p

Re: Some help with a complex query

2003-11-12 Thread Roger Baklund
* Elisenda > The problem is that it 's too slow and the result doesn't appear. > I am going to try to explain the query. Please do that using the EXPLAIN SELECT statement: http://www.mysql.com/doc/en/EXPLAIN.html > This will show what index is beeing used on the different joins, and approximatel

RE: maintaining size of a db

2003-11-12 Thread Scott H
Cool idea, but I don't think you can really do it. When I try, mysql just gives me back the syntax stuff.I'm a bit perplexed - I would have thought this would be a semi-common issue in db maintenance, but no one seems to have set this up. I'm still trying, please send any other ideas/suggestio

RE: Having MySQL listen on multiple(2) ports at the same time

2003-11-12 Thread Dan Greene
your best bet would be to do a port-forwarding methodology, at the os level, not in mysql itself I've used some for SOAP tracing, to intercept and view http traffic, but I'm sure there are some out there that just forward traffic w/o a gui > -Original Message- > From: Misaochankun [mail

RE: Backup question.

2003-11-12 Thread Christensen, Dave
Yes, you can do it like this: Prompt> mysqldump --add-drop-table --host=source.IP.addr.spec -uuser -ppassword databasename | mysql -uuser -ppassword I've found that it helps things if you add --no-data to the source side on the first pass, then remove that clause and run it again. Dave -

Having MySQL listen on multiple(2) ports at the same time

2003-11-12 Thread Misaochankun
Can this be done? No, I do not mean running multiple MySQL servers. I need to have MySQL listen on two separate ports at the same time. Reason being, the new port is needed for a routing issue, and the default port 3306 needs to stay up to respond to normal traffic. -- MySQL General Mailing List

LOAD DATA ?

2003-11-12 Thread rmck
Hello, My Load data command seems not to load data into my db: mysql> load data local infile '/opt/week/ip.0311100440' into table logs.Nov03 ignore 2 lines; Query OK, 1 row affected (0.66 sec) Records: 48273 Deleted: 0 Skipped: 48272 Warnings: 48273 mysql> I have plenty of space where my d

Digest Again, PLEASE SOMEONE HELP?

2003-11-12 Thread Paul Fine
Unless I am misinformed, subscription to the DIGEST format of this list should cause all messages to come in one daily e-mail? Can someone else who is subscribed this way please at least let me know that this is at least the case for them? I continue to get every single post as an individual e-mai

MySQL 4 Built in SSL?

2003-11-12 Thread Paul Fine
Would anyone be kind enough to provide an example of using MySQL 4 with it's apparent built in SSL functionality to connect from a Win client to *Nix box? Am I correct in assuming that this new functionality means that I will not have to use stunnel or ssh tunneling? Thanks for any info! --

RE: maintaining size of a db

2003-11-12 Thread Dan Greene
you may be able to put both statements to a text file, let's call it deleteold.sql then your cron job would be : mysql (put your connect stuff here) < deleteold.sql > -Original Message- > From: Scott H [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 12, 2003 3:17 PM > To: Michael

RE: Repeated table corruptions

2003-11-12 Thread Quentin Bennett
Hi, Thanks - the tables were converted to MyISAM a while ago, and have run with no problem. Because they have been repaired before, following a previous crash, I believe that prior to the shut down last night all was well. I have run in to the issue of trying to repair a 'live' table, with subs

RE: maintaining size of a db

2003-11-12 Thread Scott H
Well, it sort of helps. But that section is about future enhancements intended for mysql. I need to set something up now, with the current stable version. One thing I read (can't find it now) indicated that the current version (I'm actually running 4.0.15a) has "limited" support for subqueries -

RE: Time consuming table regeneration: JAVA & MySQL

2003-11-12 Thread Victor Pendleton
You should determine where your bottlenecks are first. Are the updates on columns with keys? Can you disable the keys during the load? Are you using extended inserts? Is there available memory? What is the cpu doing? etc... -Original Message- From: karthikeyan [mailto:[EMAIL PROTECTED] Sen

RE: table creation

2003-11-12 Thread Victor Pendleton
Create the column as a timestamp and the column will be updated on insert and update. -Original Message- From: Mikel - [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: table creation Hello list: Is it possible to create a table with a

bug in replication?

2003-11-12 Thread Dathan Vance Pattishall
ERROR: Error in Log_event::read_log_event(): 'Event too big', data_len: 1597257529, event_type: 49 ERROR: Could not read entry at offset 240378281 : Error in log format or read error On the master it's reporting this error. The data_len is 1.48 GB which is an error. I know that this is not the

RE: Backup question.

2003-11-12 Thread Victor Pendleton
mysqldump -uname -ppassword -BDatabase | mysql -uname -ppasswrod -Ddatabase -hremotehost -Original Message- From: Richard Reina [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 3:54 PM To: [EMAIL PROTECTED] Subject: Backup question. I would like to backup databases from a li

Query with temporary table

2003-11-12 Thread Jeff McKeon
Is is possible to do a select query with a left join from a real table to a temporary table? I'm trying it but keep getting "unkown table 'tablename' in field list" error. Jeff -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com

Repeated table corruptions

2003-11-12 Thread Quentin Bennett
Hi, Repost - its happened again. Anyone any ideas PLEASE! Hi, Advice on the cause of the following table corruption would be much appreciated. Some background: This customer has been running MySQL for 3 or more years, and, for back up purposes, shuts MySQL down each night, takes a snapsh

Backup question.

2003-11-12 Thread Richard Reina
I would like to backup databases from a linux MySQL server to another linux machine on the same private network but I don' see in the docs how I can do this with mysqlhotcopy or mysqldump. Is there any way to do this besides using ftp. Any help would be appreicated. Richard -- MySQL General

Re: Kill a query

2003-11-12 Thread Jeremy Zawodny
On Wed, Nov 12, 2003 at 02:29:12PM -0500, Jeff McKeon wrote: > Is there a way to abort a query after it's running? You can use the KILL command from a separate connection. -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! <[EMAIL PROTECTED]> | http://jeremy.zawodny.com/ MySQ

Re: Maybe easy, maybe hard SELECT puzzle :)

2003-11-12 Thread Michael Stassen
Jonathan Terhorst wrote: I can't figure out if this is actually challenging or if it's a stupid question. Table1 is a normal old relation that describes a bunch of objects: Table1 (id INT PRIMARY KEY NOT NULL, Name varchar(255), Size int) etc. Associated with each Table1 record is a variable-lengt

Re: C API: undefined reference

2003-11-12 Thread hAj
Thanx so much! mysql_real_connect() certainly works. Best, hAj on 2003.11.11 17:55, Nick Gaugler at [EMAIL PROTECTED] wrote: > http://www.mysql.com/doc/en/mysql_connect.html > > This function is deprecated. It is preferable to use > mysql_real_connect() instead. > > > > #include > #include >

Kill a query

2003-11-12 Thread Jeff McKeon
Is there a way to abort a query after it's running? Jeff -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: secure automated access

2003-11-12 Thread David T-G
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike -- ...and then Michael Stassen said... % % Mikael Fridh wrote: [And thank you to Mikael, too.] % % >On Wednesday 12 November 2003 17.15, David T-G wrote: % > % >>What if one user connects to the database as different users (as I do, in ... %

64-bit client connect to 32-bit Server

2003-11-12 Thread David Ritter
Hello All, Can a 64-bit MySQL client connect to a 32-bit server? Are there any restrictions? Thanks, Dave Ritter -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Some help with a complex query

2003-11-12 Thread Elisenda
I'm sorry I didn't explain anything. The problem is that it 's too slow and the result doesn't appear. I am going to try to explain the query. Fields from Table FASE: (300.000 records) ID INT AUTO_INCREMENT NOT NULL PRIMARY KEY, SQL_ID_PY char(6), SQL_ID_CE char(6), PR_flag INT, PR_Date_Visita

RE: newbie question on data accumulation

2003-11-12 Thread Dathan Vance Pattishall
- Dathan Vance Pattishall   - Sr. Programmer and mySQL DBA for FriendFinder Inc.   - http://friendfinder.com/go/p40688 -->-Original Message- -->From: joffrey leevy [mailto:[EMAIL PROTECTED] -->Sent: Wednesday, November 12, 2003 9:58 AM -->To: [EMAIL PROTECTED] -->Subject: newbie questio

Can not make PULL from mysql.bkbits.net

2003-11-12 Thread Gelu Gogancea
Hi, I wish to make a "pull" for mysql-5.0 from http://mysql.bkbits.net but always is nothing to pull. I try with : bk pull http://mysql.bkbits.net/mysql-5.0 I wonder, what happens ? Regards, Gelu _ G.NET SOFTWARE COMPANY Permanent e-mail a

RE: Error 127 = Record-file is crashed

2003-11-12 Thread Dathan Vance Pattishall
Yes let it finish. Never stop a repair in progress. Now myisamchk is rebuilding the index file since you’re the table is extremely corrupt. Myisamchk can run faster if you set some buffer properties. Put this in you’re my.cnf file for next time. [myisamchk] key_buffer=256M sort_buffer=256M read_bu

bdb: page 0: illegal page type or format

2003-11-12 Thread Mark Copper
Dear DBA's I'm setting up a database and altered several tables to BDB type in order to enable transactions. Everything went fine until I restarted mysqld. Starting mysql now gets messages like Didn't find any fields in table 'xxx' for those tables altered to BDB type. Looking in the error lo

Re: Database-design

2003-11-12 Thread Michael Stassen
You may find the SET column type of use here. http://www.mysql.com/doc/en/SET.html You could declare column Quarter as Quarter SET ("one", "two", "three", "four") NOT NULL or even Quarter SET ("1", "2", "3", "4") NOT NULL Then mysql will do some of the work for you. Michael Meli Meli wr

Re: max_user_connections problem after upgrading

2003-11-12 Thread Henrik Skotth
William R. Mussatto skrev: > Joe Lewis said: >> We're experiencing the same issues, but not neccesarily after an >> upgrade. We're using MySQL 4.0.12 and FreeBSD 4.7 Release. We're >> getting max'd connections only on specific users, and the "show >> processlist" is returning only the "show proce

RE: maintaining size of a db

2003-11-12 Thread Michael McTernan
>From the manual: 1.8.4.1 Subqueries Subqueries are supported in MySQL version 4.1. See section 1.6.1 Features Available in MySQL 4.1. Hope that helps, Mike > -Original Message- > From: Scott H [mailto:[EMAIL PROTECTED] > Sent: 12 November 2003 17:45 > To: Dan Greene; MySQL Mailing L

newbie question on data accumulation

2003-11-12 Thread joffrey leevy
Hi all Curious as to what happens after data is repeatedly selected from a mysql table overtime. Does it accumulate as junk data, stored at some location and eventually slow down the database/program/server? Does any purging have to take place? Thanks J __ Do y

Re: max_user_connections problem after upgrading

2003-11-12 Thread William R. Mussatto
Joe Lewis said: > We're experiencing the same issues, but not neccesarily after an > upgrade. We're using MySQL 4.0.12 and FreeBSD 4.7 Release. We're > getting max'd connections only on specific users, and the "show > processlist" is returning only the "show processlist" process. the > results o

Re: secure automated access

2003-11-12 Thread Michael Stassen
Mikael Fridh wrote: On Wednesday 12 November 2003 17.15, David T-G wrote: % [client] % password="mysql_root_password" What if one user connects to the database as different users (as I do, in fact; sometimes all-db-root, sometimes one-db-root, sometimes read-only user)? Let's back this out

RE: maintaining size of a db

2003-11-12 Thread Scott H
OK, I *THINK* I follow you here. Couple of questions. I'm reading an online tutorial trying to figure this out, and I am led to believe mysql can't do nested queries, aka sub-queries. But you say it can? Is this recent? And I don't have a timestamp field, I have an autoincrement field, but what

Re: max_user_connections problem after upgrading

2003-11-12 Thread Joe Lewis
We're experiencing the same issues, but not neccesarily after an upgrade. We're using MySQL 4.0.12 and FreeBSD 4.7 Release. We're getting max'd connections only on specific users, and the "show processlist" is returning only the "show processlist" process. the results of netstat show absolut

Re: Maybe easy, maybe hard SELECT puzzle :)

2003-11-12 Thread Shane Allen
At 09:24 PM 11/10/2003, Leo wrote: notice the _and_ ? *grin* good point. I guess my reply (which I found out later was unnecessary since the question had already been answered) would have been better stated had I just pointed out the distinct keyword rather than constructing a sample query. :)

Re: max_user_connections problem after upgrading

2003-11-12 Thread Henrik Skotth
I'm mostly using mytop, and that's the way that I see that there are no (are almost no) connections when the server claims that it is above the connection limit... So I guess that there's something seriously wrong then... Any ideas what? -- Henrik [EMAIL PROTECTED] (Pete Harlan) skrev: > What do

RE: Database-design

2003-11-12 Thread Meli Meli
Thanks to everybody for helping me. I agree with the suggestion to change the quarter fields in to one single field. The suggestion from Dan Greene to store the quarters as binary values sounds good to me. So I will do it this way. To explain you more about this table. The quarter fields

Re: secure automated access

2003-11-12 Thread Mikael Fridh
On Wednesday 12 November 2003 17.15, David T-G wrote: > % [client] > % password="mysql_root_password" > What if one user connects to the database as different users (as I do, in > fact; sometimes all-db-root, sometimes one-db-root, sometimes read-only > user)? Let's back this out of "root" and g

rollback error

2003-11-12 Thread Fernando
Hi In version 3.23.57 when i do a rollback i get this error message and the changes are not undone, why? This is what i typed: (NOTE: 'insert.sql' insert a row correctly in an InnoDB table) mysql> SET AUTOCOMMIT=0; Query OK, 0 rows affected (0.00 sec) mysql> BEGIN; Query OK, 0 rows affected (0

RE: maintaining size of a db

2003-11-12 Thread Dan Greene
What I would do is a classical guesstimate find the average size per record (data file size + index file(s) size / # records in table) using that, find the data used per day using that, figure out how many days, on average it takes to hit 20GB let's say it's 89 days. right off the top, ta

Re: max_user_connections problem after upgrading

2003-11-12 Thread Pete Harlan
What does "show processlist" say when the connections are maxed out? (You may have to leave a client logged in to reserve a slot so you can submit this query.) If it shows only a few connections, then there's something seriously wrong. If it shows a ton of idle connections, it should tell you whi

Re: Mysql just stopped working on my server - any way to track down the problem?

2003-11-12 Thread Matt Babineau
I guess you could say that. The machine is Redhat 9 too. I logged in locally and connected to the mysql server fine. Everything had appeared as normal. I could see all the databases, and \u to them. Is there a way I can turn on some extended logging to get more info on the problem as it will proba

Subquery?

2003-11-12 Thread W. Bauer
Dear all A have a table mytable in which some records have the same value in col1. I'd like to know how show up only once, how many twice, etc. The following does what I want, but I think there should be a more elegant way, possibly invlving subquires. create table counts (n int); insert into

Re: Error 1045: Access denied...

2003-11-12 Thread Nils Valentin
I get your point Patrick. I was customer support engineer myself. You cant always think about all eventualities can you ;-), its really hard and needs a special way of thinking. Anyway that little "lesson" saved my day. ;-) Thanks a lot. Nils Valentin On Thursday 13 November 2003 01:22, you

Re: Synchronization and replication of two MYSQL databases

2003-11-12 Thread Egor Egorov
"Prashant Akerkar" <[EMAIL PROTECTED]> wrote: > > We have our application with data tier as mysql database in our office > running on windows platform which we need to synchronize with the same > database on a remote system at data centre on Linux. > Look at the replication: http://

RE: maintaining size of a db

2003-11-12 Thread Scott H
Yes sir, exactly. It's just that's what I'm looking for, and can't figure out. I can set up a cron job, but what exactly would the SQL delete statement be that would allow me to delete old records in such a way that the db maintains an approximately constant size on disk? (Failing that perhaps a

Re: Error 1045: Access denied...

2003-11-12 Thread Nils Valentin
Hi Patrick How true ;-) hohohoho Sorry for my really bad English, I just imagine that you might have had an experience already from somebody taking it literally ?? I will try to avoid it. Thanks for the warning ;-) Best regards Nils Valentin On Thursday 13 November 2003 01:13, Patrick Dowd

table creation

2003-11-12 Thread Mikel -
Hello list: Is it possible to create a table with a date column with current date as is default value?, like curdate() or now() values?, any ideas. - MySQL 3.23.58-Max-log - RH. 7.3 Greetings and thanks in advanced Mikel _ Charla

Re: secure automated access

2003-11-12 Thread David T-G
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael, et al -- ...and then Michael Stassen said... % % The simplest solution is to keep the password in the .my.cnf file in % your home directory. See http://www.mysql.com/doc/en/Option_files.html % in the manual. OK. % % In the case of root

Re: Error 1045: Access denied...

2003-11-12 Thread Egor Egorov
Fernando <[EMAIL PROTECTED]> wrote: > Hello, > i've just installed the 3.23.57 version in my account and i don't have root > privileges. The problem is the if i try to create a database, like this > > mysql> create database example; > > i get the following message: > > "Error 1045: Access denie

Fwd: Re: Error 1045: Access denied...

2003-11-12 Thread Nils Valentin
Hi Fernando; you are logged in as anonymous user. log into mysql like this mysql -u root -p Hit enter if no password is set yet. -- kind regards Nils Valentin Tokyo/Japan http://www.be-known-online.com/mysql/ On Thursday 13 November 2003 00:47, Fernando wrote: > Hello, > i've just installe

Fwd: Re: Error 1045: Access denied...

2003-11-12 Thread Nils Valentin
Hi Fernando; you are logged in as anonymous user. log into mysql like this mysql -u root -p Hit enter if no password is set yet. -- kind regards Nils Valentin Tokyo/Japan http://www.be-known-online.com/mysql/ On Thursday 13 November 2003 00:47, Fernando wrote: > Hello, > i've just installe

Re: Dirt Slow Query On Datetime Range...the saga continues

2003-11-12 Thread Gabriel Ricard
In order to make sure of a multi-column index, you have to order the WHERE clauses in the same order as the columns in the index. Since you query Realm first, then AcctStartTime, then AcctStopTime, MySQL would use an index on those columns in that order. You can either add a differently ordered

Cannot create InnoDB table

2003-11-12 Thread Heikki Tuuri
Philip, the problem is probably that the table already exists in the InnoDB internal data dictionary. With 4.0.17, I get: mysql> CREATE TABLE ids (id varchar(255)) TYPE=InnoDB; ERROR 1005 (0): Can't create table './test/ids.frm' (errno: 121) mysql> Output to the .err log: 031112 17:48:3

RE: maintaining size of a db

2003-11-12 Thread Dan Greene
cronjob a sql script that runs a delete statement for old jobs daily > -Original Message- > From: Scott H [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 12, 2003 10:40 AM > To: MySQL Mailing List > Subject: Re: maintaining size of a db > > > --- Egor Egorov wrote: > > Scott H wr

Error 1045: Access denied...

2003-11-12 Thread Fernando
Hello, i've just installed the 3.23.57 version in my account and i don't have root privileges. The problem is the if i try to create a database, like this mysql> create database example; i get the following message: "Error 1045: Access denied for user : '@localhost'. Is this because i'm not th

Cannot create InnoDB table

2003-11-12 Thread Philip Molter
I have a situation using InnoDB where I cannot create even the most basic of tables with a given name. mysql> create table card_batch ( a int ); ERROR 1005: Can't create table './test_gn/card_batch.frm' (errno: 121) mysql> show tables like 'card%'; Empty set (0.01 sec) mysql> show variables lik

Re: maintaining size of a db

2003-11-12 Thread Scott H
--- Egor Egorov wrote: > Scott H wrote: >> Can't seem to find this one in the manual or >> archives - how do I control a db to maintain >> its size to an arbitrary value, say 20 GB? I >> want to just rotate records, deleting those >> that are oldest. > > You can't restrict size of the database on

Re: secure automated access (was "Re: Backing up all databases")

2003-11-12 Thread Michael Stassen
The simplest solution is to keep the password in the .my.cnf file in your home directory. See http://www.mysql.com/doc/en/Option_files.html in the manual. In the case of root cron jobs then, you need a .my.cnf readable only by root in root's home. It should include [client] password="mysql_root_p

Capacity Planning - Methodology/Documentation

2003-11-12 Thread Héctor L . Rodríguez R .
Hi there! I need to do a capacity planning for my MySQL database. Can anyone help me finding information to do it? is there any methodology or at least some information about it? I think I have anything I need to do it, I used to do it for Oracle but we're working with MySQL now, and I have no i

Re: back up database

2003-11-12 Thread Adam Hardy
On 11/12/2003 02:58 AM Didier Godot wrote: Hi everyone, this is my first post, you will excuse me for my english cause french is my fluent language. So i'm also new to mysql, tonight my question is how to make a back up of all the database on MySQL 4.0.12 running on netware server 6 i hava

  1   2   >