Re: MySQL Slave

2008-04-18 Thread dpgirago
Hi Is there a way to find out when the MySQL Slave has been restarted. Thanks and Regards Kaushal You can determine the server actions by looking through the slave log file. David

Re: Merge Tables and Replication

2008-04-10 Thread dpgirago
[EMAIL PROTECTED] wrote: Does this sound about right? Anybody see any road hazards? If not, and this line of thinking is reasonable, should the DB with the older records also be replicated so that when a new old records table needs to be created, I don't have to repeat everything on the

Merge Tables and Replication

2008-04-08 Thread dpgirago
The recent thread about merge tables led me to explore using them with replication. I see bug reports for the 4.0.** series regarding replication and merge tables, and I've read the manual about merge table problems in the 5.0.** series ( we are using 5.0.22 ), but I'm curious if anyone has

No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread dpgirago
I'm getting an error trying to run this command: root mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ | mysql -u xxx -p xxx ERROR 1046 (3D000) at line 1: No database selected Funny thing is I know I've run this on 2 other servers with identical software without issue, however I see that

Re: No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread dpgirago
On Mon, Mar 10, 2008 at 11:07 AM, [EMAIL PROTECTED] wrote: I'm getting an error trying to run this command: root mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ | mysql -u xxx -p xxx ERROR 1046 (3D000) at line 1: No database selected mysql -D mysql -u xxx -p mysql_tzinfo_to_sql

Re: No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread dpgirago
Its example line is mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql There's a trailing mysql, which specifies the mysql database. It also specifies all zoneinfo, not America/. Thanks, Tim. I totally missed the trailing mysql. Duh! --David.

Re: Statement for a date range

2008-01-31 Thread dpgirago
I have a report that contains a WHERE statement to report on a date range in Pentaho. WHERE InOut.MOVEMENTDATE = (CURRENT_DATE - 7) I want to show on the report what the first date of this range is. Can someone help me with this statement? So if the last seven days is January 24, 2008

Re: Possible cause of error when inserting into text field ??

2007-12-06 Thread dpgirago
Hi , Someone using typo3 try to update a field tx_templavoila.flex into a table tt_content but get kicked out of typo3 without error message. The user tried with PHPmyadmin but got the same result. First thought coming to mind is the field is too small for the data being inserted but the

mysql client command \G and blob fields

2007-11-27 Thread dpgirago
I've been experimenting with storing image data in blob fields, and I was surprised that using the mysql client to select the field with a semi-colon query terminator resulted in the binary data being dumped to the terminal (with lots of beeping) while using the \G query terminator resulted in

Query Optimization

2007-11-19 Thread dpgirago
I need to check a date_time value in a number of tables for up-to-date-ness. The following query is part of a larger PHP script that runs as a cron job every 10 minutes: query select case # If within 2 minutes, do nothing. when (unix_timestamp() -

Replication Issue with Upgrade from 4.0.x to 5.0.x

2007-11-13 Thread dpgirago
I'm in process of upgrading a master server from 4.0.24-log to 5.0.22-log in a single master-slave environment. I've previously upgraded the slave to 5.0.22-log and restarted replication without issue. The current master is running on RH9 and the slave is running on CentOS 5, which is what

Re: Replication Issue with Upgrade from 4.0.x to 5.0.x

2007-11-13 Thread dpgirago
David Campbell wrote: [EMAIL PROTECTED] wrote: I'm in process of upgrading a master server from 4.0.24-log to 5.0.22-log in a single master-slave environment. I've previously upgraded the slave to 5.0.22-log and restarted replication without issue. The current master is running on RH9

Re: Replication Issue with Upgrade from 4.0.x to 5.0.x

2007-11-13 Thread dpgirago
Dave: There are no uncommented entries in /etc/hosts.deny Baron: The all servers have a unique server-id in their respective my.cnf's When I try to connect directly from the slave to the new master, I get: ERROR 2003 (HY000): Can't connect to MySQL server on '1xx.1xx.1xx.xx' (113)

Re: Slave Misbehavin'

2007-09-24 Thread dpgirago
[EMAIL PROTECTED] wrote: Howdy, I'm trying to add a second slave, slave2, running MySQL 5.0.22 on CentOS5 to our system that currently has one master and one slave, slave1, running 4.0.24, and somehow slave2 somehow ends up with too many records in many of the 30 tables in the

Slave Misbehavin'

2007-09-19 Thread dpgirago
Howdy, I'm trying to add a second slave, slave2, running MySQL 5.0.22 on CentOS 5 to our system that currently has one master and one slave, slave1, running 4.0.24, and somehow slave2 somehow ends up with too many records in many of the 30 tables in the database. Steps taken: 1. Stopped

Re: Slave Misbehavin'

2007-09-19 Thread dpgirago
Hi, [EMAIL PROTECTED] wrote: Howdy, I'm trying to add a second slave, slave2, running MySQL 5.0.22 on CentOS 5 to our system that currently has one master and one slave, slave1, running 4.0.24, and somehow slave2 somehow ends up with too many records in many of the 30 tables in the

MySQL DateTime Source on CentOS 5

2007-09-13 Thread dpgirago
I'm running Apache/MySQL/PHP5 on a CentOS 5 server and have started to get some strange date and time inconsistencies between OS time and MySQL time (now()). 1. MySQL Time: [EMAIL PROTECTED] mysql -bA Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 to

Re: Implement a logging table; avoiding conflicting inserts

2007-09-11 Thread dpgirago
Given: MySQL 4.0.12, I need to implement a pageview log with a resolution of 1 day. I propose this table: CREATE TABLE `pageviews` ( `id` int(11) NOT NULL auto_increment, `date` date NOT NULL default '-00-00', `url` char(120) NOT NULL default '', `views` mediumint(9) NOT NULL

finding count of spaces in a string

2007-09-04 Thread dpgirago
We have numerous identical tables with a varchar column that holds data like this: 0 0 0 1 0 1 0 25 7 0 139 0 9. Essentially there are a bunch of integers with a single space as a separator. There _should_ be no more than 30 entries ( and 29 spaces ), but sometimes the system misfires and

Re: finding count of spaces in a string

2007-09-04 Thread dpgirago
[EMAIL PROTECTED] wrote: We have numerous identical tables with a varchar column that holds data like this: 0 0 0 1 0 1 0 25 7 0 139 0 9. Essentially there are a bunch of integers with a single space as a separator. There _should_ be no more than 30 entries ( and 29 spaces ), but

Re: Reset a auto increment field?

2007-08-29 Thread dpgirago
Is there away to reset an auto incrementing field count? I have a database that currently has 935 records in it but because I have deleted a few the current number used for NEW records is 938 :) How can I get it to count the records and assign a record number based on the total count?

Re: 2007 MySQL Community Survey - Got Ten Minutes to Spare?

2007-08-08 Thread dpgirago
Problems again with the survey design and functionality. Page 4 asks questions about Falcon, and to be honest I don't know anything about Falcon, but you've required answers to advance and only offered yes' and no' as choices. Without a Don't know choice as an option, your results will be

RE: 2007 MySQL Community Survey - Got Ten Minutes to Spare?

2007-08-07 Thread dpgirago
Having a moment of altruism, I started doing the survey only to find that it wouldn't let me advance to the next page (from either page 1 or page 2, can't recall). I kept getting an error of an answer is required of this question even when I had provided one. No good deed goes unpunished

Master-Slave System Using Different Versions of MySQL

2007-06-15 Thread dpgirago
There was a comment this week about a v5 master having problems connecting to a v4 slave, or vice versa. Can someone shed some light on this issue. A manual reference is good, too. Thanks, David

Create Table Warning

2007-06-13 Thread dpgirago
This is a create table statement output from mysqldump from a 4.0.24 installation. Restoring on 5.0.22 gives a warning. Can anyone enlighten me? I guess I'm a little behind on my reading... David mysql CREATE TABLE `container` ( - `carrier` varchar(128) NOT NULL default '', -

Re: Create Table Warning

2007-06-13 Thread dpgirago
This is a create table statement output from mysqldump from a 4.0.24 installation. Restoring on 5.0.22 gives a warning. Can anyone enlighten me? I guess I'm a little behind on my reading... David mysql CREATE TABLE `container` ( - `carrier` varchar(128) NOT NULL default

Mysql 5.0.* client connection to Mysql 4.0.* Database

2007-06-07 Thread dpgirago
Is it possible to connect to a 4.0.18 DB from the client of a 5.0.27 system? I know there is an old_passwords function. Can this be used somehow from a DOS command prompt? David

Re: Mysql 5.0.* client connection to Mysql 4.0.* Database

2007-06-07 Thread dpgirago
Yes, I did try. The issue was the security level setting on the new DB server, and not the password stuff. I've upgraded apache, mysql, and php in the last few weeks, and 3-4 issues became painfully apparent when going from php4 to php5, so I guess I was operating under similar assumptions and

Restoring Large Tables Created with --extended-insert in mysqldump

2007-06-06 Thread dpgirago
Using mysqldump and mysql (Distribution 5.0.22) on CentOS: [?] Is it theoretically possible to create a mysqldump file using the default --opt option (i.e., with extended-inserts...) that would create packet sizes so large that the restore of the backup would fail because max_allowed_packet

Replication Complication

2007-05-30 Thread dpgirago
Howdy, Having trouble getting Slave_IO_Running to start. The master-slave system was working before, but I think the master and slave binlogs have been reset (truncated). I'm unsure how to proceed. Am I SOL? David

Re: Replication Complication

2007-05-30 Thread dpgirago
Howdy, Having trouble getting Slave_IO_Running to start. The master-slave system was working before, but I think the master and slave binlogs have been reset (truncated). I'm unsure how to proceed. Am I SOL? mysql Load Data From Master; seems to have done it. David

Re: Bin logs and mysql 4

2007-04-27 Thread dpgirago
So if one is doing a full mysqldump every night, all bin-logs can be deleted after this? If bin-logging is disabled, will master/slave syncing still occur? David Issuing a 'reset master' will purge all of the logs as well. I wouldn't just rm them, as they are being tracked in the index

Re: Borland C++ Builder 2006 DLL Woes

2007-02-20 Thread dpgirago
Thanks, Mark. We did the same thing - used the ADO Class with MyOBDC. I put a call in to the sales rep. Maybe we'll get an answer someday. David | We have settled on the ado.net connector www.mysql.com after dbExpress | pains. Although apparently dbExpress does work. | What BDS 2006 service

Borland C++ Builder 2006 DLL Woes

2007-02-13 Thread dpgirago
We just purchased The Borland Developer Studio 2006 IDE and are having significant problems using dbExpress objects to communicate with MySQL servers (both 4 and 5). Curiously, we can perform inserts but not selects, even though identical code in C++ Builder 6 worked just fine. The DLL in C++

MySQL Daylight Savings Time Patch

2007-02-09 Thread dpgirago
Is there a DST patch for MySQL 4.0.x series? I've been getting scary emails from our sys and net admins about impending doom. Thanks, David

Re: rounding digits after decimal sign

2007-01-31 Thread dpgirago
Dimitar Vassilev asks: Hello, Can anyone point me to a section of manual or link how to reduce digits after a decimal sign? I have a table mysql desc part; +-+--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra |

Mysqldump Files

2007-01-29 Thread dpgirago
Howdy Guys and Gals, We are acquiring data on background radiation in a master-slave server environment (RH9.0, MySQL 4.0.24) at the rate of approximately 19,000 records per day. The data are insert-only into about 25 of 31 tables in the database -- no updates are ever applied to the data.

RE: Mysqldump Files

2007-01-29 Thread dpgirago
Hi Mikhail, I don't think that would save much space, in terms of file size. The tables that are actively getting inserts are large and growing larger (~750,000 records), and those that have no activity are either currently empty or have less than a hundred records in them. So just dumping the

Re: Problems with INSERT

2007-01-12 Thread dpgirago
I keep getting the following error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's resources than dual monitor mode to generate the video output. Running in dual' at line 2 when I try to add:

Re: MySQL Cookbook, second edition, now available

2006-11-29 Thread dpgirago
The second edition of MySQL Cookbook (O'Reilly, 2006) is now available. The second edition brings the recipes up to date for MySQL 5.0/5.1. For example, it covers views, stored routines, triggers, and events. The second edition also adds coverage for Ruby (using the Ruby DBI module). More

Re: Calling Stored Procedures from PHP

2006-11-28 Thread dpgirago
You seem to be mimicking the prepared query feature of mysqli in PHP5. Do you have the mysqli extension available? If so, you can use things like: http://www.php.net/manual/en/function.mysqli-stmt-bind-param.php which has an example as to how to utilize a prepared query. I never

Re: perl/dbi - insert into server2.db2.table2 select * from server1.db1.table1

2006-09-29 Thread dpgirago
| Hi All, | | I have 2 separate mysql servers and need to import data from a table on | sever1 to | a table on server2. This would need to be done in Perl. | | The script in question already has open handles to both servers, so I | know I can | select all the rows from server1 and process them

auto_increment field start value

2006-09-22 Thread dpgirago
I seem to recall that when creating a table, you could designate an auto_increment field to begin counting at zero(0) instead of one (1), but I can't find an example in the documents. I'm using 4.0.16 and table type=myisam. David -- MySQL General Mailing List For list archives:

Re: auto_increment field start value

2006-09-22 Thread dpgirago
Thanks, Dan, but I can't get it to work. Defining a column like this: a int not null auto_increment=0 primary key throws an error, and while the alter table statement seems to work ok, whether the table is empty or not, it has no effect on subsequent inserts. I'm wondering if 4.0.16 has not

Re: auto_increment field start value

2006-09-22 Thread dpgirago
OK. If you assign to auto_increment any number higher than what currently exists in the column, it changes the value and the incremented sequence from that point. But apparently you can't assign the value zero to the column, even if the table is empty. Thanks, Dan, but I can't get it to work.

Re: auto_increment field start value

2006-09-22 Thread dpgirago
At 14:16 -0500 9/22/06, [EMAIL PROTECTED] wrote: I seem to recall that when creating a table, you could designate an auto_increment field to begin counting at zero(0) instead of one (1), but I can't find an example in the documents. Don't store 0 in an AUTO_INCREMENT column. Thanks Dan

Re: Insane execution time for JOIN query

2006-09-01 Thread dpgirago
On 8/31/06, Harrison Fisk ** [EMAIL PROTECTED] *** wrote: Hello, On Aug 31, 2006, at 5:12 AM, Kim Christensen wrote: Hey list; I posted this message under an earlier thread which touched the same subject - but I realized my case could be slightly different, thus posting a new

Re: help with insert +php

2006-09-01 Thread dpgirago
Marcelo, The usual advice is to echo out the query string and examine it for syntax. Assuming it has form data in it for the variables, then try copying/pasting it into the mysql client and run it from there. Let us know how that goes. David -- MySQL General Mailing List For list archives:

Re: help with insert +php

2006-09-01 Thread dpgirago
[EMAIL PROTECTED] escribió: Marcelo, The usual advice is to echo out the query string and examine it for syntax. Assuming it has form data in it for the variables, then try copying/pasting it into the mysql client and run it from there. Let us know how that goes. David Already done that

Re: Table permissions - before the table is created?

2006-08-30 Thread dpgirago
Chris Jones wrote: Can the mysql administrator grant permissions on a table in an existing database if that table doesn't exist yet? This is part of planning for an upgrade to an existing application. The mysql administrator won't be there when I add the table to the existing database and I

RE: Installing MySQL on Linux, HELP!

2004-01-15 Thread dpgirago
And then Eve said... After some trouble with rpm, I managed to create a file of installed packages. Redhat 9 says I have installed: MySQL-client-4.0.1-2 perl-DBD-MySQL-2.1021-3 mysql-3.23.58-1.9 mysql-server-3.23.58-1.9 That's right. That's what you get with RH9. I'm repeating myself here from

Query to Find Max Sum of 60 Consecutive Fields from 60 Consecutive Records

2004-01-07 Thread dpgirago
Howdy MySQL Subscribers. I'm hoping some MySQL users more experienced than myself can shed light on a work-related question that has recently arisen. We have a database with 24 meter tables similar to meter1 below. mysql explain meter1;

MySQL upgrade on RedHat 9.0

2004-01-07 Thread dpgirago
I've MySQL-3.23.54a-11 installed and running on RH 9.0 via the RedHat rpm's. I'm trying to upgrade to MySQL-4.0.17-0 via rpm's from MySQL.com. I found references from web searches and through the archives from this list that suggest that it's as easy as: shell rpm -Uvh --nodeps MySQL* but

Re: Primary key

2003-04-04 Thread dpgirago
(snip) Does creating a primary key on an int immediatly involve this one to be not null, and to auto-increment? NOT NULL - yes, but if you want to have AUTO_INCREMENT column you should declare it as AUTO_INCREMENT. Thank you very much for your reply. But I read that a PRIMARY KEY

Suggestions for choosing GUI Language that has a MySQL DB backend

2003-04-03 Thread dpgirago
Hi MySQL Listers, I'm wondering if someone might provide some guidance about what programming language might best accomplish the following. I have been asked to write an interactive GUI program that allows for the display of results from related queries. For example, launching the application

Re: Suggestions for choosing GUI Language that has a MySQL DB backend

2003-04-03 Thread dpgirago
The application will be run on windows2000. Or maybe Linux ... there is some choice ;-) Will this run on Windows or Linux? Thank you, Martin, Mitko, John Griffin, David Christensen, Michael T. Babcock, and sundisk for your replies. (Sorry for the delay...I work in several locations on

Re: Thoughts on MySQL training?

2003-04-02 Thread dpgirago
Hi Rachel, I attended a MySQL weeklong training last October -- 2002. It was 2 days of querying and data manipulation and 3 days of administration. I did not have a very significant history with MySLQ before the training, but I had read the entire manual, so the first 2 days were very

Re: Error 28

2003-04-01 Thread dpgirago
Perhaps it's this... C:\perror 28 Error code 28: No space left on device David -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: ERWin 4.1 not applicable for MySQL

2003-03-31 Thread dpgirago
I have successfully used Erwin 4.1 to connect to and model MySQl databases. Read the Erwin tutorial. You need to create an ODBC connection first. David sql, query -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Best MySQL - PHP Book(s)

2003-03-27 Thread dpgirago
Howdy, Can anyone recommend a good reference book for using PHP with MySQL? I've read and enjoyed Paul's 'DoorStop' and 'CookBook' and have a fairly good grasp of MySQL. I've also written a bare bones database browser for Win32 using Apache, MySQL, and PHP, so I'm not an absolute newbie. But a

Suggested Addition to MySQL Reference Manual

2003-03-21 Thread dpgirago
Howdy All, The MySQL Reference Manual lists 2 limitations on the way the mysql client parses /* ... */ comments, these being: Single-quote and double-quote characters are taken to indicate the beginning of a quoted string, even within a comment. If the quote is not matched by a

Re: error in crerating a database

2003-03-18 Thread dpgirago
The correct syntax for creating a database is: mysql create database databse_name; mysqladmin is a command line program, not for use inside the mysql client program. David - Before posting, please check:

Re: translation dictionary

2003-03-14 Thread dpgirago
I guess you'd have to use MySQL 4.1 to assign different character sets to different columns. Should be straight-forward at time of table creation. David *** Hello, I'm interested in building a translation dictionary: russian - french. My database

Re: suspected bug...

2003-03-13 Thread dpgirago
I could be lame, but I couldn't reproduce the error. The query worked ok for me -- using 4.0.4-beta-max-nt i posted this to the newsgroups and got told it was probably a sql parser bug so here goes... if u try to execute a query such as: insert into foo (id,textfield) values (54,'\\fred\\')

Re: list current db

2003-03-12 Thread dpgirago
[filter fodder = sql,query,queries,smallint] mysql select database(); David ** Jonathan said: ** A few days ago I asked about how to know which database I am currently in, I got an answer and I also replied to thank the send but the email was returned. Any

Re: Converting DBs

2003-03-12 Thread dpgirago
[filter fodder = sql,query,queries,smallint ] you haven't indicated what the column attributes are, but you might try putting quotes around the TRUE and FALSE values ( assuming they are being inserted into char or varchar columns). David

Colonel in Cuba with MySQL question

2003-03-10 Thread dpgirago
I inadvertantly deleted the colonel's question, which I believe concerned winmysqladmin. Please give us more info. You should be able to see your databse(s) under the database tab. David - Before posting, please check:

Re: Searching on indexed char field...

2003-03-10 Thread dpgirago
sql, mysql... You might also try indexing only a portion of the char[50] index. index UserName(20), for example... David - Before posting, please check: http://www.mysql.com/manual.php (the manual)

Re: Searching on indexed char field...

2003-03-10 Thread dpgirago
sql, mysql... oops, forgot the quotes You might also try indexing only a portion of the char[50] index. index (UserName(20)), for example... David - Before posting, please check: http://www.mysql.com/manual.php

Re: Creating a fixed length char field...

2003-03-10 Thread dpgirago
If your create table statement has both char's and varchar's in it, then MySQL converts the char's all to varchar's. - Before posting, please check: http://www.mysql.com/manual.php (the manual)

Re: problems with GRANT, user, databases

2003-03-10 Thread dpgirago
why don't you try... mysql SHOW GRANTS for 'junk'@'localhost' just to see what has been granted at present? David - Before posting, please check: http://www.mysql.com/manual.php (the manual)

Re: CASE statement within SUM()

2003-03-07 Thread dpgirago
Peter, I think something like this will work: mysql select sum( if(score=7, score * 2, score)) from table_name; David - Before posting, please check: http://www.mysql.com/manual.php (the manual)

Re: CASE statement within SUM()

2003-03-07 Thread dpgirago
That's also right: select sum( case 1 when score=7 then score * 2 else score end) from foo; [EMAIL PROTECTED] on 03/07/2003 11:28:03 AM To: Peter D Bethke [EMAIL PROTECTED], MySQL List [EMAIL PROTECTED] cc:(bcc: David P. Giragosian/MDACC) Subject: Re: CASE statement