symlinking tables to a new db

2003-08-14 Thread Dathan Vance Pattishall
What would be the draw backs of symlinking tables from say /var/lib/mysql/DB_A to /var/lib/mysql/DB_B since for a period of time of moving tables out of one directory (database) to another directory (database) the tables need to exist in both dbs until the migration is complete. Will this me

RE: MySQL Replication

2003-08-14 Thread Dathan Vance Pattishall
Ack bad English in the 1st sentence I meant a slave server cannot have more then one master unless more then one mysqld processes is running on different ports i.e. port 3306 and port 3307. -->-Original Message- -->From: Dathan Vance Pattishall [mailto:[EMAIL PROTECTED] -->Sent:

what are some good options for reiserfs and mysql

2003-08-14 Thread Dathan Vance Pattishall
I want to get the most out of my Dedicated Red-Hat Linux 6 drive (3 RAID-1 / 3 RAID-10 ) mysql servers using Reiser-fs. Currently I have this in my fstab /dev/sda6 /var/lib/mysql reiserfsdefaults 1 2 I would like to turn off/on some options to get the most out of my dis

RE: upgrade

2003-08-08 Thread Dathan Vance Pattishall
Did you restart the server? -->-Original Message- -->From: Robert Morgan [mailto:[EMAIL PROTECTED] -->Sent: Thursday, August 07, 2003 1:19 PM -->To: mysqllist -->Subject: upgrade --> -->Hi I am using mysql 3.23.54 that came bundled with RH9. I have tried -->updating to version 4.0 using th

RE: MySQL Replication

2003-08-07 Thread Dathan Vance Pattishall
That configuration doesn't seem to work if I'm reading it right. A slave cannot have more then one master unless mysql more then 1 mysqld process running on different ports is used. -->For example, if a person places an order on our site, the update is sent -->to -->the master server. Can that upd

RE: column privilege problem--Solved

2003-08-07 Thread Dathan Vance Pattishall
FYI Note on this. Using column privs you take a performance penalty on reads / writes. -->-Original Message- -->From: Tiffany Wilkes [mailto:[EMAIL PROTECTED] -->Sent: Tuesday, August 05, 2003 3:48 PM -->To: mysql -->Subject: column privilege problem--Solved --> --> I solved the problem-

benchmarks

2003-08-04 Thread Dathan Vance Pattishall
At the conference a few months ago, the mysql team said that the benchmarks they where running would be published here http://www.mysql.com/benchmarks but it doesn't look like this is the link. Basically I'm trying to figure out what a saturation level is for mysql when it has 2 2.4Ghz Intel XE

study on composite keys and different column types

2003-07-31 Thread Dathan Vance Pattishall
>From going over http://www.mysql.com/doc/en/MySQL_indexes.html (again) http://www.mysql.com/doc/en/Indexes.html (again) And doing some experimentation it seems that when I build a compound index (A key spanning multiple column) of column types String, int, int - sorting the result takes a very

RE: Mysqlcc vs Phpmyadmin

2003-07-31 Thread Dathan Vance Pattishall
No. Ones a client application the other is a web app. The client application has SQL completion, the web app does not. -->-Original Message- -->From: Ola Ogunneye [mailto:[EMAIL PROTECTED] -->Sent: Thursday, July 31, 2003 11:52 AM -->To: [EMAIL PROTECTED] -->Subject: Mysqlcc vs Phpmyad

RE: two masters replicating to a single slave

2003-07-24 Thread Dathan Vance Pattishall
You will need to run multiple mysqld servers on the slave. Reason: a slave can have only one master (although it wouldn't be technically difficult to change this, if a matrix struct was used). How to run multiple slaves: I have some code I'm adding to mysqld_multi, but you should use the document

RE: Function to extract difference in Minutes from DateTime variables

2003-07-24 Thread Dathan Vance Pattishall
Use UNIX_TIMESTAMP or TIME_TO_SEC -->-Original Message- -->From: C.F. Scheidecker Antunes [mailto:[EMAIL PROTECTED] -->Sent: Thursday, July 24, 2003 1:43 PM -->Cc: 'MySQL Users' -->Subject: Function to extract difference in Minutes from DateTime -->variables --> -->Hello all, --> -->I need

RE: SQL Help...

2003-07-24 Thread Dathan Vance Pattishall
-->-Original Message- -->From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] -->Sent: Thursday, July 24, 2003 12:53 PM -->To: [EMAIL PROTECTED] -->Subject: SQL Help... --> -->After some searching around different books/manuals/google I still can't -->seem to figure out how do to this. What

RE: select part of a field into another field

2003-07-24 Thread Dathan Vance Pattishall
Its easier to do it code in my opinion but here is the function you will need. SUBSTRING_INDEX('[EMAIL PROTECTED]','@',1) --> joines -->-Original Message- -->From: Jason Joines [mailto:[EMAIL PROTECTED] -->Sent: Thursday, July 24, 2003 10:53 AM -->To: MySQL Users -->Subject: select part o

RE: Huge Server configuration

2003-07-24 Thread Dathan Vance Pattishall
-->-Original Message- -->From: Mysql List [mailto:[EMAIL PROTECTED] -->Sent: Thursday, July 24, 2003 10:47 AM -->To: Dathan Vance Pattishall -->Cc: [EMAIL PROTECTED] -->Subject: Re: Huge Server configuration --> -->Dathan Vance Pattishall wrote: --> --

RE: Huge Server configuration

2003-07-24 Thread Dathan Vance Pattishall
e: Huge Server configuration --> -->Dathan Vance Pattishall wrote: --> -->>NICE -->> -->>No matter how big your disks are, the number of spindles and throughput -->>is your win. -->> -->> -->I have RAID 5 with 5 hardisks, so usuable number of spindle will o

RE: Huge Server configuration

2003-07-24 Thread Dathan Vance Pattishall
NICE No matter how big your disks are, the number of spindles and throughput is your win. my.cnf 3.5x options skip-locking skip-name-resolve set-variable = tmp_table_size=4096 log-bin=binlog/something make sure binlog is a symlink to a separate partition / drive set-variable = key_buffer=4G s

Anyone experiencing replication problems with mysql-max-3.23.57-pc-linux-i686

2003-07-11 Thread Dathan Vance Pattishall
mysql-max-3.23.57-pc-linux-i686 I notice that slaves which never went out of sync are now doing so regularly with the same traffic pattern. Since upgrading to 3.23.57 I've notice a large increase in CPU utilization with the same configuration as the previous version in production 3.23.54. Anyone

RE: Turn off log-bin without restarting database

2003-07-10 Thread Dathan Vance Pattishall
CHANGE MASTER TO MASTER_LOG_HOST='', MASTER_LOG_POS='', MASTER_LOG_PORT=''; SLAVE STOP; SHOW SLAVE STATUS; -->-Original Message- -->From: Ian Collins [mailto:[EMAIL PROTECTED] -->Sent: Thursday, July 10, 2003 4:59 PM -->To: [EMAIL PROTECTED] -->Subject: Turn off log-bin without restarting

Why is it better to have a composite key with the largest cardinality 1st?

2003-07-09 Thread Dathan Vance Pattishall
Say I have column A with 1 distinct values column B and C with 2 distinct values and for simplicity sake the column type is an int. If I wanted a composite key why should I make the order of the key A,B,C I read someplace that faster lookups happen with the leftmost index, being an index wit

RE: Faster reindexing

2003-07-09 Thread Dathan Vance Pattishall
Maybe increasing #use for when mysql is doing a check or repair set-variable= myisam_sort_buffer_size=64M to a higher value will make the index happen faster on the fly. But, for a 100 million row table doing a dump and adding that dump back to the db might be your fastest method. Building t

Re: mysqldump

2003-07-07 Thread Dathan Vance Pattishall
mysqldump dbname -u -p > /dir/dump.sql notice no spaces. On Tue, 8 Jul 2003, Kalle Saarinen wrote: > Hello > > I'm trying to make mysqldump in a shell script but I can't deliver password > to sql server. > > I have command in the script: > > mysqldump databasename -u username -p password >

Re: Optimal Disk Configuration

2003-07-05 Thread Dathan Vance Pattishall
It depends on what your goal is and how many disks your system will contain. Personally I like a disk configuration with multiple spindels for performance. I also require redundancy, RAID-5 sounds good and is but I want the most out of writes, so I go with RAID-1+0. Hope this helps. On Sat,

Re: Thread about Enterprise backups

2003-07-04 Thread Dathan Vance Pattishall
On Fri, 4 Jul 2003, Jeremy Zawodny wrote: > On Thu, Jul 03, 2003 at 01:35:51PM -0700, Dathan Vance Pattishall wrote: > > > > The 3rd approach was to write software with some pointers from a book > > called MySQL "The definitive guide to using, programming, administeri

RE: Binary tree

2003-07-03 Thread Dathan Vance Pattishall
Mysql uses a btree+ -->-Original Message- -->From: awarsd [mailto:[EMAIL PROTECTED] -->Sent: Thursday, July 03, 2003 1:50 PM -->To: [EMAIL PROTECTED] -->Subject: Binary tree --> -->Hi, --> -->I think MySQL uses binary tree, but my question is that what happens when -->we -->delete record.

Thread about Enterprise backups

2003-07-03 Thread Dathan Vance Pattishall
Hello All, A few days ago there was a thread about how to perform backups on large scale enterprise systems of mysql databases. This is an issue that I have a problem with and came up with a possible cheap solution. Problem: Currently I have about 40 Mysql Servers with about 25 of these serve

RE: MySQL gets slower over time

2003-07-01 Thread Dathan Vance Pattishall
Run the Analyze table command. It will recalculate the Cardinality of a key structure. -->-Original Message- -->From: Steve Quezadas [mailto:[EMAIL PROTECTED] -->Sent: Tuesday, July 01, 2003 10:37 AM -->To: [EMAIL PROTECTED] -->Subject: MySQL gets slower over time --> -->HIdey Ho. --> -->I

RE: max_allowed_packet error

2003-07-01 Thread Dathan Vance Pattishall
Do you have a waittimeout set in you're my.cnf file? If so mysql would of forced closed a connection that it determines was inactive for > waittimeout seconds. -->-Original Message- -->From: Tina Motaye [mailto:[EMAIL PROTECTED] -->Sent: Tuesday, July 01, 2003 5:28 AM -->To: [EMAIL PROTEC

RE: How can a single row with a single column represent 2 values without bitwise data representation

2003-06-27 Thread Dathan Vance Pattishall
-->-Original Message- -->From: Bruce Feist [mailto:[EMAIL PROTECTED] -->Sent: Friday, June 27, 2003 3:51 PM -->To: Dathan Vance Pattishall -->Subject: Re: How can a single row with a single column represent 2 values -->without bitwise data representation --> -->

How can a single row with a single column represent 2 values without bitwise data representation

2003-06-27 Thread Dathan Vance Pattishall
Say you have a column in a search table by the name of politics. Each political view is represented as an integer from 0 - 16. A user can choose multiple political views, and those views have to be represented in the db as a single row. How can a single column for a single row of a searched tab

RE: Distributed/Fault Tolerant DB operation... possible?

2003-06-19 Thread Dathan Vance Pattishall
-->-Original Message---> --> Has anyone done this with two (or more, if possible!) machines? Is it -->possible to do at the present time? Your going to need to have a chain master setup. This is what I propose. 1) Application(s) must know about all the master / slaves (or hide it behind

RE: linux and mysql socket

2003-06-19 Thread Dathan Vance Pattishall
Your client is configured to connect via UNIX sock on localhost. It thinks the sock is on /tmp when it's probably /var/lib/mysql Take a look at /etc/my.cnf and make the change there or at the command line. -->-Original Message- -->From: azamka [mailto:[EMAIL PROTECTED] -->Sent: Thursday,

RE: Can we crypt passwords on MySQL

2003-06-18 Thread Dathan Vance Pattishall
Search for PASSWORD @ www.mysql.com It's a really convenient function. -->-Original Message- -->From: Grégoire Dubois [mailto:[EMAIL PROTECTED] -->Sent: Wednesday, June 18, 2003 5:07 PM -->To: 'Mysql' -->Subject: Can we crypt passwords on MySQL --> -->Hi all, --> -->Is it possible to crypt

RE: RAID hardware suggestions/experience

2003-06-18 Thread Dathan Vance Pattishall
A lot of table scans do to bitmasked column values. So SELECT * FROM search_table where AND colN & 4; Such that the above query will not utilize a key. I was told at the last convention that mySQL had some good ideas on allowing indexes for bitwise (arithmetic) columns but they are not qui

RE: RAID hardware suggestions/experience

2003-06-18 Thread Dathan Vance Pattishall
-->-Original Message- -->From: Adam Nelson [mailto:[EMAIL PROTECTED] -->Sent: Tuesday, June 17, 2003 11:56 AM -->To: 'Bernd Jagla'; 'mysql' -->Subject: RE: RAID hardware suggestions/experience --> -->We recently bought a kick $%#%% machine for ~10k --> -->HP DL380 -->2x2.8GHz Xeon -->1GB

RE: Hmm looks like this query works

2003-06-10 Thread Dathan Vance Pattishall
do you need/desire a "weighted -->random?" Your -->objective will determine if this is actually of use or if it simply -->appears to -->be. --> -->Edward Dudlik -->Becoming Digital -->www.becomingdigital.com --> --> -->- Original Message - -->

Hmm looks like this query works

2003-06-10 Thread Dathan Vance Pattishall
I have a question. If I wanted to sort randomly on a column weighted by the value of the column will does this query work SELECT val_column, val_column*0.1+RAND() as rand_col from TABLE ORDER BY rand_col limit 10; This should five me a random row weighted by the value of the column is this corr

RE: Lost connection to MySQL server during query

2003-06-06 Thread Dathan Vance Pattishall
-->-Original Message- -->From: Alec Smith [mailto:[EMAIL PROTECTED] On Behalf Of Alec -->Smith -->Sent: Friday, June 06, 2003 11:24 AM -->To: [EMAIL PROTECTED] -->Subject: Lost connection to MySQL server during query --> -->Hi - --> -->[Perhaps not exactly the right list, but [EMAIL PROTE

RE: bug in replication?

2003-06-05 Thread Dathan Vance Pattishall
Let me clean up my grammar and explanation a bit. I rushed the email message. -->-Original Message- -->From: Dathan Vance Pattishall [mailto:[EMAIL PROTECTED] -->Sent: Wednesday, June 04, 2003 5:26 PM -->To: [EMAIL PROTECTED] -->Subject: bug in replication? --> -->

bug in replication?

2003-06-05 Thread Dathan Vance Pattishall
Before I send this to [EMAIL PROTECTED] I would like to see if anyone else is hitting a replication bug in 3.23.5x Last_Errno Last_error 4294967295 | error 'unexpected success or fatal error' on query 'UPDATE member_stats1 SET view7=0' Notice the Errno, it's the not the errorno for the error

RE: optimize entire db

2003-06-04 Thread Dathan Vance Pattishall
You can use this script that I wrote. Also you can change OPTIMIZE TABLE with ANAYLIZE TABLE #!/usr/bin/perl -w # If you use this give me CREDIT!! :) Dathan Vance Pattishall # use strict; use DBI; use lib '/site/lib'; my $USER = ""; my $PASSWD = ""; my ($host,

RE: table copying/replication

2003-06-04 Thread Dathan Vance Pattishall
-->-Original Message- -->From: Ross Simpson [mailto:[EMAIL PROTECTED] -->Sent: Tuesday, June 03, 2003 10:31 AM -->To: [EMAIL PROTECTED] -->Subject: table copying/replication --> -->Hello, --> -->I have a need for fast copying of a specific table from a master mysql -->server to a number o

RE: Too many connections for MySQL proc that cannot be killed

2003-05-31 Thread Dathan Vance Pattishall
-->-Original Message- -->From: Steven [mailto:[EMAIL PROTECTED] -->RedHat Linux 7.3 -->MySQL 3.23.56, for pc-linux (i686) (same behavior with 4.0.12 as well) -->Apache 1.3.27 -->PHP 4.3.1 --> -->(most (99%) of the MySQL connections are made through PHP scripts -->running as an apache mod

RE: compare db's

2003-05-30 Thread Dathan Vance Pattishall
Mysqldump on both databases Do a diff on both files Redirect the output to a file Mysql database < parse_file_to_sync Easiest way, there are some other methods which basically do the same thing. -->-Original Message- -->From: Nikos Gatsis [mailto:[EMAIL PROTECTED] -->Sent: Thursday, Ma

RE: How to use stored procedure in MySQL

2003-05-29 Thread Dathan Vance Pattishall
mySQL does not support stored procedures your going to have to write code to supplement the behavior or wait until mySQL 5.0. -->-Original Message- -->From: rajesh_sharma [mailto:[EMAIL PROTECTED] -->Sent: Wednesday, May 28, 2003 10:58 AM -->To: [EMAIL PROTECTED] -->Subject: How to use sto

RE: table copy

2003-05-29 Thread Dathan Vance Pattishall
You copied corrupted data. Shutdown the server and make a copy again, or restore from a backup. Myisamchk will probably not work in this situation even if you use Myisamchk -o -f -->-Original Message- -->From: Cassily, Ryan [mailto:[EMAIL PROTECTED] -->Sent: Wednesday, May 28, 2003 10:28

RE: replication - master and slave on the same computer

2003-05-27 Thread Dathan Vance Pattishall
You need to start 2 instances of mysqld both on different ports and different datadirs. I recommend reading Paul Dubois MySQL second Edition- The definitive guide to using, programming, and administering mysql 4 databases. He has a section on replication + running multiple instances of mysqld.

RE: What port to forward ?

2003-03-31 Thread Dathan Vance Pattishall
3306 or you can specify it in my.cnf which should be located in /etc (*NIX OSs) or @ the command line -Original Message- From: daniel [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 3:25 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: What port to forward ? i'd also lik

RE: R: Replication don't work.

2003-03-31 Thread Dathan Vance Pattishall
What would also help is English. Would you translate the messages for us? -Original Message- From: trashMan [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 3:19 PM To: 'Scott Helms'; [EMAIL PROTECTED] Subject: R: R: Replication don't work. Sigh. Master.err 030401 1:14:42

RE: Replication don't work.

2003-03-31 Thread Dathan Vance Pattishall
The show master status is saying I'm On the bin log file 8 at position 73 (right after the header of the bin log) Some helpful checks Make sure in your data dir (for this example /var/lib/mysql) Hostname.index contains all the binlogs especially the one that the slave is pointing to. Execute sho

RE: optimal selects and indexes ?

2003-03-28 Thread Dathan Vance Pattishall
When ever you use an index on multiple columns remember that mysql uses the concept of leftmost prefix. I'll explain with an example from one of your key make-ups below If you have dest_ip and source_ip in your select statement idx_time_dest_ip_source_ip would not work, because time is your leftm

RE: Storing Images in MySQL

2003-03-28 Thread Dathan Vance Pattishall
I assumed to store the data in mysql you did something like uuencode and inserted that data into the db? Could the decode method be different on redhat 7.3? -Original Message- From: vernon [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 2:19 PM To: [EMAIL PROTECTED] Subject: Storin

RE: weekly data query

2003-03-28 Thread Dathan Vance Pattishall
Try the function DATE_FORMAT in this syntax DATE_FORMAT(col,"%U"); I don't know if %U is exactly what you want but DATE_FORMAT can format any date column into nearly any format you wish to display. -Original Message- From: Jasmine [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 11

RE: MySQL, Snort & ACID

2003-03-28 Thread Dathan Vance Pattishall
Bruce is correct. If you need to do a query based on a time frame, try something like timestamp >= NOW() - interval X seconds; // where X is your value for your timerange in the past. If the timestamp column has a key the above addition will use it. Using unix_timestamp or mysql functions in gener

RE: Keys & indeces

2003-03-28 Thread Dathan Vance Pattishall
No that key is not nessary -Original Message- From: Mattias Barthel [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 7:57 AM To: '[EMAIL PROTECTED]' Subject: Keys & indeces Hello! Is there a need for adding an index to a key which already primary? >From the dump file it would look

RE: Choosing a column for primary key

2003-03-27 Thread Dathan Vance Pattishall
-Would joins of tables with character based primary keys be slower than -those with numeric based keys? Yes a join on a character based key is generally slower then on an integer key. Key lookups in general are faster on integer based keys. Since your PRIMARY KEY storage requirement is 30 bytes

RE: database size

2003-03-27 Thread Dathan Vance Pattishall
ot an irrelevant consideration. -Original Message- From: Jeremy Zawodny [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2003 12:30 PM To: Dathan Vance Pattishall Cc: [EMAIL PROTECTED] Subject: Re: database size On Thu, Mar 27, 2003 at 12:17:45PM -0800, Dathan Vance Pattishall wrote: > ISA

RE: database size

2003-03-27 Thread Dathan Vance Pattishall
ISAM tables are cut off at 4gb of data MYISAM / INNODB /BDB have a filesystem limit. I suggest to limit the maximum size of data file: find out if reiserfs can set a limit on files sizes. I know that EXT3 a few revisions ago could not go past 2GB per file. Or prune your data so it doesn't get to bi

RE: Transaction Support with MyISAM

2003-03-27 Thread Dathan Vance Pattishall
Mr. Zawodny is right MyISAM natively does not support Transactions, but Transactions can be done with a set of myISAM tables and a lot of code specific to supporting transactions w/o a race condition. Basically it's a long a tedious process of writing code to support a "ticket server" (a unique id

RE: beginners question - Not Makine Duplicate Entrys

2003-03-26 Thread Dathan Vance Pattishall
Set a primary key / unique key on a column (s) in myTable to make that row unique. Goto mysql.com and type primary key in the search dialog. There is a wealth of knowledge there. Or use google site:mysql.com Primary Key syntax -Original Message- From: Wileynet [mailto:[EMAIL PROTECTED]

<    1   2   3