Replication Error

2008-08-19 Thread Krishna Chandra Prajapati
Hi,

I am setting up replication and got the error below

mysql change master to master_host='172.20.1.189', master_user='repl',
master_password='pass';
Query OK, 0 rows affected (0.01 sec)

mysql start slave;
ERROR 1200 (HY000): The server is not configured as slave; fix in config
file or with CHANGE MASTER TO
mysql exit
Bye
[EMAIL PROTECTED] ~]# tail /var/log/mysql/mysqld.log
080819 12:53:31 [Note] /usr/libexec/mysqld: Normal shutdown

080819 12:53:31  InnoDB: Starting shutdown...
080819 12:53:33  InnoDB: Shutdown completed; log sequence number 0 43665
080819 12:53:33 [Note] /usr/libexec/mysqld: Shutdown complete

080819 12:53:34  InnoDB: Started; log sequence number 0 43665
080819 12:53:34 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.45-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
Source distribution
080819 12:55:41 [Warning] Neither --relay-log nor --relay-log-index were
used; so replication may break when this MySQL server acts as a slave and
has his hostname changed!! Please use
'--relay-log=/var/run/mysqld/mysqld-relay-bin' to avoid this problem.


-- 
Krishna Chandra Prajapati


Re: Replication Error

2008-08-19 Thread Ananda Kumar
is the server_id and relay_log and relay_index parameter set in my.cnf

On 8/19/08, Krishna Chandra Prajapati [EMAIL PROTECTED] wrote:

 Hi,

 I am setting up replication and got the error below

 mysql change master to master_host='172.20.1.189', master_user='repl',
 master_password='pass';
 Query OK, 0 rows affected (0.01 sec)

 mysql start slave;
 ERROR 1200 (HY000): The server is not configured as slave; fix in config
 file or with CHANGE MASTER TO
 mysql exit
 Bye
 [EMAIL PROTECTED] ~]# tail /var/log/mysql/mysqld.log
 080819 12:53:31 [Note] /usr/libexec/mysqld: Normal shutdown

 080819 12:53:31  InnoDB: Starting shutdown...
 080819 12:53:33  InnoDB: Shutdown completed; log sequence number 0 43665
 080819 12:53:33 [Note] /usr/libexec/mysqld: Shutdown complete

 080819 12:53:34  InnoDB: Started; log sequence number 0 43665
 080819 12:53:34 [Note] /usr/libexec/mysqld: ready for connections.
 Version: '5.0.45-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
 Source distribution
 080819 12:55:41 [Warning] Neither --relay-log nor --relay-log-index were
 used; so replication may break when this MySQL server acts as a slave and
 has his hostname changed!! Please use
 '--relay-log=/var/run/mysqld/mysqld-relay-bin' to avoid this problem.


 --
 Krishna Chandra Prajapati



Re: Replication Error

2008-08-19 Thread Krishna Chandra Prajapati
Server_id is set but not relay_log and relay_index.

On Tue, Aug 19, 2008 at 1:20 PM, Ananda Kumar [EMAIL PROTECTED] wrote:

 is the server_id and relay_log and relay_index parameter set in my.cnf


 On 8/19/08, Krishna Chandra Prajapati [EMAIL PROTECTED] wrote:

 Hi,

 I am setting up replication and got the error below

 mysql change master to master_host='172.20.1.189', master_user='repl',
 master_password='pass';
 Query OK, 0 rows affected (0.01 sec)

 mysql start slave;
 ERROR 1200 (HY000): The server is not configured as slave; fix in config
 file or with CHANGE MASTER TO
 mysql exit
 Bye
 [EMAIL PROTECTED] ~]# tail /var/log/mysql/mysqld.log
 080819 12:53:31 [Note] /usr/libexec/mysqld: Normal shutdown

 080819 12:53:31  InnoDB: Starting shutdown...
 080819 12:53:33  InnoDB: Shutdown completed; log sequence number 0 43665
 080819 12:53:33 [Note] /usr/libexec/mysqld: Shutdown complete

 080819 12:53:34  InnoDB: Started; log sequence number 0 43665
 080819 12:53:34 [Note] /usr/libexec/mysqld: ready for connections.
 Version: '5.0.45-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
 Source distribution
 080819 12:55:41 [Warning] Neither --relay-log nor --relay-log-index were
 used; so replication may break when this MySQL server acts as a slave and
 has his hostname changed!! Please use
 '--relay-log=/var/run/mysqld/mysqld-relay-bin' to avoid this problem.


 --
 Krishna Chandra Prajapati





-- 
Krishna Chandra Prajapati


Re: Replication Error

2008-08-19 Thread Ananda Kumar
u need to set those parameters

On 8/19/08, Krishna Chandra Prajapati [EMAIL PROTECTED] wrote:

 Server_id is set but not relay_log and relay_index.

 On Tue, Aug 19, 2008 at 1:20 PM, Ananda Kumar [EMAIL PROTECTED] wrote:

 is the server_id and relay_log and relay_index parameter set in my.cnf


 On 8/19/08, Krishna Chandra Prajapati [EMAIL PROTECTED] wrote:

 Hi,

 I am setting up replication and got the error below

 mysql change master to master_host='172.20.1.189', master_user='repl',
 master_password='pass';
 Query OK, 0 rows affected (0.01 sec)

 mysql start slave;
 ERROR 1200 (HY000): The server is not configured as slave; fix in config
 file or with CHANGE MASTER TO
 mysql exit
 Bye
 [EMAIL PROTECTED] ~]# tail /var/log/mysql/mysqld.log
 080819 12:53:31 [Note] /usr/libexec/mysqld: Normal shutdown

 080819 12:53:31  InnoDB: Starting shutdown...
 080819 12:53:33  InnoDB: Shutdown completed; log sequence number 0 43665
 080819 12:53:33 [Note] /usr/libexec/mysqld: Shutdown complete

 080819 12:53:34  InnoDB: Started; log sequence number 0 43665
 080819 12:53:34 [Note] /usr/libexec/mysqld: ready for connections.
 Version: '5.0.45-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
 Source distribution
 080819 12:55:41 [Warning] Neither --relay-log nor --relay-log-index were
 used; so replication may break when this MySQL server acts as a slave and
 has his hostname changed!! Please use
 '--relay-log=/var/run/mysqld/mysqld-relay-bin' to avoid this problem.


 --
 Krishna Chandra Prajapati







 --
 Krishna Chandra Prajapati





Program to restore incrementally

2008-08-19 Thread נור דאוד
Hello List,

I am searching for a program that would allow me to restore incrementally. 
Meaning, to be able to restore only few records from a previous backup.
Is there any program available that can do this?

Thanks in advance.

Noor





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



Create temorary tables

2008-08-19 Thread Günter Radakovits
Hi there,

 

is there any possibility to create temporary tables with storage engine 
ndbcluster?

 

Thanks in advance

Günter 

 



convert week of the year into a date string

2008-08-19 Thread Ananda Kumar
HI All,
I have table which stores week_of_the_year and year.
For example

week_of_yearYEAR
32  2008

I want to convert this into the date. That is , i need to get the date of
first day of the week 32.
some thing like

03-AUG-2008.

Regards
anandkl


Re: Replication Error

2008-08-19 Thread Jim Lyons
you need to be sure you have everything the server needs to be a slave
defined in your my.cnf file, especially the relay logs and that the
replication slave user is created properly.

On Tue, Aug 19, 2008 at 2:37 AM, Krishna Chandra Prajapati 
[EMAIL PROTECTED] wrote:

 Hi,

 I am setting up replication and got the error below

 mysql change master to master_host='172.20.1.189', master_user='repl',
 master_password='pass';
 Query OK, 0 rows affected (0.01 sec)

 mysql start slave;
 ERROR 1200 (HY000): The server is not configured as slave; fix in config
 file or with CHANGE MASTER TO
 mysql exit
 Bye
 [EMAIL PROTECTED] ~]# tail /var/log/mysql/mysqld.log
 080819 12:53:31 [Note] /usr/libexec/mysqld: Normal shutdown

 080819 12:53:31  InnoDB: Starting shutdown...
 080819 12:53:33  InnoDB: Shutdown completed; log sequence number 0 43665
 080819 12:53:33 [Note] /usr/libexec/mysqld: Shutdown complete

 080819 12:53:34  InnoDB: Started; log sequence number 0 43665
 080819 12:53:34 [Note] /usr/libexec/mysqld: ready for connections.
 Version: '5.0.45-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
 Source distribution
 080819 12:55:41 [Warning] Neither --relay-log nor --relay-log-index were
 used; so replication may break when this MySQL server acts as a slave and
 has his hostname changed!! Please use
 '--relay-log=/var/run/mysqld/mysqld-relay-bin' to avoid this problem.


 --
 Krishna Chandra Prajapati




-- 
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com


MySQL 6.0.6 Alpha has been released

2008-08-19 Thread Timothy Smith
Dear MySQL users,

MySQL 6.0.6-alpha, a new version of the MySQL database system has
been released. The main page for MySQL 6.0 release is at

http://www.mysql.com/mysql60/

MySQL 6.0 includes two new storage engines: the transactional
Falcon engine, and the crash-safe Maria engine.

If you are new to the Falcon storage engine and need more
information, please read the Falcon Evaluation Guide at

http://www.mysql.com/why-mysql/white-papers/falcon-getting-started.php

and the Falcon White Paper at

http://www.mysql.com/why-mysql/white-papers/storage-engines-falcon.php

The Maria storage engine is a crash safe version of MyISAM. Maria
supports all of the main functionality of the MyISAM engine, but
includes recovery support (in the event of a system crash), full
logging (including CREATE, DROP, RENAME and TRUNCATE operations),
all MyISAM row formats and a new Maria specific row format.  Maria
is documented at

http://dev.mysql.com/doc/refman/6.0/en/se-maria.html

MySQL 6.0.6-alpha is available in source and binary form for a
number of platforms from our download pages at

http://dev.mysql.com/downloads/mysql/6.0.html

and mirror sites. Note that not all mirror sites may be up to date
at this point in time, so if you can't find this vers ion on some
mirror, please try again later or choose another download site.

We welcome and appreciate your feedback, bug reports, bug fixes,
and patches at

http://forge.mysql.com/wiki/Contributing

The following section lists the changes in the MySQL source code
since the previous version of MySQL 6.0.  It can also be viewed at

http://dev.mysql.com/doc/refman/6.0/en/news-6-0-6.html

Sincerely,

Timothy Smith
The MySQL build team at Sun Microsystems

===

News from the Changelog:

Functionality added or changed:

* Important Change: Incompatible Change: The FEDERATED storage
  engine is now disabled by default in binary distributions. The
  engine is still available and can be enabled by starting the
  server with the --federated option.
  (Bug#37069: http://bugs.mysql.com/37069)

* Incompatible Change: The engines column in the
  mysql.online_backup table has been renamed to drivers to better
  reflect its contents.
  (Bug#34965: http://bugs.mysql.com/34965)

* Incompatible Change: A change has been made to the way that
  the server handles prepared statements. This affects prepared
  statements processed at the SQL level (using the PREPARE
  statement) and those processed using the binary client-server
  protocol (using the mysql_stmt_prepare() C API function).
  Previously, changes to metadata of tables or views referred to
  in a prepared statement could cause a server crash when the
  statement was next executed, or perhaps an error at execute time
  with a crash occurring later. For example, this could happen
  after dropping a table and recreating it with a different
  definition.  Now metadata changes to tables or views referred to
  by prepared statements are detected and cause automatic
  repreparation of the statement when it is next executed.
  Metadata changes occur for DDL statements such as those that
  create, drop, alter, rename, or truncate tables, or that
  analyze, optimize, or repair tables. Repreparation also occurs
  after referenced tables or views are flushed from the table
  definition cache, either implicitly to make room for new entries
  in the cache, or explicitly due to FLUSH TABLES.  Repreparation
  is automatic, but to the extent that it occurs, performance of
  prepared statements is diminished.  Table content changes (for
  example, with INSERT or UPDATE) do not cause repreparation, nor
  do SELECT statements.  An incompatibility with previous versions
  of MySQL is that a prepared statement may now return a different
  set of columns or different column types from one execution to
  the next. For example, if the prepared statement is SELECT *
  FROM t1, altering t1 to contain a different number of columns
  causes the next execution to return a number of columns
  different from the previous execution.  Older versions of the
  client library cannot handle this change in behavior. For
  applications that use prepared statements with the new server,
  an upgrade to the new client library is strongly recommended.
  Along with this change to statement repreparation, the default
  value of the table_definition_cache system variable has been
  increased from 128 to 256. The purpose of this increase is to
  lessen the chance that prepared statements will need
  repreparation due to referred-to tables/views having been
  flushed from the cache to make room for new entries.  A new
  status variable, Com_stmt_reprepare, has been introduced to
  track the number of repreparations.
  (Bug#27420: http://bugs.mysql.com/27420,
   Bug#27430: http://bugs.mysql.com/27430,
   Bug#27690: http://bugs.mysql.com/27690)

* Important Change: Some changes were made to CHECK TABLE ...
  FOR UPGRADE and 

Lost connection

2008-08-19 Thread Mad Unix
Hi all

During the update of the MySQL DB (delete/insert), I keep getting the
following message
Lost connection to MySQL server during query...
Any thoughts about this issue, could it be a network, code or tunning
problem ...

Thanks


Retrieve insert_id on an insert ignore?

2008-08-19 Thread Brian Dunning

I have a table like this:

unique_serial - Auto Increment
field_1
field_2
field_3

The Primary key is a combination of field_1, field_2, and field_3.
I want to do:

INSERT IGNORE INTO table_name (field_1,field_2,field_3) VALUES  
('xx','xx','xx')


Sometimes this will be an existing record, sometimes it will create a  
new record. In either case I want to return the value of  
unique_serial. Is there any way to get my INSERT IGNORE to return this  
value, saving me the need to perform a second query?


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



Re: Lost connection

2008-08-19 Thread Warren Young

Mad Unix wrote:


During the update of the MySQL DB (delete/insert), I keep getting the
following message
Lost connection to MySQL server during query...


By default, the MySQL server drops a connection after 8 hours of 
receiving no queries on that connection.  This can happen in an 
application that keeps its connection open constantly, and people don't 
use it overnight or over a weekend.


You can either increase the timeout in my.cnf, or you can ping the 
connection occasionally with mysql_ping().  Or, you can add code to your 
applications to detect this, and reestablish the connection and retry 
the command.


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



mysqldump -T - Insert headers?

2008-08-19 Thread Tim Johnson
Hi:
Using mysql 5.0.45 on linux 2.6.22-15 (ubuntu).
I can create tab-deliminated text files using mysqldump -T, but
I haven't found a way to include a header with column names.
Any ideas?
It's any easy task for me to extract them with a script, but if
mysqldump can do it, so much for the better.
TIA
Tim

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



Re: convert week of the year into a date string

2008-08-19 Thread Ananda Kumar
Hi All,
I think i worked on this and found the results.


I did the below.

1. Multiplied the week_of_the_year with 7 (7 days per week), to get the
total number of days from begning of the year.

2. used mysql function makedate
   makedate(year,number of days from the start of the year)
  makedate(2008,224)
select makedate(2008,224);
++
| makedate(2008,224) |
++
| 2008-08-11 |


Thanks a lot for all your help.

regards
anandkl


On 8/19/08, Phil [EMAIL PROTECTED] wrote:

 Ananda,

 I did something fairly similar to this just a few weeks ago.

 Unfortunately I don't have access to the server I did the script on until
 later tonight (EST).

 If no one has replied by then I will dig out the script and send it on to
 you.

 Phil

 On Tue, Aug 19, 2008 at 7:58 AM, Ananda Kumar [EMAIL PROTECTED] wrote:

 HI All,
 I have table which stores week_of_the_year and year.
 For example

 week_of_yearYEAR
 32  2008

 I want to convert this into the date. That is , i need to get the date of
 first day of the week 32.
 some thing like

 03-AUG-2008.

 Regards
 anandkl




 --
 Help build our city at http://free-dc.myminicity.com !