Client connection character set be changed after a long while?

2006-10-18 Thread Hanson Lu
My programm connect to MYSQL server, adn set it's charactor set by "set NAMES gbk", after a long while, like one night, I found the client charactor set have been changed to latin, it seems related to some "timeout" value. why the characotor set would be changed? My programm use MYSQL C API.

Fw: Import oracle

2006-10-18 Thread Renish
- Original Message - From: "Renish" <[EMAIL PROTECTED]> To: Sent: Thursday, October 19, 2006 1:08 PM Subject: Fw: Import oracle - Original Message - From: "Renish" <[EMAIL PROTECTED]> To: Sent: Thursday, October 19, 2006 10:28 AM Subject: Import oracle Can anyone tell

Fw: Import oracle

2006-10-18 Thread Renish
- Original Message - From: "Renish" <[EMAIL PROTECTED]> To: Sent: Thursday, October 19, 2006 10:28 AM Subject: Import oracle Can anyone tell me how can I import the *.gra (oracle db file) files to Navicat or Acess. Pls let me know in steps as I am v new to this field. -- MySQL G

Import oracle

2006-10-18 Thread Renish
Can anyone tell me how can I import the *.gra (oracle db file) files to Navicat or Acess. Pls let me know in steps as I am v new to this field. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: mysqlclient in Apache

2006-10-18 Thread Dan Nelson
In the last episode (Oct 18), Danny Swarzman said: > I'm developing an Apache module that uses mySQL. It needs to be able > to talk to a remote host. > > I'm doing this in a Mac. > > I have a simple program in C that calls mysql_real_connect(). It > works with a remote host and with the localhost

Anyone know a good list for mysql under the hood?

2006-10-18 Thread Danny Swarzman
I posted a question about running mysql in an Apache module. Maybe I need a list with a different focus. Please suggest. -Danny Swarzman -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Inline View

2006-10-18 Thread Asif Lodhi
Hi Melissa, What's wrong with phrasing your query as : select distinct i.reportid, ivalue as IPAddress, ivalue as Computer From item where reportid=1; /* LIMIT 3 */ -- or something like this if you do want 3 rows anway. Am I putting LIMIT right? -- Asif On 10/19/06, Melissa Dougherty <[EMAI

Re: How to get into mysql command line?

2006-10-18 Thread Asif Lodhi
Hi Cornelia, On 10/16/06, Cornelia Menzel <[EMAIL PROTECTED]> wrote: Anyhow, if somebody has a glue of what was or could have been the problem, I am interested to know what it was. What really annoys me, is that I have not found what it was. Though I have used only 5.x versions but I got simil

MySQL Camp: Proven Scaling offering Free Ride

2006-10-18 Thread Jeremy Cole
Hi All, As you may know, MySQL Camp, a gathering of the best minds in MySQL, is coming up soon, in just over three weeks. It will be held at Google HQ, in Mountain View, California, November 10-12. You can find out more information about the conference here: http://mysqlcamp.org/ Proven S

Re: Simple JOIN on three tables

2006-10-18 Thread Martijn Tonies
> > You can join on any row(s) you like. What are you trying to acccomplish? > > I simply want to select the records from my three tables that are > comprised in time interval. > Now, the first table comprises the records until to 2004 year; the > second table unitl 2005 and the third table until

Re: Simple JOIN on three tables

2006-10-18 Thread Peter Brawley
>I simply want to select the records from my three tables that are >comprised in time interval. If you want the results in one resultset, apply an appropriate Where clause to each year-table query and union the queries, eg SELECT * FROM a WHERE date BETWEEN '2004-3-1' AND '2004-6-30' UNION SEL

mysqlclient in Apache

2006-10-18 Thread Danny Swarzman
I'm developing an Apache module that uses mySQL. It needs to be able to talk to a remote host. I'm doing this in a Mac. I have a simple program in C that calls mysql_real_connect(). It works with a remote host and with the localhost. When I put the same code into my Apache module, the call

Re: Simple JOIN on three tables

2006-10-18 Thread spacemarc
2006/10/18, William R. Mussatto <[EMAIL PROTECTED]>: Then it is really a UNION. I hope you have the date field as an index otherwise you are looking at a table scan which is always slow. Ok, if I have the field ID that have the same value in three tables but I want to select however the data ba

Re: Simple JOIN on three tables

2006-10-18 Thread William R. Mussatto
On Wed, October 18, 2006 13:37, spacemarc said: > 2006/10/18, Peter Brawley <[EMAIL PROTECTED]>: > >> You can join on any row(s) you like. What are you trying to acccomplish? > > I simply want to select the records from my three tables that are > comprised in time interval. > Now, the first table c

Re: InnoDB messup

2006-10-18 Thread George-Cristian Bîrzan
On Wednesday 18 October 2006 23:36, Dan Buettner wrote: > George-Cristian - is it possible that the *.frm files also got moved > about?? Nope. What I'm thinking is the logs got moved, server restarted, it created new ones and... -- George-Cristian Bîrzan Network Engineer ___

Re: Simple JOIN on three tables

2006-10-18 Thread spacemarc
2006/10/18, Peter Brawley <[EMAIL PROTECTED]>: You can join on any row(s) you like. What are you trying to acccomplish? I simply want to select the records from my three tables that are comprised in time interval. Now, the first table comprises the records until to 2004 year; the second table

Re: RE: InnoDB messup

2006-10-18 Thread Dan Buettner
I haven't tried moving things about with the server running, but have tried to clean up a hosed InnoDB installation after moving files about during an upgrade (trial run on a test system thankfully). You're probably right about the inode thing Jerry. George-Cristian - is it possible that the *.f

Re: Simple JOIN on three tables

2006-10-18 Thread William R. Mussatto
On Wed, October 18, 2006 13:21, spacemarc said: > ok, instead I use > (SELECT * FROM tab1 WHERE mydate between 'the-date1' and 'the-date2' ) > UNION > (SELECT * FROM tab2 WHERE mydate between 'the-date1' and 'the-date2' ) > etc > > But if I wanted to use a join I can make it however or not? > >

Re: Simple JOIN on three tables

2006-10-18 Thread Peter Brawley
>But if I wanted to use a join I can make it however or not? You can join on any row(s) you like. What are you trying to acccomplish? PB spacemarc wrote: ok, instead I use (SELECT * FROM tab1 WHERE mydate between 'the-date1' and 'the-date2' ) UNION (SELECT * FROM tab2 WHERE mydate between 'the

Re: Simple JOIN on three tables

2006-10-18 Thread spacemarc
ok, instead I use (SELECT * FROM tab1 WHERE mydate between 'the-date1' and 'the-date2' ) UNION (SELECT * FROM tab2 WHERE mydate between 'the-date1' and 'the-date2' ) etc But if I wanted to use a join I can make it however or not? -- http://www.spacemarc.it -- MySQL General Mailing List Fo

Re: Simple JOIN on three tables

2006-10-18 Thread Rolando Edwards
Cartesian Join Anyone ??? Rearrange Query as a UNION instead - Original Message - From: spacemarc <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Wednesday, October 18, 2006 3:46:04 PM GMT-0500 US/Eastern Subject: Simple JOIN on three tables Hi I have 3 tables with the same fields.

Re: Simple JOIN on three tables

2006-10-18 Thread William R. Mussatto
On Wed, October 18, 2006 12:46, spacemarc said: > Hi > I have 3 tables with the same fields. > > I would want to find the data that they are comprised in the time > interval: > > SELECT a.*, b.*, c.* > FROM tab1 a, tab2 b, tab3 c > WHERE a.date between '-MM-DD' and '-MM-DD' > OR b.date betw

Simple JOIN on three tables

2006-10-18 Thread spacemarc
Hi I have 3 tables with the same fields. I would want to find the data that they are comprised in the time interval: SELECT a.*, b.*, c.* FROM tab1 a, tab2 b, tab3 c WHERE a.date between '-MM-DD' and '-MM-DD' OR b.date between '-MM-DD' and '-MM-DD' OR c.date between '

Re: Some trouble with a Join after upgrade from 3.23 to 5.0

2006-10-18 Thread Anders Karlsson
This is due to a change in MySQL 5.0.12 that was done to align with SQL:2003. Here, we started to be more conservative regarding what could go into the ON clause. The whole thing is documented here: http://dev.mysql.com/doc/refman/5.0/en/join.html In your case, the JOIN would look something like

Re: Some trouble with a Join after upgrade from 3.23 to 5.0

2006-10-18 Thread Peter Brawley
>I read the documentation on this link: >http://dev.mysql.com/doc/refman/5.0/en/join.html >and found the section describing changes made to MySQL 5.0.12. >The problems is that i couldn't find any errors in the query when i >read about the new JOIN syntax described. The info you need is in that se

Re: bin-log with expire_logs_days

2006-10-18 Thread Dan Buettner
I haven't used the server variable you refer to, but instead have always used an external command piped in via cron - PURGE BINARY LOGS BEFORE and I just use a DATE_SUB function to subtract X days from today's date. http://dev.mysql.com/doc/refman/5.0/en/purge-master-logs.html It's a pretty quic

Re: Some trouble with a Join after upgrade from 3.23 to 5.0

2006-10-18 Thread Rolando Edwards
I think MySQL is being a little more strict as to expressing LEFT JOINs Notice that 'a' and 'am' are NOT TOGETHER with respect to the LEFT JOIN ... ON syntax. Maybe MySQL 3.23 is lenient with this. I know MySQL 4 is not, so MySQL 5 should not either. Try declaring article_country first then articl

Some trouble with a Join after upgrade from 3.23 to 5.0

2006-10-18 Thread nocturnal
Hi I moved a lot of databases from a 3.23 system to a new 5.0 system that was taking over because of hardware upgrades. I had no major problems until the last database. This query: SELECT a.id, a.nr, a.parent_id, a.designation, a.designation2, a.short_description, a.road_desc, ac.activestatu

bin-log with expire_logs_days

2006-10-18 Thread George Law
Hi All, I have a **high traffic** mysql 4.0.18-standard-log server running with bin-logging enabled. Right now, this must be using a default setting for expire_log_days. I do not see this anyway in "show variables" or "show status" $ echo "show variables" | sql |grep bin binlog_cache_size

Re: InnoDB messup

2006-10-18 Thread George-Cristian Bîrzan
On Wednesday 18 October 2006 21:28, Jerry Schwartz wrote: > Dan, have you tried this? It's been a really long time since I pored over > the file system internals, and it was on HFS, but what happens when you > move a file to another file system? I would think the inode for the open, > original file

Operation has been cancelled by the user

2006-10-18 Thread Pablo A. Otero
hi! In the application's log i have this message (when a query is execute): "Operation has been cancelled by the user" It´s a web application developed with ASP.NET. I try to solve it in many ways... but no success... any idea? thanks Pablo -- MySQL General Mailing List For list archives: h

RE: InnoDB messup

2006-10-18 Thread Jerry Schwartz
Dan, have you tried this? It's been a really long time since I pored over the file system internals, and it was on HFS, but what happens when you move a file to another file system? I would think the inode for the open, original file would stay in place and the daemon would keep merrily using it un

Re: InnoDB messup

2006-10-18 Thread Dan Buettner
Can you just put the files back where they were originally? Ordinarily that would be in the path set up in mysql - see SHOW VARIABLES LIKE "datadir" You do need to have your ibdata* files and ib_logfile* files all in there, assuming you weren't using the file-per-table setup (if you were then I a

InnoDB messup

2006-10-18 Thread George-Cristian Bîrzan
Hello! I'm having some troubles fixing an InnoDB messup, maybe somebody will be able to help me with at least knowing if it's a lost cause... A colleague of mine moved the ib* files around, with MySQL (5.0.15) still running, which didn't really do it justice... The problem might've been made wo

Re: Finding the 'page' number of a record, or its position in resultset

2006-10-18 Thread Gareth Adams
Jerry Schwartz the-infoshop.com> writes: > I'm still confused, are you saying that you want to know what page a team > would be on if you did a listing? > > Regards, Yes, given a query (e.g. "SELECT ... FROM teams ORDER BY score DESC, errors") which we usually add a LIMIT clause to for paginati

RE: Finding the 'page' number of a record, or its position in resultset

2006-10-18 Thread Jerry Schwartz
I'm still confused, are you saying that you want to know what page a team would be on if you did a listing? Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -Original Message- > From: news [mailto:[EMAIL

Re: Finding the 'page' number of a record, or its position in resultset

2006-10-18 Thread Gareth Adams
Jerry Schwartz the-infoshop.com> writes: > Can't you just keep track of which page you are on, and multiply by 20 > (except for the last page)? I must be missing something. > > Regards, Hi Jerry, The problem is that the page isn't necessarily known at the time we need to find out its position.

RE: Finding the 'page' number of a record, or its position in resultset

2006-10-18 Thread Jerry Schwartz
Can't you just keep track of which page you are on, and multiply by 20 (except for the last page)? I must be missing something. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -Original Message- > From:

Finding the 'page' number of a record, or its position in resultset

2006-10-18 Thread Gareth Adams
Hi, We have an application which queries our database in 'pages', i.e. uses the same query repeatedly, with a different "LIMIT x, 20" to display blocks of 20 results. I'm wondering if there's an easy way (or any way) to find out where in the resultset a particular record lies. Obviously the quer

Re: How many databases does MySQL 5 support?

2006-10-18 Thread Philip Mather
Dan, Cheers for doing the translating, I'm one of those beardy types they keep locked in a dark room writing search engines so my English isn't spectacular ;^) As Rolando points out your file system may place a limit on the number of files or directories, but to my knowledge XFS has no su

Re: Re: Query question

2006-10-18 Thread Erick Carballo
Dan, your suggestion is *exactly* what I needed! Furthermore, because of the use of the subquery, there is no need to join to table to itself, so the query may be simplified to: mysql> SELECT distinct loc1.imageId -> FROM locBridgeImageLocLevel5 as loc1 -> WHERE loc1.locLevel5Id

re: excel and Mysql?!

2006-10-18 Thread J.R. Bullington
Always being the last to input, there are lots of other database tools out there that let you do this. One in particular is DBTools Professional (which is what I use). You can ADO IMPORT Excel, MS-Access, and others like FoxPro and PostgreSQL. Another is Database Workbench, whic

Re: Re: How many databases does MySQL 5 support?

2006-10-18 Thread Dan Buettner
That does make sense, John. What Philip is saying is that you might run into problems with one of the tables used to keep track of tables and databases, before you run into problems with any hard coded limit of MySQL itself. The OS and the hardware will impose some (rather generous) restrictions

RE: excel and Mysql?!

2006-10-18 Thread Jerry Schwartz
As usual, Dan's suggestion is better than mine, especially for large amounts of data (I usually work with perhaps 100 rows, at most). When you save a spreadsheet as a text file, the columns will be delimited by tabs by default. Also, if you go with my suggestion you should probably surround any te

Re: How many databases does MySQL 5 support?

2006-10-18 Thread Rolando Edwards
Each Schema is a Subfolder under the datadir of the MySQL Instance However many folders an operating system permits is how many schemas can be created - Original Message - From: Dominik Klein <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Wednesday, October 18, 2006 10:05:17 AM GMT-0

RE: excel and Mysql?!

2006-10-18 Thread Jerry Schwartz
I do it all of the time, and once you get the hang of it this is quite easy. The simple-minded way is to generate one SQL statement per row of the original spreadsheet (assuming that each row of the spreadsheet corresponds to a row in the data base table). 1. Create a new worksheet, if neede

Re: How many databases does MySQL 5 support?

2006-10-18 Thread Dominik Klein
John M.Brown schrieb: Thanks for the info, but my question is how many databases, not so much how many rows per table or how big the database can be... I mean, how many "create database ABC" can I do before MySQL says "sorry, you can't have more than X databases". Say I create 1000 empty MySQL

RE: 'Not a valid MySQL result resource' error

2006-10-18 Thread Kristen G. Thorson
> -Original Message- > From: List [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 17, 2006 9:30 PM > To: mysql@lists.mysql.com > Subject: 'Not a valid MySQL result resource' error > > Hello, > > I'm running f.a.m.p, f =freebsd 4.7 and mysql is 3.23.52. > > Anyway, I inherited a websit

Re: How many databases does MySQL 5 support?

2006-10-18 Thread John M . Brown
Thanks for the info, but my question is how many databases, not so much how many rows per table or how big the database can be... I mean, how many "create database ABC" can I do before MySQL says "sorry, you can't have more than X databases". Say I create 1000 empty MySQL databases (meaning no

Re: How many databases does MySQL 5 support?

2006-10-18 Thread Philip Mather
John, How many databases does a single instance of MySQL Server 5.x support? I suspect you'll get a bit of a , with a 64bit machine there's a limit of 4.2 billion rows per table and with an XFS file system 8EB per table, there's a join limit specified somewhere but I don't think there's an

RE: 'Not a valid MySQL result resource' error

2006-10-18 Thread Jerry Schwartz
I don't see any code to attach to the MySQL server and select the data base you are using. This code might be in a part of the script you didn't show us, but somewhere there should be something like $db = mysql_connect(...); Better yet, $db = mysql_connect(...) or die("Unable to open data base!\

Incemental backup

2006-10-18 Thread Taymour A. El Erian
Hi, I just bough innodb hotbackup, I need to do incremental backup as I have a database which is several GB. Is it ok that I enable the binary log and using innodb hotbackup to create a full backup and use the binary log for incremental ?, if yes how do I force mysqld to write a new log after

Re: Re: RE: How to rewrite query

2006-10-18 Thread Dan Buettner
I'm not certain how MySQL handles the specific case where some columns in a record covered by a multi-column index are updated; it may update the whole index entry, or just part of it, not sure. In any case, yes, there is some overhead associated with having an index on columns that get updated.

Re: excel and Mysql?!

2006-10-18 Thread Rolando Edwards
If you have the Max Binaries of MySQL, do the following: 1) Export Excel Data to a CSV file (mydata.csv) 2) Goto MySQL and create table, without indexes to accept the data (CREATE TABLE myImportCSV) 3) Change the table layout to accept CSV i.e., ALTER TABLE myImport ENGINE = CSV; Please note that

Re: excel and Mysql?!

2006-10-18 Thread Dan Buettner
Sure, it's usually fairly straightforward to transfer data. You can export to a CSV or other delimited file, then use MySQL's LOAD DATA INFILE command to read it in. See http://dev.mysql.com/doc/refman/5.0/en/load-data.html I haven't ever tried creating tables from something in Excel automagica

excel and Mysql?!

2006-10-18 Thread Roberto William Aranda-W Roman
hello . anybody knows how to export from excel to mysql in order to create or fill a database table?? tanks for your help and patience cheers

How many databases does MySQL 5 support?

2006-10-18 Thread John M . Brown
I've looked as many places as I can think of and can't find a direct answer to my question: How many databases does a single instance of MySQL Server 5.x support? Is this because there is no logical limit? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsub

why length 3 key in utf8 use 11 bytes?

2006-10-18 Thread freebat
create index ub_city_key on ub (city(3)); id: 1 select_type: SIMPLE table: ub type: ref possible_keys: ub_id_key,ub_city_key key: ub_city_key key_len: 11 ref: const rows: 4340 Extra: Using where 1 row in set (0.00 sec) Why

Re: 'Not a valid MySQL result resource' error

2006-10-18 Thread List
Philip Mather wrote: List, Without getting into the specific problem the general debug path I'd follow would be: - 1. Make sure you are actually connected to the database, you say it's the admin area? Does the admin area login with different details? try eching the result of a "select NOW

Re: RE: How to rewrite query

2006-10-18 Thread Mindaugas
I agree that individual fields have relatively few possible values - hopefully, when those are combined in a multi-column index, he will have a greater number of unique combinations, gaining more out of the index. That's why I suggested putting stype and Is_id as the first two fields in the in

Re: 'Not a valid MySQL result resource' error

2006-10-18 Thread Philip Mather
List, Without getting into the specific problem the general debug path I'd follow would be: - 1. Make sure you are actually connected to the database, you say it's the admin area? Does the admin area login with different details? try eching the result of a "select NOW()" right at the start