It's been a long time that I've been using MySQL, but it has just
happened now that I made use of replication in production.
What's the reason for this? Well, I have a working machine
(currently with SuSE Linux 10.0) and a private machine (with
Windows), both running the latest production release of MySQL
5.0. On my working machine, I've set up a Wiki. I used to make
regular backups on my private machine and wanted to backup my
Wiki database, too.
There are certainly serveral solutions for this, but the solution
that I preferred was to replicate the Wiki database to my private
machine to simply backup it together with my other databases
there.
Here's how I did it (not very difficult - and not at all with the
help of Jay's and Mike's Pro MySQL 5 book ;-)):
First I added the following lines to the my.cnf file …
There's a good article on Silicon.com "Should Oracle Fear Open Source?" The analysis on the impact of open source is significant, however, I think the market analysts such as Gartner still have not gotten their heads around the right way to measure open source impact. It can't be measured in license fees the same way traditional closed source products have been; with open source there is no significant license fees. In that regard, the estimates are woefully low. Open source software has been growing far faster and for far longer than the analysts estimate. At this point, MySQL is in the #3 position of market share (measured as usage) after Oracle and SQL Server and far ahead of DB2, Sybase and others. It may take another couple of years before the analysts figure out a way to report that.
I think Oracle understands open source better than most people …
[Read more]
I am looking for a job starting this fall. By that time I should
also hold a degree in computer science from the TU Berlin. My tasks
on the job should be some how at least partially connected to
open source and covering at a minimum 2 of the following 3 fields
of expertise (in order of most preferred):
- SQL RDBMS like MySQL, Oracle, SQLite, PostGreSQL (especially portability and migration)
- Community Relations (helping companies work with people from the community and vice versa)
- PHP (preferably database driven intranet applications or frameworks)
I would prefer to be able to stay in Germany, specifically Berlin. Though its all a question of finding the right place and challenge. For example I have no problem telecommuting from home with occasional trips to an office; even for a few weeks now and then with a sleeping bag. Actually I …
[Read more]The FFII’s Swpatcnino page continues to be the most up-to-date and complete collection of links to news items concerning software patents. Here’s an interesting article that I became aware of on that page: Shanghai Daily - IPR protection hot potato not black and white
The article talks about IPRs (intellectual property rights) in general, and patents are only one of the legal devices that are counted among them. With respect to software, I prefer a clear distinction to be made between copyright and patents, and only in a few exceptional cases I consider it accurate to refer to copyright, patents and other rights by the collective term IPRs.
A significant part of the article, which was written by a senior researcher at the Chinese Ministry …
[Read more]
I've been playing around with endpoints in SQL Server 2005
looking at how they can be used to enhance security for SQL
Servers servicing web servers based in the DMZ. Figure 1 shows a traditional architecture
for just such a web server / database combination. The web server
exists in the DMZ, outside of the trusted network. The SQL Server
exists inside the trusted network and the appropriate ports are
opened up in the firewall to allow the web server to connect back
to the SQL Server. Best practices would say only open the
necessary TCP port SQL Server listens on and no more. Since the
port can be specified in the connection string or through the use
of an alias, opening up UDP port 1434 isn't necessary for named
instances.
Figure 1: Typical Architecture for web server in DMZ
…
[Read more]
MySQLDevelopment.com is no more, All requests to the site will
now be served from
http://forge.mysql.com/wiki/Category:MySQLDevelopment.
Thanks for all those who visited the site over the last year.
Sun has now published SpecJAppServer2004 benchmark results with MySQL. The results are pretty good as we can see and it is also good to know some room for tuning remains so we can hope getting even better results this time. Jenny Chen published good MySQL Tuning writeup so I would not repeat it. It was great colaboration between Sun and MySQL teams which allowed us to deliver these results.
Jeremy Cole recently posted very nice post about MySQL Replication Performance. There are however few points I should comment on.
- Jeremy Speaks about MyISAM and Innodb in the same terms, in fact they are quite different for Replication. As you probably know MyISAM uses buffered IO so if master crashes you're out of sync anyway - whatever sync_binlog option was set to. Well it is still a bit better with sync_binlog enabled as slave could have consistent data after it catches up but master may have some of its tables out of sync with binary log and it is not easy to find which.
- I'm surprised to read enabling binary log drops update performance. I guess Jeremy speaks about enabling binary log and setting sync_binlog option which is good for safe replication. But it is setting which is off …
Here are some steps involved. Using the current MySQL defacto engine InnoDB. Of course, Falcon, PBXT and others will enable alternative engines to be used.
Convert Table Storage Engine Types
$ mysql -u[user] -p[password] [database] -e "SHOW TABLES" | grep -v "Tables_in" | sed -e "s/^/ALTER TABLE /" | sed -e "s/$/ ENGINE=InnoDB;/" > upgrade.sql $ mysql -u[user] -p[password] [database] < upgrade.sql
NOTE: This may not work for all tables, for example those with FULLTEXT indexes will fail.
For the introduction of Referential Integrity we need to ensure the following.
- Each Foreign Key column should have an index. Prior to 4.1 I think this was a requirement, however it’s a good general practice regardless for SQL performance.
- The datatype must match between Primary Key and Foreign Keys. The most obvious oversight is normally UNSIGNED, however you also for example have INT …
Following my implementation of UltimateLAMP, read heaps more at this thread, I undertook to provide customisations of a MediaWiki Installation. Here is the first lesson that you can undertake if you wish to beautify the default MediaWiki Installation.
For the purposes of this demonstration, I am going to help out Jay & Colin and propose a restyle the MySQL forge to fit in with the default Home Page. Hopefully you will see it there soon!
For the full lesson Read More Here
Lesson 1 - Updating the default Monobook.css
There are several different ways to make style changes, the simpliest is to customise the system …
[Read more]