trick trigger

2012-01-11 Thread John G. Heim
I am working on an app to allow a committee to schedule classes. The members 
of the committee can all update the database by changing the time or the 
instructor for a class. I have to write an app to warn them when they've 
scheduled an instructor for 2 classes at the same time or if they've 
scheduled any of a large list of classes at the same time. For example, they 
shouldn't schedule Calculus 212 at the same time as Physics 302 because a 
student might want to take both classes.  And obviously, they shouldn't 
schedule Professor Higgenbothom  to teach both Calculus 212 and Probability 
278 at 10:00 AM on Monday, Wednesday, and Friday.


The problem isn't actually writing mysql to select the conflicts. The 
problem is when and how to run the code. I could put it in a trigger but say 
someone assigns Dr. Higgy  to teach Calc 212 at 10 AM MWF. They need to be 
able to see that he is now scheduled for another class if they look at 
Probability 278. Get the problem?  An update to one record can necessitate 
an update to any number of other records.


I'm just looking  for basic suggestions on how you'd deal with this. Should 
I attempt to write a trigger that updates both Calc 212 and Physics 302 when 
either is changed? Am I going to create an infinate loop?  I am thinking of 
telling the committee that it can't be done and they'll have to wait for the 
list of conflicts to be recalculated by a background process once an hour or 
so.


My current database structure is that there is a link table for conflicts. 
If Calc 212 is scheduled at the same time as Physics 302, that is shown by 
there being 2 records in a conflicts table. The conflicts table would 
contain a record with the primary key for Calc 212, the pkey for Physics 
302, and a code indicating that its a course conflict. There'd also be a 
record for Physics 302 indicating that it has a conflict with Calc 212. If 
Prof. Higgy is also scheduled to tach Calc 212 and Probability 278 at the 
same time, that would also create 2 records in the conflicts table. Like 
this:


calc212 | phys302 | course_conflict
phys302 | calc212 | courseConflict
calc212 | prob278 | instructorConflict
prob278 | calc212 | instructorConflict

Then my web app can do a select for conflicts when displaying Calc 212, 
Probabbility 278, or Physics 302. But how to get that data into the table? 
I'm thinking of trying to write a trigger so that wen a class record is 
updated, the trigger deletes the conflicts records for the class if the id 
appears in either column 1 or column 2, re-calculate conflicts, and re-add 
the conflicts records.  But if anybody has basic suggestions for a 
completely different approach, I'd like to hear them.





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



efficient use of varchar?

2011-04-06 Thread John G. Heim
Does it make any difference if I allocate a particular number of bytes for a 
varchar? I mean, just as an example, maybe its more efficient to use a power 
of 2 as the field length. Or maybe power of 2 minus 1. I'm guessing not and 
that anything less than 255 is the same.


I'm converting some data in a spreadsheet and I have to create a table with 
about 150 columns. So I created all the columns varchar(255) and now I'm 
asking mysql to show me the longest value in each column. SELECT 
MAX(LENGTH(column99)) FROM TABLE99. Then I've been modifying the CREATE 
TABLE code to accomodate the longest value plus a little more. So if the 
longest value in the column is 38 characters, I'd probably make that a 
VARCHAR(50). But maybe I might as well make that 63 or 64. Or maybe I'm 
wasting my time and should leave them all 255.




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: getting procedure code via mysqldump

2011-03-30 Thread John G. Heim

From: Claudio Nanni claudio.na...@gmail.com
To: Shawn Green (MySQL) shawn.l.gr...@oracle.com
Cc: John G. Heim jh...@math.wisc.edu; my...@lists.mysql.com
Sent: Wednesday, March 30, 2011 2:01 AM
Subject: Re: getting procedure code via mysqldump



In case you use a linux or unix system, to strip off the comments in linux
bash is very easy, you can use this simple bash command:

grep -v ^/\* yourdumpfile.sql  yourdumpfilewithoutcomments.sql


That didn't work because there are comments embedded in the line that 
creates the procedure. For example:


/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE 
`TIMETABLE_SYNC`()


That's all one line. It will probably wrap in my  message. But the line 
begins with a /* so its removed by your grep command.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



getting procedure code via mysqldump

2011-03-29 Thread John G. Heim
I would like to use mysqldump to get a copy of the code for a stored 
procedure in a format that is similar to the code I used to create it. The 
problem is that I'm blind and I have to listen to the code to debug it. I 
think I have a file containing the code that I used to create the stored 
procedure but I want to make absolutely sure.


This is what I've tried:

mysqldump --p --routines --no-create-info --no-data --no-create-db --skip-opt 
--skip-comments --compatible=ansi --result=routines.sql  database


My problem is that generates a file with a lot of lines I don't understand. 
for example:


/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE 
`TIMETABLE_SYNC`()


That appears to be the line to create the stored procedure 'timetable_sync'. 
But what's with all the other stuff on that line? Can i get rid of it?




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Temporary tables created on disk: 99%

2010-06-01 Thread John G. Heim
On my db server, mysql has 2 gigabytes for temporary tables and yet its 
creating 99% of temporary tables on disk.


According to mysqltuner, 99% of temporary tables are created on disk. I've 
confirmed this via the show global status like 'created%' command.  This 
is in spite of having the following in my my.cnf:


tmp_table_size = 2G
max_heap_table_size = 2G

I have confirmed these values are really being used via the show variables 
like command. So there's no typo in my my.cnf. Mysqltuner says Temporary 
table size is already large - reduce result set size but that is not a 
practical suggestion in that none of the programs using the databases on the 
server were written by me.  I have databases for spamassassin bayesian 
rules, horde3 imp (webmail) and moodle on the system. I am not about to try 
to modify their code.


I'm running mysql from debian stable (5.0.1). I've double and triple checked 
the documentation and it sure looks as if setting tmp_table_size  and 
max_heap_table_size  to be very large should eliminate this problem. But it 
doesn't seem to work. I just have to be missing something. But what? My 
complete my.cnf is below.


PS: I have another server that is serving only drupal and it too is creating 
a high percentage of temp tables on disk (75%).  I figure the same setting 
is missing and/or wrong on both servers.


#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - /etc/mysql/my.cnf to set global options,
# - ~/.my.cnf to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain # chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port  = 3306
socket  = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently 
parsed.

[mysqld_safe]
socket  = /var/run/mysqld/mysqld.sock
nice  = 0

[mysqld]
#
# * Basic Settings
#
user  = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket  = /var/run/mysqld/mysqld.sock
port  = 3306
basedir  = /usr
datadir  = /srv/mysql
tmpdir  = /tmp
language = /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address  = 127.0.0.1
#
# * Fine Tuning
#
# Commonly used optimization parameters
#
tmp_table_size = 2G
max_heap_table_size = 2G
key_buffer  = 2G
max_allowed_packet = 16M
thread_stack  = 128K
thread_cache_size = 256
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover  = BACKUP
max_connections= 256
table_cache= 1024
thread_concurrency = 16
open_files_limit = 8192
#
# * Query Cache Configuration
#
query_cache_limit   = 16M
query_cache_size= 512M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log  = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
# To see slow queries, use 'show processlist'
log_slow_queries = /var/log/mysql/mysql-slow.log
long_query_time = 2
log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for 
replication.

# note: if you are setting up a replication slave, see README.Debian about
#   other settings you may need to change.
#server-id  = 1
#log_bin   = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db  = include_database_name
#binlog_ignore_db = include_database_name
#
# * BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 
100MB.

#skip-innodb
innodb_buffer_pool_size = 2G

#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI tinyca.
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer  = 16M

#
# * NDB Cluster
#
# See 

spamassassin database

2010-05-20 Thread John G. Heim
Right now I have the spamassassin bayesian rules database in mysql myisam 
tables on our mail server. I want to move it to our database server. 
Mysqltuner tells me that the read/write ratio is 10/90. 90% writes.


Given a database that is doing 90% writes, what database engine should I 
use?



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



mysql RAID

2010-03-10 Thread John G. Heim

Hi,

I am working on configuring a new hardware database server. I'm a little 
confused as to what to do about disk. We have several mysql databases but by 
far the 2 most active are spamassassin bayesian rules and horde3/imp web 
mail. Both do a lot of updates. The bayesian rules are added to each time a 
spam message comes in for any of our 200 users. And the horde3/imp writes 
address book updates and preferences quite often.


I have read (and have been told) to stay away from RAID-5 for 
update-intensive systems. Are there performance concerns with RAID-10 as 
well? We will be buying from Dell (done deal for reasons too complicated to 
go into) and the disks they're selling are 146 Gb. I can get up to 8 of them 
in the server we're buying. I asked them about just getting 2 big disks and 
going with RAID-1.


My understanding is that with RAID-10, the system can do multiple reads and 
writes simultaneously so throughput is improved oversystems w/o RAID or with 
RAID-1. But the same logic would apply to RAID-5 only it doesn't work out 
that way.


I just want to make sure I'm configuring this system correctly before I 
order it.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



how things get messed up

2010-02-10 Thread John G. Heim
About 5 years ago, I was asked to write a php app for my department. The app 
keeps track of graduate school applicants to my department at the 
university. The main data elements are the scores each professor gives to 
each applicant. There are only about 400 applicants each year so even with 
all the personal data, scores, transcripts,  etc for each student, it's not 
much. for the first 2 years, it was under a meg of data. Well, then the 
selection committee asked me to add something so that if a student e-mailed 
the department a document, say a paper he'd written or a photo of himself, 
or whatever, it could be tacked on to the info they saw about him while 
grading the applicant.


So I said, Well, there is only going to be maybe 10 or 20 of those a year. 
And even if all 400 applicants submit a PDF of a paper they'd written, it 
would be only 400 docs. 4,000 after 10 years. Yeah, lets just create a 
documents table in the database and store them in mysql.


For the first 2 years, only 2 students sent in documents to attach to their 
application. I figured I'd wasted my time. Then the next year, the graduate 
school changed their  web application form to allow students to upload 
documents. Fine, I said, My worst case scenario has already come true. 
But, well, this is why you plan for the worst case.


Then they started taking letters of recommendation as PDF documents. In 
fact, they started requiring PDF docs. Each student has 3 to 6 letters of 
recommendation. All in all, I figure we're at about 100 times as many docs 
in our database as I originally expected and about 10x my worst case 
scenario.


I should either be fired or shot.  Maybe fired *then* shot. Actually, its 
not as bad as all that. I can pretty easily write a perl script to export 
the docs to files and access them via a network mounted filesystem. After 
all, saving myself 5 hours of work 5 years ago is worth what? -- maybe 
10hours today? It is amazing how often quick  dirty turns out just being 
dirty in the end.





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: 50 things to know before migrating from Oracle to MySQL

2010-01-29 Thread John G. Heim
Hmmm... I find it suspicious that there are *exactly* 50 things you need to 
know before migrating from oracle to mysql. Not 49. Not 51. Exactly 50.


Well, he did repeat that clustering is not what you think it is so I guess 
it technically is 49.  But I wonder what would happen if he thunk up a 51st 
thing or if somebody emailed him one more thing.


- Original Message - 
From: Carl c...@etrak-plus.com

To: mysql@lists.mysql.com
Sent: Thursday, January 28, 2010 4:56 PM
Subject: Re: 50 things to know before migrating from Oracle to MySQL



A quick Google turned up

http://www.xaprb.com/blog/2009/03/13/50-things-to-know-before-migrating-oracle-to-mysql/

Man, I love Google.

Thanks,

Carl
- Original Message - 
From: Daevid Vincent dae...@daevid.com

To: mysql@lists.mysql.com
Cc: 'changuno ' chang...@rediffmail.com
Sent: Thursday, January 28, 2010 5:49 PM
Subject: RE: 50 things to know before migrating from Oracle to MySQL



-Original Message-
From: John Meyer [mailto:johnme...@pueblocomputing.com]
Sent: Thursday, January 28, 2010 2:16 PM
To: mysql@lists.mysql.com

On 1/28/2010 3:21 AM, changuno wrote:
 Read a blog which states 50 things to know before migrating
 from Oracle to MySQL. Any comments on this?

would it have been too much to just link to it?


Thought the same thing.

Not only that, it would have been PREFERRED,
so I can BOOKMARK it and SHARE it with my other colleagues.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=c...@etrak-plus.com





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=jh...@math.wisc.edu





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: optimization

2010-01-26 Thread John G. Heim

From: Jaime Crespo Rincón jcre...@warp.es
Sent: Monday, January 25, 2010 5:30 PM


2010/1/25 John G. Heim jh...@math.wisc.edu:

I have a server with 16Gb of RAM and a dual-core 2Ghz processor. It is
running the latest mysql-server from debian lenny (5.0.1). I have 
databases

for drupal, moodle, spamassassin, horde3, and a small database for
departmental stuff.

The problem is that inserts/updates are sometimes very slow, on the order 
of

a minute. I am hoping somebody can sspot something wrong in my config.
Here's the optimization settings section (for your convenience). The whole
my.cnf is reproduced below that:


Are your databases using MyISAM or InnoDB?

Both. Maybe that's the problem? I started creating database tables for my 
own web apps with the default mysql configuration. I believe the default 
database engine is MyISAM. But then I wanted to use foreign keys and I saw 
that it required me to use  InnoDB. So I converted some tables to InnoDB but 
not all. Maybe it was a mistake not to convert all of them.


After that, I installed drupal, moodle, and mediawiki. I haven't looked at 
what kind of tables those packages create. They may not specify it and the 
default is still whatever it is when you install mysql, MyISAM I think.



* If MyISAM, you could be suffering contention problems on writes

because of full table locks. No easy solution but engine change or
database sharding. Also key_buffer, (and the other buffers) coud be
too small for 16GB of RAM. Are you really using more thant 10% of it?
You could also disable other engines if unused.
* If InnoDB, you have not set innodb_buffer_pool_size nor log size.
You could increase the pool to 50% of ram available.

Those are very general suggestions. It depends a lot on your hardware
(slow storage?), other apps installed on the same machine or the load
of the server, among others.


Well, it could be that the disks aren't real fast. The server is also 
running a print server (lprng). I don't think that's very CPU intensive but 
it might be slowing down writes. 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: optimization

2010-01-26 Thread John G. Heim
Just to be clear, you're suggesting I convert all of the spamassassin, 
drupal, and mediawiki tables to innodb too? Or just my own database? What 
about the mysql database itself? I wouldn't convert those tables, would I?


- Original Message - 
From: Keith Murphy bmur...@paragon-cs.com

To: mysql@lists.mysql.com
Sent: Tuesday, January 26, 2010 11:06 AM
Subject: Re: optimization


♫
I would recommend the same to you about reading High Perf. MySQL as Baron,
et al wrote a great book about performance on MySQL. That being said, it has
been my experience that in 99% of client cases they don't really need to run
two different types of tables. If I were you, I would use InnoDB exclusively
unless there is legitimate reason to do otherwise. In an environment that is
running 25% writes and a decent query rate you are bound to have contention
issues with MyISAM. While there are always going to be edge cases for
MyISAM, your default should be innodb and your config should reflect this.

Changing your tables to InnoDB is a simple ALTER TABLE which you can script
if there are a number of tables to convert.  Allocate as much of your
available RAM as possible to the innodb_buffer_pool (typically 50 - 80% of
total RAM) and I bet you would see a dramatic difference. That is
simplifying things somewhat, but should give an idea.


keith


On Tue, Jan 26, 2010 at 11:53 AM, mos mo...@fastmail.fm wrote:


Get yourself a copy of the book High Performance MySQL 2nd Edition
Publisher: O'Reilly Media; 2 edition (June 18, 2008) Language: English
ISBN-10: 0596101716 ISBN-13: 978-0596101718

Here is a brief preview of the first edition:
http://books.google.ca/books?id=iaCCQ13_zMICprintsec=frontcoverdq=high+performance+mysqlcd=1#v=onepageq=f=false

Mike

At 10:19 AM 1/26/2010, John G. Heim wrote:


From: Jaime Crespo Rincón jcre...@warp.es

Sent: Monday, January 25, 2010 5:30 PM


2010/1/25 John G. Heim jh...@math.wisc.edu:


I have a server with 16Gb of RAM and a dual-core 2Ghz processor. It is
running the latest mysql-server from debian lenny (5.0.1). I have
databases
for drupal, moodle, spamassassin, horde3, and a small database for
departmental stuff.

The problem is that inserts/updates are sometimes very slow, on the 
order

of
a minute. I am hoping somebody can sspot something wrong in my config.
Here's the optimization settings section (for your convenience). The
whole
my.cnf is reproduced below that:



Are your databases using MyISAM or InnoDB?

Both. Maybe that's the problem? I started creating database tables for my
own web apps with the default mysql configuration. I believe the default
database engine is MyISAM. But then I wanted to use foreign keys and I 
saw
that it required me to use  InnoDB. So I converted some tables to InnoDB 
but

not all. Maybe it was a mistake not to convert all of them.

After that, I installed drupal, moodle, and mediawiki. I haven't looked 
at
what kind of tables those packages create. They may not specify it and 
the

default is still whatever it is when you install mysql, MyISAM I think.

 * If MyISAM, you could be suffering contention problems on writes



because of full table locks. No easy solution but engine change or
database sharding. Also key_buffer, (and the other buffers) coud be
too small for 16GB of RAM. Are you really using more thant 10% of it?
You could also disable other engines if unused.
* If InnoDB, you have not set innodb_buffer_pool_size nor log size.
You could increase the pool to 50% of ram available.

Those are very general suggestions. It depends a lot on your hardware
(slow storage?), other apps installed on the same machine or the load
of the server, among others.


Well, it could be that the disks aren't real fast. The server is also
running a print server (lprng). I don't think that's very CPU intensive 
but

it might be slowing down writes.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=mo...@fastmail.fm




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=bmur...@paragon-cs.com





--
Chief Training Officer
Paragon Consulting Services
850-637-3877


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



optimization

2010-01-25 Thread John G. Heim

I have a server with 16Gb of RAM and a dual-core  2Ghz processor.  It is
running the latest mysql-server from debian lenny (5.0.1). I have databases
for drupal, moodle, spamassassin, horde3, and a small database for
departmental stuff.

The problem is that inserts/updates are sometimes very slow, on the order of
a minute. I am hoping somebody can sspot something wrong in my config.
Here's the optimization settings section (for your convenience). The whole
my.cnf is reproduced below that:

key_buffer = 256M
max_allowed_packet = 16M
max_connections=2000
myisam_sort_buffer_size = 64M
open_files_limit = 8192
query_cache_min_res_unit= 2K
query_cache_size= 36M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
sort_buffer_size = 1M
table_cache = 512
thread_cache = 32
thread_cache_size = 8
thread_concurrency = 8

---
# Example MySQL config file for large systems.
#
# This is for a large system with memory = 512M where the system runs mainly
# MySQL.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the --help option.

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port  = 3306
socket  = /var/run/mysqld/mysqld.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
log_slow_queries = /var/log/mysql/mysql-slow.log
long_query_time = 2
#log-queries-not-using-indexes

port  = 3306
socket  = /var/run/mysqld/mysqld.sock
skip-locking

#wait_timeout=14400
key_buffer = 256M
max_allowed_packet = 16M
max_connections=2000
myisam_sort_buffer_size = 64M
open_files_limit = 8192
query_cache_min_res_unit= 2K
query_cache_size= 36M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
sort_buffer_size = 1M
table_cache = 512
thread_cache = 32
thread_cache_size = 8
thread_concurrency = 8

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the enable-named-pipe option) will render mysqld useless!
#
#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
expire_logs_days= 10
max_binlog_size = 100M


# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#the syntax is:
#
#CHANGE MASTER TO MASTER_HOST=host, MASTER_PORT=port,
#MASTER_USER=user, MASTER_PASSWORD=password ;
#
#where you replace host, user, password by quoted strings and
#port by the master's port number (3306 by default).
#
#Example:
#
#CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#start replication for the first time (even unsuccessfully, for example
#if you mistyped the password in master-password and the slave fails to
#connect), the slave will create a master.info file, and any later
#change in this file to the variables' values below will be ignored and
#overridden by the content of the master.info file, unless you shutdown
#the slave server, delete master.info and restart the slaver server.
#For that reason, you may want to leave the lines below untouched
#(commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id   = 2
#
# The replication master for this slave - required
#master-host =   hostname
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user =   username
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   password
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port =  port
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#tmpdir  = /tmp/
#log-update  = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 64M
#bdb_max_lock = 10

# Uncomment the 

Re: best mysql optimization tutorial and/or quick start guide?

2009-03-16 Thread John G. Heim


- Original Message - 
From: Darryle Steplight dstepli...@gmail.com

To: Stephen Edberg sbedb...@ucdavis.edu
Cc: John G. Heim jh...@math.wisc.edu; mysql@lists.mysql.com
Sent: Thursday, March 05, 2009 12:53 PM
Subject: Re: best mysql optimization tutorial and/or quick start guide?


High Performance MySql Optimization, Backups, Replication, and more
2nd Edition . Got a problem, pick a chapter and read the solution.
This book is awesome, I'm confident you will find what you are looking
for :) .


Excellent tip. It's exactly what I'm looking for. Well, I guess I wouldn't 
exactly call it a quick start guide. But by chance, it happened to be on 
bookshare.org. This is a web site which, if you're blind, you can subscribe 
to to download e-books. I'm already subscribed so I didn't have to pay any 
additional price for this particular book.  Must be my lucky day.






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



best mysql optimization tutorial and/or quick start guide?

2009-03-05 Thread John G. Heim
I've been poking around google looking for tutorials and/or quick start 
guides on optimizing the mysql server. We just upgraded our DB server from 2 
Gb of RAM to 16. But I don't know how to reconfigure mysql to take full 
advantage of it. Although, just installing the RAM seems to have made a huge 
difference.


Any suggestions for a really good tutorial on configuring the server based 
on the amount of RAM, etc?




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



confused about logging

2008-09-25 Thread John G. Heim
My web server is running drupal. Yesterday it started giving error messages 
instead of displaying the hom page. The error says, The MySQL error was: 
Host 'web1.math.wisc.edu' is blocked because of many connection errors; 
unblock with 'mysqladmin flush-hosts'.


I want to find out why that happened. I'm running the mysql debian package 
for etch (stable).  It installs mysql 5.0.  The default my.cnf says this:


# Be aware that this log type is a performance killer.
#log  = /var/log/mysql/mysql.log
# Error logging goes to syslog. This is a Debian improvement :)

Two questions:
1. Is it a performance killer?
2. There was nothing in the system log. The only messages  about mysql were 
from restarting the server. 



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