Replication with failover

2005-05-18 Thread Simon Garner
Hi, Anybody have any experience with setting up MySQL replication with dynamic failover, preferably using keepalived (http://www.keepalived.org)? What we need is a system so that if the master server dies one of the slaves will become the master. It looks like it should be possible, and merely

Re: varchar(10) to decimal

2005-05-18 Thread mfatene
Hi, to convert '16.00' to 16.00, you can use select '16.00'+0 mysql select '16.00'+0; +---+ | '16.00'+0 | +---+ |16 | +---+ 1 row in set (0.08 sec) for ur columns, select col+0 from tbl; Mathias Selon Jerry Swanson [EMAIL PROTECTED]: I need to change format

Re: Export from Access

2005-05-18 Thread EP
I recently exported a large Access database to MySQL using MyODBC. It took me a while to figure out that MyODBC was the thing to try, but once I did tried it, it only took me a few minutes to do the export. I highly recommend that approach (MyODBC). -Eric Original

Re: MySQL Administrator Broke MySQL

2005-05-18 Thread Jeff Gojkovich
Nevermind. I figured it out. It somehow corrupted the db table in the mysql db. I blew that away and recreated it with just root access to all of the dbs and it works now. First I would like to start off by saying I am a complete noobie to MySQL. I have MySQL 4.0 running on a freebsd

Re: Need help in locating configuration file

2005-05-18 Thread David Logan
http://dev.mysql.com/doc/mysql/en/mysql-config.htmle=9888 If you have questions, try http://dev.mysql.com/doc/mysql/en/index.html first as you will often find the answer there. BTW this manual is for the latest version that you are using. Hi, Iam using Mysql5.04 What does it mean, To

Re: varchar(10) to decimal

2005-05-18 Thread Philippe Poelvoorde
Jerry Swanson wrote: I need to change format from varchar(10) to decimal. When I alter the table the data is trimmed. What I'm doing wrrong? TH ALTER TABLE your_table MODIFY your_column double NOT NULL DEFAULT '0.0'; should normally work. What is the command you are doing and have you example

Re: varchar(10) to decimal

2005-05-18 Thread Jerry Swanson
decimal(6,2) On 5/18/05, Philippe Poelvoorde [EMAIL PROTECTED] wrote: Jerry Swanson wrote: I need to change format from varchar(10) to decimal. When I alter the table the data is trimmed. What I'm doing wrrong? TH ALTER TABLE your_table MODIFY your_column double NOT NULL

MySQL Chinese+ 2.0beta

2005-05-18 Thread 崔屹
I recently find a way out of mysql's chinese fulltext index bug. Moreover, I use hylanda's word segment library to optimize the fulltext performance. Any tryout is welcome and I am looking forward to your suggestion. TIA. You can download MySQL Chinese+ 2.0beta from

Re: MySQL Administrator Broke MySQL

2005-05-18 Thread Gleb Paharenko
Hello. First read: http://dev.mysql.com/doc/mysql/en/privilege-system.html After that change the password and grants for [EMAIL PROTECTED] Jeff Gojkovich [EMAIL PROTECTED] wrote: First I would like to start off by saying I am a complete noobie to MySQL. I have MySQL

Re: Replication with failover

2005-05-18 Thread Gleb Paharenko
Hello. I don't remember solutions with keepalived, but this issue is discussed in the list from time to time. Search in archives at: http://lists.mysql.com/mysql Simon Garner [EMAIL PROTECTED] wrote: Hi, Anybody have any experience with setting up MySQL replication with

Re: Installing MySQL 4.1.12 on Mandrake 10.1

2005-05-18 Thread Gleb Paharenko
Hello. My questions are: Is there other files besides just the server and the client that I would need to install to get MySQL to work on Mandrake v10.1? Your data directory should contain mysql database prepared with

Re: Need help in locating configuration file

2005-05-18 Thread Gleb Paharenko
Hello. in this,is mysql_config file is same as my.ini and On Unix mysql_config reports various settings that may be needed when using the MySQL client library. Read in the PHP documentation how to install extensions for Windows binaries of PHP. madderla sreedhar [EMAIL

Re: mysql database problems

2005-05-18 Thread Gleb Paharenko
Hello. with php scripts. Now I am getting the message Unable to load database indicated by configuration file or something similiar when trying to connect to any database running on the server when the mysql user is running @localhost. Please, send the exact error messages and

Re: repair table/close table ?????

2005-05-18 Thread Gleb Paharenko
Hello. Apart from this brightmail.din_top_spam warning : 1 clients is using or hasn't closed the table properly status : After what command have you got the warning? CHECK TABLE shouldn't produce it: http://dev.mysql.com/doc/mysql/en/myisamchk-syntax.html If mysqld is

Re: mysql - Client does not support authentication protocol requested by server

2005-05-18 Thread Gleb Paharenko
Hello. See: http://dev.mysql.com/doc/mysql/en/old-client.html ymarkiv [EMAIL PROTECTED] wrote: Dear all, I'm mysql newbie. When I try to connect to mysql using php script, it answers: Warning: mysql_connect(): Client does not support authentication protocol

4.1.12 Crashing on Mandrake 10.1

2005-05-18 Thread Mark Hughes
Hi, I just upgraded from 4.1.11 (which worked fine, and stil does if I downgrade) to 4.1.12 and the first query crashes the server. This query is executed via DBD::mysql, when run via the mysql client it works OK though. I presume this must be some library conflict but has anyone got any idea

RE: Export from Access

2005-05-18 Thread Partha Dutta
I think that the best approach would be to use the MySQL Migration Toolkit. Why spend a lot of time writing a tool when something already exists, and it works with Microsoft Access? http://www.mysql.com/products/migration-toolkit/ -- Partha Dutta, Senior Consultant MySQL Inc, NY, USA,

Re: 4.1.12 Crashing on Mandrake 10.1

2005-05-18 Thread Mark Hughes
On 5/18/05, Mark Hughes [EMAIL PROTECTED] wrote: Hi, I just upgraded from 4.1.11 (which worked fine, and stil does if I downgrade) to 4.1.12 and the first query crashes the server. This query is executed via DBD::mysql, when run via the mysql client it works OK though. I presume this must

Re: mysql client update

2005-05-18 Thread Eric White
Hi All, Thanks for the feedback! On 5/17/05, David Logan [EMAIL PROTECTED] wrote: Philip Denno wrote: I'm no database expert, so I may be wrong but I do not think this functionality exists. Usually this type of notification is handled at the application level. That is build an application

Re: varchar(10) to decimal

2005-05-18 Thread mfatene
Hi, if varchar represents decimal(6,x) where x2, it's truncated. Else, it's converted : mysql create table dcml (a varchar(10)); Query OK, 0 rows affected (0.24 sec) mysql insert into dcml values('16.00'),('16.25'),('16.125'); Query OK, 3 rows affected (0.05 sec) Records: 3 Duplicates: 0

RE: varchar(10) to decimal

2005-05-18 Thread Gordon
I was all set to tell you why 16.125 became 16.12 when I ran the test on our production box. It looks like some where between 4.0.20 and 5.0.4 the ALTER TABLE to a decimal data type changed from truncation to rounding. Redhat MySQL 4.0.20 truncates all Windows XP MySQL 5.0.4 Rounds with Windows

Re: Export from Access

2005-05-18 Thread Alvaro Cobo
I've just seen the MySQL Migration Toolkit and looks very nice. Beautiful tool. On 5/17/05, S.D.Price [EMAIL PROTECTED] wrote: Hi, can anyone explain how I would export a database created in Access to MySQL using PHPMyAdmin - I can't seem to import the data as csv or txt. Thanks Steven

CONCAT

2005-05-18 Thread Seena Blace
hi, how to concat 2 columns to display in report? select column1concat column2 form table1; Concatenation Operator pl? thanks - Discover Yahoo! Stay in touch with email, IM, photo sharing more. Check it out!

RE: CONCAT

2005-05-18 Thread Jay Blanchard
[snip] how to concat 2 columns to display in report? select column1concat column2 form table1; Concatenation Operator pl? [/snip] select concat('foo', 'bar') results foobar select concat('foo', ' ', 'bar') results foo bar -- MySQL General Mailing List For list archives:

Re: QUERY (TOP)

2005-05-18 Thread Seena Blace
Thanks Shawn! Peter Brawley [EMAIL PROTECTED] wrote:Seena, That data is for one date. To test Shawn's 2-stage query I'd need a data for several days. Without your tables and data, I tried Shawn's algorithm on a test database we use a lot, nwib, which is a MySQL port of the

Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
I 'm writing a webapplication in Java that allows users to store bookmarks. The system scans these pages for differences at user-selected intervals. At another user-selected interval, the system sends notification mails about changed bookmarks. The bookmark table provisionally looks like this:

Re: Different TIMESTAMP columns

2005-05-18 Thread mfatene
Hi, look at default initialised to current_timestamp. you ca see also on update : http://dev.mysql.com/doc/mysql/en/timestamp-4-1.html Mathias Selon Lieven De Keyzer [EMAIL PROTECTED]: I 'm writing a webapplication in Java that allows users to store bookmarks. The system scans these pages

Restoring a database from binlogs

2005-05-18 Thread Jeff McKeon
Hey all, I've got a big problem. Seems one of our programmers decided to write a script that deletes all records from a log table older than 3 months. Problem is, we need old data from this log to reconcile our customer accounts. Our backups only go back 2 weeks. What I do have however is

Re: varchar(10) to decimal

2005-05-18 Thread Michael Stassen
4.1.11 truncates as well, and not just for ALTER TABLE. My tests show mysql handles input to a DECIMAL(M,D) column inconsistently: It rounds if the input is numeric, but it truncates if the input is a string. I'm guessing that because mysql 4.x stores DECIMALs as strings, it handles the

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
Yes, that's what I'm talking about. Only one column can have this current_timestamp as default statement. From: [EMAIL PROTECTED] To: Lieven De Keyzer [EMAIL PROTECTED] CC: mysql@lists.mysql.com Subject: Re: Different TIMESTAMP columns Date: Wed, 18 May 2005 19:57:43 +0200 Hi, look at default

RE: Restoring a database from binlogs

2005-05-18 Thread Dathan Pattishall
Dump the binarylogs into a text file greping all the log data in order of oldest to newest (minus the massive delete). Then reply the events backinto mysql Mysqlbinlog binlogs in order |grep [your tablename] BIGSQLFILE.sql mysql -uroot database BIGSQLFILE.sql DVP Dathan Vance

Re: Different TIMESTAMP columns

2005-05-18 Thread SGreen
Lieven De Keyzer [EMAIL PROTECTED] wrote on 05/18/2005 01:44:31 PM: I 'm writing a webapplication in Java that allows users to store bookmarks. The system scans these pages for differences at user-selected intervals. At another user-selected interval, the system sends notification mails

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
From: [EMAIL PROTECTED] To: Lieven De Keyzer [EMAIL PROTECTED] CC: mysql@lists.mysql.com Subject: Re: Different TIMESTAMP columns Date: Wed, 18 May 2005 15:05:17 -0400 Lieven De Keyzer [EMAIL PROTECTED] wrote on 05/18/2005 01:44:31 PM: I 'm writing a webapplication in Java that allows users to

RE: Restoring a database from binlogs

2005-05-18 Thread Jeff McKeon
Interesting idea. So if I take the table from Sept 10th and then do that with the binlog I'll be missing about 2 months worth of data because my earliest binlog file is Nov 12th. The queries are always one to a line in the binlog? Best Reguards, Jeff -Original Message- From:

Re: Different TIMESTAMP columns

2005-05-18 Thread SGreen
Lieven De Keyzer [EMAIL PROTECTED] wrote on 05/18/2005 03:21:02 PM: From: [EMAIL PROTECTED] To: Lieven De Keyzer [EMAIL PROTECTED] CC: mysql@lists.mysql.com Subject: Re: Different TIMESTAMP columns Date: Wed, 18 May 2005 15:05:17 -0400 Lieven De Keyzer [EMAIL PROTECTED] wrote on

Re: Restoring a database from binlogs

2005-05-18 Thread kernel
Jeff McKeon wrote: Hey all, I've got a big problem. Seems one of our programmers decided to write a script that deletes all records from a log table older than 3 months. Problem is, we need old data from this log to reconcile our customer accounts. Our backups only go back 2 weeks. What I do

Re: Different TIMESTAMP columns

2005-05-18 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: Lieven De Keyzer [EMAIL PROTECTED] wrote on 05/18/2005 03:21:02 PM: [snip] Yes, I have already considered using the DATETIME, but there is no Java class for this database type? Shawn Green Database Administrator Unimin

not a rpm package?

2005-05-18 Thread Bing Du
I downloaded MySQL-server-5.0.4-0.i386.rpm. When I did 'rpm -i MySQL-server-5.0.4-0.i386.rpm', the following message returned: MySQL-server-5.0.4-0.i386.rpm: not an rpm package (or package manifest): What's the problem? Bing -- MySQL General Mailing List For list archives:

Re: Replication with failover

2005-05-18 Thread Kevin Burton
Gleb Paharenko wrote: Hello. I don't remember solutions with keepalived, but this issue is discussed in the list from time to time. Search in archives at: http://lists.mysql.com/mysql Someone should create a wiki page on this subject... its a commonly asked question... Kevin -- Use Rojo

remote connection problem

2005-05-18 Thread Andy McHargue
I'm having trouble connecting remotely from Server A (local) to Server B (remote). Both Linux. From Server A, I'm issuing this command mysql -h [domain.com] -u [user] -p And I get ERROR 2003: Can't connect to MySQL server on 'domain.com' (110) I assume this is a time out. 1. The user on Server

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
From: Mark Matthews [EMAIL PROTECTED] To: Lieven De Keyzer [EMAIL PROTECTED] CC: [EMAIL PROTECTED], mysql@lists.mysql.com Subject: Re: Different TIMESTAMP columns Date: Wed, 18 May 2005 14:58:41 -0500 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: Lieven De Keyzer [EMAIL

access 3.23 tables on 5.0?

2005-05-18 Thread Bing Du
We moved a bunch of *.frm, *.MYD and *.MYI from 5.0 to 3.23. Now after successfully connecting to 3.23, it shows: Didn't find any fields in table 'person' Didn't find any fields in table '...' mysql desc person; ERROR 1033: Incorrect information in file: './LTM/person.frm' Is there anyway

Re: Replication with failover

2005-05-18 Thread Simon Garner
Kevin Burton wrote: Gleb Paharenko wrote: Hello. I don't remember solutions with keepalived, but this issue is discussed in the list from time to time. Search in archives at: http://lists.mysql.com/mysql Someone should create a wiki page on this subject... its a commonly asked question...

Re: Different TIMESTAMP columns

2005-05-18 Thread Simon Garner
Lieven De Keyzer wrote: But how do I initialize the 2 datetime fields? With no DEFAULT, their values are -00-00 00:00:00. Just what I wanted to avoid with TIMESTAMP Set their value to NOW() if you want the current date/time. -Simon -- MySQL General Mailing List For list archives:

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
mysql CREATE TABLE bookmark ( - bookmark_id INTEGER NOT NULL AUTO_INCREMENT, - bookmarkname VARCHAR (80) NOT NULL, - url VARCHAR (150) NOT NULL, - folder_id INTEGER NOT NULL, - last_scanned DATETIME DEFAULT NOW(), - last_notified DATETIME DEFAULT NOW(), - PRIMARY

Re: Different TIMESTAMP columns

2005-05-18 Thread Simon Garner
Lieven De Keyzer wrote: mysql CREATE TABLE bookmark ( - bookmark_id INTEGER NOT NULL AUTO_INCREMENT, - bookmarkname VARCHAR (80) NOT NULL, - url VARCHAR (150) NOT NULL, - folder_id INTEGER NOT NULL, - last_scanned DATETIME DEFAULT NOW(), - last_notified DATETIME

Restoring mySQL dump

2005-05-18 Thread Adrian Cooper
Hello, I need to restore a mySQL dump file but cannot find the right syntax. I have root access and have used: mysql -u root -p account_databasename backupname But I am getting: Access denied for user '[EMAIL PROTECTED]' (Using password: YES) I have also removed the root password and got:

Re: Restoring mySQL dump

2005-05-18 Thread Dwayne Hottinger
That is correct. The password for mysql root is probably not the same as the system root. ddh Quoting Adrian Cooper [EMAIL PROTECTED]: Hello, I need to restore a mySQL dump file but cannot find the right syntax. I have root access and have used: mysql -u root -p account_databasename

Re: Restoring mySQL dump

2005-05-18 Thread Schalk Neethling
Can you sign -in as root user i.e. Administrator? Using: mysql -u username -p password? Dwayne Hottinger wrote: That is correct. The password for mysql root is probably not the same as the system root. ddh Quoting Adrian Cooper [EMAIL PROTECTED]: Hello, I need to restore a mySQL dump file but

Re: remote connection problem

2005-05-18 Thread Andy McHargue
Here's some more data on this, if anyone can help. --I can connect the other way around ... i.e. I can connect from B to A. So there's no general connectivity problem. --did an nmap on B, $ nmap -sT -T Polite -p3306 xx.com Starting nmap V. 2.54BETA22 ( www.insecure.org/nmap/ ) Interesting

Using AVG

2005-05-18 Thread Mike Blezien
Hello, when using the AVG function like this: SELECT AVG((5+8+10)/3) AS rate; it returns NULL?? the AVG can be used to do a literal math calculation ?? TIA -- Mike(mickalo)Blezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work!

Re: Using AVG

2005-05-18 Thread Simon Garner
Mike Blezien wrote: Hello, when using the AVG function like this: SELECT AVG((5+8+10)/3) AS rate; it returns NULL?? the AVG can be used to do a literal math calculation ?? TIA That doesn't make any sense... AVG is a GROUP BY function. If you have 3 rows with values 5, 8 and 10 then surely

Re: Using AVG

2005-05-18 Thread Mike Blezien
Simon Garner wrote: Mike Blezien wrote: Hello, when using the AVG function like this: SELECT AVG((5+8+10)/3) AS rate; it returns NULL?? the AVG can be used to do a literal math calculation ?? TIA That doesn't make any sense... AVG is a GROUP BY function. If you have 3 rows with values 5, 8 and 10

Re: Using AVG

2005-05-18 Thread Dominicus Donny
Try this: SELECT AVG((5+8+10)/3) AS rate FROM an_existing_table_name; - Original Message - From: Mike Blezien [EMAIL PROTECTED] To: MySQL List mysql@lists.mysql.com Sent: Thursday, May 19, 2005 9:24 AM Subject: Using AVG Hello, when using the AVG function like this: SELECT

Re: Restoring mySQL dump

2005-05-18 Thread Karam Chand
Since I am on Windows, I prefer to use a GUI tool like SQLyog (www.webyog.com) Karam --- Adrian Cooper [EMAIL PROTECTED] wrote: Hello, I need to restore a mySQL dump file but cannot find the right syntax. I have root access and have used: mysql -u root -p account_databasename

Re: Export from Access

2005-05-18 Thread Karam Chand
If you are on Windows then you can directly import data using SQLyog's ODBC Import Tool. www.webyog.com Regards, Karam --- S.D.Price [EMAIL PROTECTED] wrote: Hi, can anyone explain how I would export a database created in Access to MySQL using PHPMyAdmin - I can't seem to import the data

Lost connection to Mysql server during query using a group by clause and sub query

2005-05-18 Thread Dan Rossi
Hi there, I am having issues with this funny error message. I am trying to do a sub query and then a group by clause on a date. However i keep getting this annoying message for some reason. Happens via terminal aswell as my sql gui. Here is the query I am trying to do select (select