Re: Help for a query with MYSQL 3.23.58

2004-10-08 Thread Michael Stassen
First, let's just consider finding the id_products in the products_value table which match the given list of id_values. Here are 2 ways to do accomplish that: 1) Join the table to itself once for each member of the list, requiring the id_value for each copy to match one of the values in your l

Re: How Do I Determine the Server's Version on Old Server?

2004-10-08 Thread Michael Stassen
Will mysql_get_server_info() give you what you need? Otherwise, I suppose you could SELECT VERSION(); and parse the result. Michael Matthew Boehm wrote: Hey guys, I see there is a mailing list for all other API's except the built i

How Do I Determine the Server's Version on Old Server?

2004-10-08 Thread Matthew Boehm
Hey guys, I see there is a mailing list for all other API's except the built in one. Hmmm. Anyway, I'm writing an app in C that will connect to a MySQL database server and run some queries. I'd like to use prepared statements in some cases but since prepared statements are only available in 4.1 or

RE: Convert subselect query to pre-subselect query

2004-10-08 Thread Ed Lazor
Doh... Guess I spoke too soon. I get it now. I wasn't seeing a.CategoryID=b.ID =) > -Original Message- > select a.ID > from products a, categories b > where a.CategoryID=b.ID and (b.ID='21' OR b.ParentID='21') -- MySQL General Mailing List For list archives: http://lists.mysql.co

RE: Convert subselect query to pre-subselect query

2004-10-08 Thread Ed Lazor
Thanks Remi =) I just ran a test and it worked. Honestly, I'm still a little stumped on why it works, but I'll keep playing with it for a while to see if I can get it. I'll either eventually figure it out or come back in frustration asking for more help ;) hehe > -Original Message- >

RE: Help for a query with MYSQL 3.23.58

2004-10-08 Thread Chris W. Parker
Michele on Friday, October 08, 2004 4:57 PM said: > Have I well understood the meaning of your answer ? It was meant as a joke and not a serious response to your question. I apologize for the confusion. Chris. -- MySQL General Mailing List For list archives: htt

Re: Convert subselect query to pre-subselect query

2004-10-08 Thread Remi Mikalsen
Try this... select a.ID from products a, categories b where a.CategoryID=b.ID and (b.ID='21' OR b.ParentID='21') The query is pretty straigthforward and I believe it's quite easy to understand. Hope this is what you wanted! A tip... only use left and right joins whenever you want what is on t

Re: Help for a query with MYSQL 3.23.58

2004-10-08 Thread Michele
> 2) I'm looking for id_product that can contemporaneously satisfy more > than an id_value (NOT ONLY ONE!!) contemporaneously? that's got be one of the best made up wor... wait what? you mean it's a real word? http://dictionary.reference.com/search?q=contemporaneously I'm not sure to understand

Re: How to extract Particular Tables from a Dump file taken with mysqldump

2004-10-08 Thread Mikael Fridh
On Friday 08 October 2004 20.39, Anil Doppalapudi wrote: > we want to know is > there any mysql utility to extract only specified table from entire dump This script will probably mess up on binary data and stuff but it works fine for plain text dumps... try mysqldumpgrep mysql user < a_dump.sql.

Convert subselect query to pre-subselect query

2004-10-08 Thread Ed Lazor
Hi Everyone, I got excited when I discovered subselects, but quickly discovered that 4.1 is still in gamma and I can't put it onto my production server. The query I wanted to use would be great, so maybe there's a way to convert it - since the manual says most subselects can be done with joins.

Re: Restarting Replication from Backup

2004-10-08 Thread Gary Richardson
Yeah, that's exactly what I figured out.. We do record the SHOW SLAVE STATUS settings before each backup. I find we need individual tables restored far more frequently than whole databases. It's much easier using mysqldump and perl to dump each table in text to its own file. This is especially tru

Re: Restarting Replication from Backup

2004-10-08 Thread Mikael Fridh
On Friday 08 October 2004 19.01, Gary Richardson wrote: > Hey guys, > > I'm running a master/slave setup with v4.0.20. There are a hand full > of databases being replicated. For backups, we stop replication on the > slave and pull a text dump using mysqldump. I also record a 'SHOW > SLAVE STATUS' f

RE: Help for a query with MYSQL 3.23.58

2004-10-08 Thread Chris W. Parker
Michele on Friday, October 08, 2004 3:23 PM said: > 2) I'm looking for id_product that can contemporaneously satisfy more > than an id_value (NOT ONLY ONE!!) contemporaneously? that's got be one of the best made up wor... wait what? you mean it's a real word? http:

Help for a query with MYSQL 3.23.58

2004-10-08 Thread Michele
Could you help me with a query? 1) I know some values of id_value in the table below : PRODUCTS_VALUE. 2) I'm looking for id_product that can contemporaneously satisfy more than an id_value (NOT ONLY ONE!!) For example I'm looking for all id_product that can contemporaneously satisfy (id_value=

Re: Restarting Replication from Backup

2004-10-08 Thread Gary Richardson
Hey guys, I think I have this figured out. I'm just doing some testing. If I manually recreate the master.info file, it sort of works, but I get the following error from the IO thread: Error reading relay log event: slave SQL thread aborted because of I/O error So, instead of manually creating t

RE: How would you make a smarter Search?

2004-10-08 Thread SGreen
Have you considered creating a full text index on that field? http://dev.mysql.com/doc/mysql/en/CREATE_INDEX.html http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html Shawn Green Database Administrator Unimin Corporation - Spruce Pine "Chris W. Parker" <[EMAIL PROTECTED]> wrote on 10/08/2004 0

Re: How would you make a smarter Search?

2004-10-08 Thread Remi Mikalsen
Hello... here you have, in my opinion, a nice solution. To see what kind of search options you can use, visit my site, click on "Search Tips" on the Internal Search Engine. Here is the query: select column1, match(column1) against ('+orange -fruit' IN BOOLEAN MODE) as score from some_table whe

Re: How to extract Particular Tables from a Dump file taken with mysqldump

2004-10-08 Thread Hassan Schroeder
Anil Doppalapudi wrote: The actual problem is we maintain regular all-databases mysqldump.it is a automated script and after taking complete backup we purged data later we identified that some required data is missed in a particular table. so we require restore of only that particular table. we tri

Re: Restarting Replication from Backup

2004-10-08 Thread stanner
I meant that it would be beneficial to do the reset on the master at the same time you issue the stop slave, so that the binary log file on the master would only contain updates that are not the backup. It would be very difficult to ensure data integrity though - if an update happened betwe

RE: How would you make a smarter Search?

2004-10-08 Thread Chris W. Parker
Dan Venturini on Friday, October 08, 2004 11:51 AM said: > Now If I do a search for "cleaning mouse" I get 0 results. If I do > "cleaning computer' I get 0 results. But If I do mouse cleaning, > mouse, cleaning your,I get the articles. [snip] > My question is am I

Re: How would you make a smarter Search?

2004-10-08 Thread GH
I am interested in this too... Dan if you figure out a way I would be most interested... On Fri, 8 Oct 2004 14:50:49 -0400 (EDT), Dan Venturini <[EMAIL PROTECTED]> wrote: > Hello all Here is my problem. > I am searching titles in an article database. > I have two titles: > > mouse cleaning > a

How would you make a smarter Search?

2004-10-08 Thread Dan Venturini
Hello all Here is my problem. I am searching titles in an article database. I have two titles: mouse cleaning and cleaning your computer Now If I do a search for "cleaning mouse" I get 0 results. If I do "cleaning computer' I get 0 results. But If I do mouse cleaning, mouse, cleaning your,I get t

Re: How to extract Particular Tables from a Dump file taken with mysqldump

2004-10-08 Thread V. M. Brasseur
There is no MySQL-supplied utility for this purpose. Perl, awk, or some other scripting language will have to be called into play. --V Anil Doppalapudi wrote: The actual problem is we maintain regular all-databases mysqldump.it is a automated script and after taking complete backup we purged dat

RE: How to extract Particular Tables from a Dump file taken with mysqldump

2004-10-08 Thread Anil Doppalapudi
The actual problem is we maintain regular all-databases mysqldump.it is a automated script and after taking complete backup we purged data later we identified that some required data is missed in a particular table. so we require restore of only that particular table. we tried extracting only that

Re: How to extract Particular Tables from a Dump file taken with mysqldump

2004-10-08 Thread Gary Richardson
They dump files are just mysql CREATE TABLE and INSERT statements. You can you a perl script to read the dump file line by line and switch output files when it hits a 'CREATE TABLE ' On Fri, 8 Oct 2004 23:14:07 +0530, Buchibabu <[EMAIL PROTECTED]> wrote: > Hi, > > Please let me know how to extra

Re: data with dynamic schema stored in a column as a property list.

2004-10-08 Thread SGreen
Thanks for the history. It's always good to learn how these things come into existence. There are some storage schemes for hierarchical information that you may be able to apply to your needs. Here is a good tutorial various methods: http://www.sitepoint.com/article/hierarchical-data-database (

Re: How to extract Particular Tables from a Dump file taken with mysqldump

2004-10-08 Thread V. M. Brasseur
Why don't you use the mysqldump program to dump only those tables you want and not the entire database? http://dev.mysql.com/doc/mysql/en/mysqldump.html Cheers, --V Buchibabu wrote: Hi, Please let me know how to extract few tables from a dump file, which is taken with mysqldump. I know it extrac

Re: Restarting Replication from Backup

2004-10-08 Thread Gary Richardson
Hey, The perl script that does the backup issues a SLAVE STOP just before it starts dumping. It also grabs SHOW SLAVE STATUS, which has a bunch of file positions and I'm pretty sure it's everything that is in the master.info file. The backup I'd be pulling is going to be at least a day old, so it

Re: select/query from two tables

2004-10-08 Thread SGreen
You didn't try it, did you 8-). In a nutshell a basic SELECT statement looks like: SELECT /columns list/ FROM /tables list/ WHERE /conditions list/ The /columns list/ is where you specify all of the values you want from the database, including constant and computed values The /tables list/

Re: data with dynamic schema stored in a column as a property list.

2004-10-08 Thread Elim Qiu
Thanks Shawn. I guess your suggestion maybe the only thing I can do about it. But the problem itself has an interesting background: I developed an web application handling dynamic online conference registrations; including a table BusinessSeason to hold the information about the registration spe

How to extract Particular Tables from a Dump file taken with mysqldump

2004-10-08 Thread Buchibabu
Hi, Please let me know how to extract few tables from a dump file, which is taken with mysqldump. I know it extracting a file. But the thing is I would like to do it with mysql. Thanks, Buchibabu

Re: Restarting Replication from Backup

2004-10-08 Thread stanner
Gary, We go through the process of removing the slave DB and restoring from backup on a fairly regular basis (due to testing new functionality of our app). My first question would be about your backups - how are you doing them? If you are doing a filesystem backup (taring the entire

Re: select/query from two tables

2004-10-08 Thread Michael Stassen
No. You only get one FROM clause, so it's "SELECT columns FROM tables...". See the manual for complete details of SELECT syntax . Michael leegold wrote: On Fri, 8 Oct 2004 12:22:37 -0400, [EMAIL PROTECTED] said: I think that this will work: $query =

Re: select/query from two tables

2004-10-08 Thread leegold
On Fri, 8 Oct 2004 12:22:37 -0400, [EMAIL PROTECTED] said: > I think that this will work: > > $query = "SELECT page.*, url.* FROM `page` LEFT JOIN `keywords` USING > (`page_id`) LEFT JOIN URL USING (`page_id`) WHERE MATCH > (`keywords`.`keyword_txt`) AGAINST ('$keyword' > IN BOOLEAN MODE)"; Sor

Restarting Replication from Backup

2004-10-08 Thread Gary Richardson
Hey guys, I'm running a master/slave setup with v4.0.20. There are a hand full of databases being replicated. For backups, we stop replication on the slave and pull a text dump using mysqldump. I also record a 'SHOW SLAVE STATUS' from the time of the backup. My replica server crashed last night.

Re: select/query from two tables

2004-10-08 Thread SGreen
I think that this will work: $query = "SELECT page.*, url.* FROM `page` LEFT JOIN `keywords` USING (`page_id`) LEFT JOIN URL USING (`page_id`) WHERE MATCH (`keywords`.`keyword_txt`) AGAINST ('$keyword' IN BOOLEAN MODE)"; Shawn Green Database Administrator Unimin Corporation - Spruce Pine "lee

issues with mysql cluster

2004-10-08 Thread Victor Medina
Hi all! When dealing with MySQL clusters using ndb... I have configured a 4 nodes under linux. I would like to access the 4nodes cluster using jdbc... how do i specify that the application should connect to any of the db servers in the cluster using connector/j? Vic. -- MySQL General Mailing

select/query from two tables

2004-10-08 Thread leegold
A popular question, how to select/query from two tables. I googled it but am having trouble, wondered if anyone would answer this newbie question. Here's my existing (PHP) query: $query = "SELECT page.* FROM `page` LEFT JOIN `keywords` USING (`page_id`) WHERE MATCH (`keywords`.`keyword_txt`) AGAIN

Re: Replication problem with a cross database query

2004-10-08 Thread Paul Fierro
On 10/06/2004 6:23 PM, Bill Thomason <[EMAIL PROTECTED]> wrote: > I originally posted a query about a problem entitled "Table doesn't > exist on query replication problem..." > > The original title might be a little misleading. The slave replication > is halting on a transaction that contains a

RE: 2003 server problem

2004-10-08 Thread Ed Lazor
Have you checked the mysql log files in c:\mysql\data? > -Original Message- > From: Dominic James [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 07, 2004 10:01 PM > To: [EMAIL PROTECTED] > Subject: 2003 server problem > > I am having trouble intalling versions 4.02 and 4.1 onto serv

Re: MySQL Databases in Subdirectories?

2004-10-08 Thread Justin Smith
We're trying to avoid the following scenarios: Using one database for every site, and having 100,000 subdirectories of the MySQL data directory; -or- Using one (or more) tables in a single database for each site, and having x00,000 table files. Either of the above would make maintenance (backups

Re: Multiple Databases or One?

2004-10-08 Thread SGreen
David Blomstrom <[EMAIL PROTECTED]> wrote on 10/07/2004 05:37:08 PM: > I'm working on several websites that will be driven > primarily by two databases - Geography and Animals. > The Geography database will feature information about > nations, provinces and states, such as capitals, > population,

Re: Optimize queries

2004-10-08 Thread SGreen
You may still be able to do this as a single query: SELECT SUM(if(field1='myvalue',1,0)) as bigTotal, SUM(if(category1 = 'myvalue',1,0)) as categoryTotal, SUM(if(category1 = 'myvalue',1.0,0))/SUM(if(field1='myvalue',1.0,0)) as CategoryPercent FROM table It performs a t

Loading MySQL on 2003 server

2004-10-08 Thread Jerry Ryan
I am trying to load MySQL on my 2003 server and getting an error message " Product: MySQL Configuration -- Error 1920.Service MySql (MySql) failed to start. Verify that you have sufficient privileges to start system services." I am logged in on the server as administrator so I don't understand wh

Need help optimizing full-text searches

2004-10-08 Thread Grant Giddens
Hi, I currently have a table with 2 text fields, both of which are marked as fulltext. I'm using the full-text boolean search method with fairly good results. My problems however are: 1. I am on a shared host provider so I can't tweak the full-text search options such as stop words or minimu

Re[2]: Optimize queries

2004-10-08 Thread Jacques Jocelyn
Hello Dobromir, Friday, October 8, 2004, 3:47:06 PM, you wrote: DV> Hi, DV> Using sub-selects (MySQL 4.1 and higher) you can use something like DV> select count(*)/(select count(*) from table where field1='myvalue') as DV> percentage from table where category='myvalue' group by category; DV>

Reg : eliminating duplicate entries

2004-10-08 Thread Anil Doppalapudi
Try this Take dump of table using mysqldump utility eg : mysqldump --quick --allow-keywords --no-create-info > Then truncate table data eg: mysql>truncate table ; create primary or unique keys what ever you want on table Then restore the data from dump file with the following options my

Re: data with dynamic schema stored in a column as a property list.

2004-10-08 Thread SGreen
Have you considered a combination of Full-text indexing (to quickly locate a subset of records that may match your criteria) and regular expression matching (to eliminate the non-matching results from the results of the full-text search)? I know it's two steps but your "data" is practically op

Innodb foreign keys names

2004-10-08 Thread Richard - CEDRICOM
Hi everybody, Still have a problem with naming "foreign key" constraints on innodb tables. Can't retrieve any of the name that was given to the constraints. "Internally generated" IDs are always given to the foreign keys... no way to apply a "drop foreign key 0_" on a replicated server or ger

Restoring few tables from all-databases dump file

2004-10-08 Thread Anil Doppalapudi
Hi, Regularly we maintain backup of all databases using mysqldump utility. Most of the times i am getting requests from our QA department to restore a particular table or particular database to check purging scripts and other scripts. Is there any way to restore a particular table or databases fr

Re: Optimize queries

2004-10-08 Thread Dobromir Velev
Hi, Using sub-selects (MySQL 4.1 and higher) you can use something like select count(*)/(select count(*) from table where field1='myvalue') as percentage from table where category='myvalue' group by category; but I don't think you will gain much in performance this way. I'd rather use two queri

起動しません。

2004-10-08 Thread ukiana
*ãããåãåã >sh ./mysql.server start ãèå >Starting mysqld daemon with databases from /usr/local/var 041008 22:05:29 mysqld ended ãèçãããçä ããã 041008 22:05:29 mysqld started /usr/local/libexec/mysqld: unrecognized option `--key_buffer=16M' /usr/local/libexec/my

Re: optimizing InnoDB tables

2004-10-08 Thread Dobromir Velev
Hi, According to the manual - http://dev.mysql.com/doc/mysql/en/OPTIMIZE_TABLE.html http://dev.mysql.com/doc/mysql/en/InnoDB_File_Defragmenting.html running a null ALTER statement - ALTER TABLE tbl-name type=INNODB; will rebuild the table thus optimizing the way the table is written to the disk.

Re: Delete duplicate entry

2004-10-08 Thread gerald_clark
Daniel Kasak wrote: gerald_clark wrote: Batara Kesuma wrote: Hi, I have a table that looks like: CREATE TABLE `message_inbox` ( `member_id` mediumint(8) unsigned NOT NULL default '0', `message_id` int(10) unsigned NOT NULL default '0', `new` enum('y','n','replied') NOT NULL default 'y', `datet

Re: Naming constraints

2004-10-08 Thread Martijn Tonies
> So how is it possible to drop a foreign key in a master / slave replication > ? the autogenerated-naming constraint should be different ? I have no idea. > How automatic database structure update can be executed (from a script > generetor like PowerDesigner) ? With regards, Martijn Tonies

reduced installation

2004-10-08 Thread roland
Hello, I am new to Mysql well relatively anyway. I want to install it on an embedded PC 104 linux machine but have a problem. -Limited space less than 8MB flash disk I have decided to look at installing the binary dstribution according to the instruction in the manual but then only loading the

Re: 2003 server problem

2004-10-08 Thread Martin Gainty
Dominic Take a look at the steps necessary to connect to MySQL 1)Server running 2)Setting up GRANTS 3)Setup users and access permissions http://dev.mysql.com/doc/mysql/en/Access_denied.html HTH, Martin- - Original Message - From: "Dominic James" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>

Re: Naming constraints

2004-10-08 Thread Richard - CEDRICOM
So how is it possible to drop a foreign key in a master / slave replication ? the autogenerated-naming constraint should be different ? How automatic database structure update can be executed (from a script generetor like PowerDesigner) ? thanks... ""Martijn Tonies"" <[EMAIL PROTECTED]> a écrit

Re: Naming constraints

2004-10-08 Thread Martijn Tonies
Hello, > I have problem in naming foreign key constraints : --8<-- > Actually, the name for the just created constraint is an 'internally > generated id' (i.e :0_023), so the update script can't find the named > constraint 'fktblnumb' > > The "show create table tblnumbers" outputs : > > CREATE

Naming constraints

2004-10-08 Thread Richard - CEDRICOM
Hi, I have problem in naming foreign key constraints : Engine : mySql 4.1.1 and/or 5.0.0a System : Windows 2000 sp4 and / or win NT 4 sp6a Here is a script example of what I need to do : /* Script 1 */ CREATE TABLE tblphone ( nameid INT PRIMARY KEY AUTO_INCREMENT, fnameVARCHAR(30),

Optimize queries

2004-10-08 Thread Jacques Jocelyn
Hello there, Until I had query time restriction due to my web hoster. Meaning whenever the query was too long, it gets killed ! Now I have changed my webhoster, I'd like to optimize my queries and I would like to have your opinion on that. I wrote multiple queries to prevent any long query