Re: weird replication problem with master.info being created empty

2004-01-29 Thread Lightware Software
You need to shutdown mysql, delete the master.info and
relay-log.info files and then start mysql again.

The reason for this is because if the info files are
present then mysql uses them as is and only recreates them
from my.ini or my.cnf if absent.

This should get your replication going again.
regards Jurgen

 Have a problem, running a master/slave setup which worked
 until tonight and
 mysteriously broke with no changes to the setup at all.
 My server starts up
 fine, but the master.info and relay-log.info that are
 created are 0 bytes
 and empty. In the logfile, I get this:
 
 040128 23:00:29  Error reading slave log configuration
 040128 23:00:29  Failed to initialize the master info
 structure
 
 and when I run slave start
 
 I get this:
 
 ERROR 1201: Could not initialize master info structure,
 check permisions on
 master.info
 
 The blank files in question have okay permissions
 (mysql:mysql) as does the
 directory they're in, and they ARE getting written to,
 just nothing is being
 written. The my.cnf file also has appropriate permissions
 and is readable by
 mysql (so it's not a case of the server not knowing what
 to write in those
 files). Moreover, nothing has changed on the server
 config at all. I've
 tried resetting the master and slave but it doesn't help.
 
 I was running version 4.0.12-0 but just upgraded to
 4.0.17-0 which hasn't
 helped at all, and the only thing I can find in the
 archives are similar
 problems with the same error number that either turn out
 to be legit
 permissions errors (which isn't the case here), and this:
 http://lists.mysql.com/bugs/15135 which I don't really
 follow as far as what
 the final solution was.
 
__
http://www.webmail.co.za/dialup Webmail ISP - Cool Connection, Cool Price

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: weird replication problem with master.info being created empty

2004-01-29 Thread Lightware Software
Maybe you should check if the ip address resolved for the
master's url is correct ?

Also try using CHANGE MASTER TO
  MASTER_HOST='master host name',
  MASTER_USER='replication user name',
  MASTER_PASSWORD='replication password';

and then START SLAVE; and see what happens.

regards Jurgen


 Tried that, but no luck, they get recreated, but they
 still have 0 bytes in
 them. This is really driving me crazy because although
 it's come up before
 on lists, noone has ever really had an answer for it that
 makes sense. The
 url I mentioned earlier does say something about the
 hostname of the server
 changing, but that isn't the case here, the hostname is
 the same as always
 (should have added that in the first place).
 
 
  
  You need to shutdown mysql, delete the master.info and
  relay-log.info files and then start mysql again.
  
  The reason for this is because if the info files are
  present then mysql uses them as is and only recreates
 them
  from my.ini or my.cnf if absent.
  
  This should get your replication going again.
  regards Jurgen
  
  Have a problem, running a master/slave setup which
 worked
  until tonight and
  mysteriously broke with no changes to the setup at
 all.
  My server starts up
  fine, but the master.info and relay-log.info that are
  created are 0 bytes
  and empty. In the logfile, I get this:
  
  040128 23:00:29  Error reading slave log configuration
  040128 23:00:29  Failed to initialize the master info
  structure
  
  and when I run slave start
  
  I get this:
  
  ERROR 1201: Could not initialize master info
 structure,
  check permisions on
  master.info
  
  The blank files in question have okay permissions
  (mysql:mysql) as does the
  directory they're in, and they ARE getting written to,
  just nothing is being
  written. The my.cnf file also has appropriate
 permissions
  and is readable by
  mysql (so it's not a case of the server not knowing
 what
  to write in those
  files). Moreover, nothing has changed on the server
  config at all. I've
  tried resetting the master and slave but it doesn't
 help.
  
  I was running version 4.0.12-0 but just upgraded to
  4.0.17-0 which hasn't
  helped at all, and the only thing I can find in the
  archives are similar
  problems with the same error number that either turn
 out
  to be legit
  permissions errors (which isn't the case here), and
 this:
  http://lists.mysql.com/bugs/15135 which I don't really
  follow as far as what
  the final solution was.
  
 
 
__
http://www.webmail.co.za/dialup Webmail ISP - Cool Connection, Cool Price

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Group By Problem

2004-01-28 Thread Lightware Software
Say I have the following table (TBL):

KEY GRP VAL
 1 A 2
 2 A 3
 3 A 1

 4 B 2
 5 B 1
 6 B 3 

select KEY, max(VAL) from TBL group by GRP gives:

KEY max(VAL)

 1 3
 4 3

the desired result though is:

KEY max(VAL)

 2 3
 6 3

any ideas on how to achieve this ?


Apparently this query is invalid in other RDBMs (like
Oracle) which don't allow it. The rule is that one should
not have columns in your select that are not in the group
by section, except for the grouping functions.
MySQL though does allow it, but results can be strange as
above. I realise that some selects don't make sense eg:

select KEY, max(VAL), min(VAL) from TBL group by GRP

(which KEY should be returned ?)


I suppose one possibilty for solving my problem would be:

1. select GRP, max(VAL) from TBL group by GRP

2. for each row in 1.: 
select KEY from TBL where GRP=? and VAL=?


Any other ideas or comments ?
regards Jurgen
__
http://www.webmail.co.za/dialup Webmail ISP - Cool Connection, Cool Price

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]