What returns from distance function?

2010-04-18 Thread Onur UZUN
Distance between two points. but in which type? and how can i convert this value to meter?

Re: When to use Stored Procedures

2010-04-18 Thread Shawn Green
Hi Johan, Johan De Meersman wrote: as a totally off-topc question, wouldn't something along the lines of LIMIT COUNT(*)/2, 1 do that trick? On 4/15/10, Rhino rhi...@sympatico.ca wrote: ...snip... For example, suppose you had to determine the median grade for a test. ... That would

Re: What returns from distance function?

2010-04-18 Thread Onur UZUN
I used below query from http://lists.mysql.com/mysql/219805 SET @center = GeomFromText( 'POINT(39.78824896727801 30.50930339115439)' ) ;# MySQL returned an empty result set (i.e. zero rows). SET @radius = 0.005;# MySQL returned an empty result set (i.e. zero rows). SET @bbox = GeomFromText(

Re: Mysql - Tables Export to Excel!

2010-04-18 Thread Shawn Green
Vikram A wrote: Hi, I would like to export my table structure from MYSQL from a particular db. Is there any tool for doing this? There are several ways to get structure information from within MySQL: the SHOW COLUMNS... command the SHOW INDEXES... command the SHOW CREATE TABLE... command

Re: Problem with installing MySQL

2010-04-18 Thread Shawn Green
alba.albetti wrote: I've just installed MySQL on Windows 2000. I've opened the MS-DOS windows and I've written C:\Programs\MySQL\...\bin\mysqladmin -u root -p password mysql2010 After the enter the prompt says Enter password: and I've given enter and I get mysqladmin: connect to server at

How to corrupt a database please???

2010-04-18 Thread Nurudin Javeri
Hi all, I am hiring a few new junior DBA's and I want to put them thru a simple db repair training. Does anyone know how I can deliberately corrupt a MyISAM and InnoDB database in different ways please? So what I want to do is corrupt 3 MyISAM 100gb databases, 3 InnoDB 100gb databases - ALL

Re: How to corrupt a database please???

2010-04-18 Thread Suresh Kuna
open the file and remove some data and close it for both data file and index files, So the tables will be corrupted when access. On Sun, Apr 18, 2010 at 9:55 PM, Nurudin Javeri nsjav...@idh.com wrote: Hi all, I am hiring a few new junior DBA's and I want to put them thru a simple db repair

Re: How to corrupt a database please???

2010-04-18 Thread Jim Lyons
You can remove the innodb logs and/or the innodb data file. You can also remove some of the individual .idb files (if you're using file-per-table option). On Sun, Apr 18, 2010 at 11:25 AM, Nurudin Javeri nsjav...@idh.com wrote: Hi all, I am hiring a few new junior DBA's and I want to put them

Re: How to corrupt a database please???

2010-04-18 Thread Rob Wultsch
On Sun, Apr 18, 2010 at 10:39 AM, Suresh Kuna sureshkumar...@gmail.com wrote: open the file and remove some data and close it for both data file and index files, So the tables will be corrupted when access. On Sun, Apr 18, 2010 at 9:55 PM, Nurudin Javeri nsjav...@idh.com wrote: Hi all, I am

Re: How to corrupt a database please???

2010-04-18 Thread Andrés Tello
What if the DBA ask for the backup? And those recommendations can be fixed or they have a very high chance of making recovery impossible? On Sun, Apr 18, 2010 at 1:09 PM, Rob Wultsch wult...@gmail.com wrote: On Sun, Apr 18, 2010 at 10:39 AM, Suresh Kuna sureshkumar...@gmail.com wrote:

Re: How to corrupt a database please???

2010-04-18 Thread Rob Wultsch
On Sun, Apr 18, 2010 at 11:07 AM, Jim Lyons jlyons4...@gmail.com wrote: You can remove the innodb logs and/or the innodb data file.  You can also remove some of the individual .idb files (if you're using file-per-table option). He originally asked about how to provide a training excise about

Re: How to corrupt a database please???

2010-04-18 Thread Eric Bergen
A couple good tests are. 1. Corrupt a relay log. For this you can stop the sql thread, cat /dev/urandom over the newest relay log, start the sql thread and watch it fail. 2. Change the innodb_log_file_size in my.cnf without going through the proper procedure to remove the old log files. In 5.0

Re: How to corrupt a database please???

2010-04-18 Thread Rob Wultsch
On Sun, Apr 18, 2010 at 11:13 AM, Andrés Tello mr.crip...@gmail.com wrote: What if the DBA ask for the backup? And those recommendations can be fixed or they have a very high chance of making recovery impossible? Who is the dba going to ask for a backup? Himself? The guy that puts backups on

Re: Recommended swap partition size

2010-04-18 Thread Eric Bergen
Linux will normally swap out a few pages of rarely used memory so it's a good idea to have some swap around. 2G seems excessive though. Usually I prefer to have linux kill processes rather than excessively swapping. I've worked on machines before that have swapped so badly that it took minutes

Re: How to corrupt a database please???

2010-04-18 Thread Shawn Green
Rob Wultsch wrote: On Sun, Apr 18, 2010 at 11:13 AM, Andrés Tello mr.crip...@gmail.com wrote: What if the DBA ask for the backup? And those recommendations can be fixed or they have a very high chance of making recovery impossible? Who is the dba going to ask for a backup? Himself? The guy

Re: Recommended swap partition size

2010-04-18 Thread Rob Wultsch
On Sun, Apr 18, 2010 at 12:04 PM, Eric Bergen eric.ber...@gmail.com wrote: Linux will normally swap out a few pages of rarely used memory so it's a good idea to have some swap around. 2G seems excessive though. Usually I prefer to have linux kill processes rather than excessively swapping.

Re: Recommended swap partition size

2010-04-18 Thread Eric Bergen
The impact of swap activity on performance is dependent on the rate at which things are being swapped and the speed of swapping. A few pages per second probably won't kill things but in this case it was swapping hundreds of pages per second which killed performance. Disks are much slower than

Re: Multiple table engine

2010-04-18 Thread Eric Bergen
This can become a problem when using replication. For example if you do: begin; insert into innodb_table; insert into myisam_table; insert into innodb_table; rollback; The innodb rows won't be replicated but the myisam row will. There is more info at:

Re: mysqld_safe

2010-04-18 Thread Eric Bergen
It's distributed as part of mysql. The script is responsible for restarting mysqld if it exits with a non zero return code such as when it crashes. On Mon, Mar 29, 2010 at 2:40 PM, Colin Streicher co...@obviouslymalicious.com wrote: Yeah, its just a shell script that acts as a wrapper around the

Re: Mysql - Tables Export to Excel!

2010-04-18 Thread Prabhat Kumar
use can use mysqldump with option *-no-data* eg. *mysqldump -u user -ppassword wordpress user --no-data Dumpdata.txt * where wordpress is my database and user is my table. Thanks On Sun, Apr 18, 2010 at 9:48 PM, Shawn Green shawn.l.gr...@oracle.comwrote: Vikram A wrote: Hi, I would

Re: Mysql - Tables Export to Excel!

2010-04-18 Thread Prabhat Kumar
Note : if you table name it will export all tables from given database; eg:* mysqldump -u user -ppassword wordpress --no-data Dumpdata.txt * It will export all tables from db wordpress. On Mon, Apr 19, 2010 at 8:57 AM, Prabhat Kumar aim.prab...@gmail.comwrote: use can use mysqldump with

InnoDB Default Storage Engine

2010-04-18 Thread Angelina Paul
I want to change the mysql default storage engine from MyISAM to InnoDB. What are the steps involved .Is it edit my.cnf file and add a line default-storage-engine=innodb and restart the mysql server? How I can bring my databases with mixed storage engine down without any data loss. What steps I

mysql-bin log file

2010-04-18 Thread Angelina Paul
How can I remove old mysql-bin log file in log directory? A mysql full backup will clear the old mysql bin log file or not? Thanks, Arshu Paul

Re: mysql-bin log file

2010-04-18 Thread Rob Wultsch
On Sun, Apr 18, 2010 at 8:58 PM, Angelina Paul arshup...@gmail.com wrote: How can I remove  old  mysql-bin log file in log directory? A mysql full backup will clear the old mysql bin log file or not? Thanks, Arshu Paul You probably want

Re: InnoDB Default Storage Engine

2010-04-18 Thread Rob Wultsch
On Sun, Apr 18, 2010 at 8:31 PM, Angelina Paul arshup...@gmail.com wrote: I want to change the mysql default storage engine from MyISAM to InnoDB. What are the  steps involved .Is it edit my.cnf file and add a line default-storage-engine=innodb and restart the mysql server? If you do not want

Re: mysql-bin log file

2010-04-18 Thread Prabhat Kumar
You can add a *expire_logs_days* Variable in my.cnf during the configuration of replication server. #* expire_logs_days = 7* It will purged binary logs older than 7 days.The old logs will be purged during the next bin-log switch. Or, You can also delete bin-log manually using command : PURGE

Re: mysql-bin log file

2010-04-18 Thread Rob Wultsch
On Sun, Apr 18, 2010 at 9:40 PM, Prabhat Kumar aim.prab...@gmail.com wrote: You can  add a expire_logs_days Variable in my.cnf during the configuration of replication server. # expire_logs_days = 7 It will purged binary logs older than 7 days.The old logs will be purged during the next

Re: InnoDB Default Storage Engine

2010-04-18 Thread Prabhat Kumar
You need to locate the mySQL config file (helpfully named) my.cnf file. On linux it is located at /etc/my.cnf Then under the [mysqld] add the following line as shown below! *[mysqld] default-storage_engine = InnoDB* And don't forget to restart mysql. After this whenever you create a table its