Showing entries 26113 to 26122 of 44105
« 10 Newer Entries | 10 Older Entries »
Installing Cherokee With PHP5 And MySQL Support On Ubuntu 9.04

Installing Cherokee With PHP5 And MySQL Support On Ubuntu 9.04

Cherokee is a very fast, flexible and easy to configure Web Server. It supports the widespread technologies nowadays: FastCGI, SCGI, PHP, CGI, TLS and SSL encrypted connections, virtual hosts, authentication, on the fly encoding, load balancing, Apache compatible log files, and much more. This tutorial shows how you can install Cherokee on an Ubuntu 9.04 server with PHP5 support (through FastCGI) and MySQL support.

Once upon a timestamp(milliseconds)….

Once upon a time`stamp`, in a `data`base far far away, someone filed a bug named: `Microseconds precision is not retained by TIME, DATETIME, and TIMESTAMP field types.` – Bug Number 8523. This was the beginning of 2005, yet now that we are approaching the end of 2009, after 4.5 years, many (including myself) are still asking for this.

In fairness sake, MySQL have indeed supplied a way to retain milli and micro seconds in a decimal field `DECIMAL(17,3)`, and it is also queryable as if it were a timestamp BUT why isn’t it possible to store in a `DATETIME` or `TIMESTAMP` field? Why can’t we run a ’select now()’ or ’select curtime()’ etc and get a full timestamp including milli / micro seconds?

I have counted 37 different usernames asking for this feature, spanning from 15th Feb 2005 to recently. (list found below)

Some have suggested UDFs, others suggested using log4j while others, pretty annoyed, allegedly went …

[Read more]
OpenSQL Camp 2009: Session schedule published - pre-register now!

I'm happy to announce that the schedule for OpenSQL Camp 2009 (European Edition) has been published on the FrOSCon timetable now. We have a great selection of topics and speakers, so don't miss it! OpenSQL Camp is a subconference of FrOSCon, the Free and Open Source Conference, which will take place on August 22nd and 23rd in St. Augustin, Germany.

The admission fee for the entire conference (both days, incl. OpenSQL Camp) is 5 EUR, you can pre-register here until August 10th (and if you do so today, you will still get a free T-Shirt as well!). Of course, you …

[Read more]
Deployment of MySQL using daemontools, XtraBackup

I am sure many people have already done similar things, but to ease my pain of setting up mysqld on a large-scale environment (I am trying to create a set of database nodes, each node consists of a MySQL failover cluster using semi-sync replication, that can be administered easily), I have just finished writing a deployment script called mysqld_jumpstart.  The caveats are:

  • integration with daemontools (mysqld is automatically started)
  • setup of masters and slaves
  • can setup slaves from backup data generated by XtraBackup

The last feature was the one I especially needed, since thanks to the people at Percona, things have become much …

[Read more]
Does your host flush?

While investigating a friend’s report of ext3/InnoDB corruption in a Ubuntu VirtualBox guest, when his OS X host machine crashed, I discovered that by default, VirtualBox does not do anything about IDE Flush Cache commands. The natural implication of this, which I have been able to reproduce, is that your journaled and transactional guest systems cannot maintain integrity if the host crashes. (For longer reasoning see that forum post.) It’s as if you were running them on broken hardware. This can corrupt InnoDB – which under normal circumstances recovers fine from crashes. You can imagine what it could do to MyISAM So this post is just a headsup – even if you’re only doing development in VB – unless you want to risk nasty surprises, I strongly recommend you disable the IgnoreFlush option in VirtualBox. See “Responding to guest IDE flush requests,” in the VirtualBox manual. This issue may also affect other virtualisation hosts. While …

[Read more]
MySQL Proxy: profiling 0.8

In MySQL Proxy 0.8 we are added a multi-threaded network-subsystem allowing several networks events be processed in parallel. Early benchmarks show that what we have in trunk basicly works.

But the benchmarks weren’t as good as we expected. That’s the time where you prepare to get dirty.

While Kay went with lockstat to analyze the proxy on solaris and found that g_atomic_int_get() isn’t using native code if built with Sun’s CC, I attacked the Linux side with oprofile.

After rebuilding the proxy with -fno-omit-frame-pointer I got the information I was looking for from oprofile:

$ opcontrol --vmlinux=...
$ opcontrol --callgraph=5
$ opcontrol …
[Read more]
MySQL Proxy: profiling 0.8

In MySQL Proxy 0.8 we are added a multi-threaded network-subsystem allowing several networks events be processed in parallel. Early benchmarks show that what we have in trunk basicly works.

But the benchmarks weren't as good as we expected. That's the time where you prepare to get dirty.

While Kay went with lockstat to analyze the proxy on solaris and found that g_atomic_int_get() isn't using native code if built with Sun's CC, I attacked the Linux side with oprofile.

After rebuilding the proxy with -fno-omit-frame-pointer I got the information I was looking for from oprofile:

$ opcontrol --vmlinux=...
$ opcontrol --callgraph=5
$ opcontrol …
[Read more]
Sun: “GPL FUD is not a standard business practice.”

A few weeks ago I wrote a post about an acquaintance that had been given some very strange legal advice from a Sun sales rep. It generated a lot of interest, from both people inside Sun and those outside. Here’s what I have learned since:

1). Many people think that keeping your sources’ identities private makes the resulting information lies or FUD. They should talk to Woodward and Bernstein.

2). Many people cannot interpret a question mark at the end of a sentence. I was not making an indictment with my previous post, I was asking a question.

3). Most Sun employees do not make mistakes 1 and 2.

The third point is what prompts this post. Thanks to some concerned people inside Sun, the person who received the bad information now has a clear line of communication to get it resolved. I hope they do so.

Also, Sun has asked that …

[Read more]
MySQL and MS SQL Server

Recently, MySQL had an article comparing MySQL and SQL Server at  http://dev.mysql.com/tech-resources/articles/move_from_microsoft_SQL_Server.html

There is one clarification I would like to make to this article.  The article states that MS SQL Server has row locking, and while this is true, MS SQL Server doesn’t always use row locking and often will resort to page locking.  A page is 8k of data, so, in effect, many rows are locked at the same time even if only one row in that page is being updated.  At high data throughputs, this can lead to serious lock contention and to dead locks, even though the two processes with the contention or dead  lock are updating different rows.   Stated differently, no matter how well you order your multi-row update processes in MS SQL Server you should expect …

[Read more]
How to Select 'this Wednesday' or Other Relative Dates

I have some bad news and good news. The bad: there is no built in MySQL function for finding a relative date. The good: it's still pretty trivial to get MySQL to calculate it.

The trick is that you need to start with a known date, such as:

mysql> SELECT DATE_FORMAT(CURDATE() - INTERVAL DAYOFWEEK(CURDATE()) DAY, '%W, %M %D, %Y') AS d;
+----------------------------+
| d |
+----------------------------+
| Saturday, August 1st, 2009 |
+----------------------------+

That gets you the date for the Saturday that ends the previous week. Then "this Wednesday" or "last Thursday" or almost any other relative date is simple to calculate, provided one caveat. You must do one additional check to see if were already passed the target day of the week.

If today is Tuesday, then "this Wednesday" is 4 days from our reference date above. However if it's already …

[Read more]
Showing entries 26113 to 26122 of 44105
« 10 Newer Entries | 10 Older Entries »