Monthly Archives: May 2009

Payday is a day to be merry, but be very wary (i almost lost my phone today)

 

I always take the bus. Just like any other day, I took the bus also today.

It’s a Friday so we’re going home later than usual (I was with my fiancee)…

So there we were, in the bus, waiting for our stop. The bus is a little crowded. That’s kind of weird in any other day, but hey, it’s Friday so it’s expected here.

The bus made a stop in Pioneer, 2 guys got on the bus. They sat in aisle sides of the seats one row apart, so I assumed that they don’t know each other. I’m already half-asleep so I didn’t give it much thought…

The conductor yelled Boni so my fiancee and I prepared ourselves to disembark. I got up first, then my fiancee walked behind me. Then suddenly GUY 1 (nearer to driver, in front of me) got up and barricaded himself in the way, facing the back side of the bus, calling some girl’s name. Then GUY 2 (seated behind me) got up and cut off my fiancee, leaving me in between GUY 1 and 2.

At this point, I did’nt suspect something was amiss. I was just annoyed that GUY 1 won’t let me pass, and then this other guy, behind me, is rushing to transfer seats… or so I thought.

I told the guy in front of me to let me pass but he just pretended that he didn’t hear me and kept calling a girl’s name. Then I felt something is weird, it’s the feeling that something is brushing/pressing the right side pocket of my pants.

I simply leaned back to push whoever/whatever that is and waited again for GUY 1 to let me pass, then, that same feeling again… This time I took a glance at my right side pocket, that’s when I saw GUY 2’s hands trying to pick my pocket. Guy 2 realized that I saw him and he quickly maneuvered back to a seat.

I was quite infuriated when I realized what they were trying to do. I looked back at GUY 2 and muster, “‘Tang ina ka!“. GUY 1 was already seated when I faced front.

I know I can’t do anything at that point so I continued walking and managed to say to the conductor, “May mandurukot sa bus mo” before I got off the bus. I waited for my fiancee outside.

It happened so fast. I can’t even remember their faces…

I’ve been living in this Metro for almost 5 years now, and this is the first time that I experienced this, first hand. I’m just thankful to God that nothing bad happened and nothing was stolen. In a way, this served like a reminder to me and my fiancee, to be vigilant always.

This makes me wonder though, this incident happened around 10:30pm, just how many others fell victims to these guys today, a payday…

MySQL: Ubuntu Server 9.04, moving the data directory to a different location

I recently deployed a “custom” server, will be used primarily as a MySQL server, using software RAID 5 for storage reliability.

I’ll try to explain in the future how I deployed the software RAID…

Anyway, my RAID partition is mounted in /data, I’m planning to store all MySQL files in sub-directory inside it, /data/mysql/

After changing the relevant MySQL variables in /etc/mysql/my.cnf,

[mysqld]
port            = 3306
datadir         = /data/mysql
socket          = /var/run/mysqld/mysqld.sock
<<< … truncated data … >>>
innodb_data_home_dir = /data/mysql/
innodb_data_file_path = ibdata1:500M;ibdata2:10M:autoextend
innodb_log_group_home_dir = /data/mysql/
innodb_log_arch_dir = /data/mysql/
innodb_buffer_pool_size = 4000M

I attempted to start MySQL but all I have is this,

root@****:~# /etc/init.d/mysql start
 * Starting MySQL database server mysqld
   …fail!


I am more familiar with RHEL/CentOS, been using it in our servers for years now, so the first thing that comes to mind is SELinux. This is the first time that I’m going to deploy an Ubuntu Server, in short, I’m a newbie.

Note: Realization came later that Ubuntu’s server deployment doesn’t use SELinux, it’s using a counterpart called AppArmor.

Looking at /var/log/messages, I got these messages,

May 10 13:52:38 ****server kernel: [ 9495.640883] type=1503 audit(1241934758.732:11): operation=”inode_create” requested_mask=”a::” denied_mask=”a::” fsuid=0 name=”/data/mysql/****server.lower-test” pid=18791 profile=”/usr/sbin/mysqld”
May 10 13:52:38 ****server kernel: [ 9495.640944] type=1503 audit(1241934758.732:12): operation=”inode_create” requested_mask=”a::” denied_mask=”a::” fsuid=0 name=”/data/mysql/****server.lower-test” pid=18791 profile=”/usr/sbin/mysqld”

These messages are not from SELinux at all, something is preventing /usr/sbin/mysqld from writing in /data/mysql/

A little googling led me to this blog [neodon.blogspot.com] and this blog [brainwreckedtech.wordpress.com].

One of the entries there said that I have to edit AppArmor’s MySQL policy (aha!, so it’s AppArmor!)

root@****:~# vi /etc/apparmor.d/usr.sbin.mysqld

Inside it, I added /data/mysql/, the blue one (don’t ask me what the line means, I don’t have the exact idea, I only assumed it has something to do with read/write permissions).

/usr/sbin/mysqld {
  #include

  #include

  #include

  #include

  #include

  <<< … truncated data … >>>

  /var/log/mysql.err rw,
  /var/lib/mysql/ r,
  /var/lib/mysql/** rwk,
  /data/mysql/** rwk,
  /var/log/mysql/ r,
  /var/log/mysql/* rw,
  /var/run/mysqld/mysqld.pid w,
  /var/run/mysqld/mysqld.sock w,
}

Then restarted AppArmor,

root@****:~# /etc/init.d/apparmor reload
 * Reloading AppArmor profiles …
   …done.


and now it’s working!

root@****:~# /etc/init.d/mysql start
 * Starting MySQL database server mysqld
   …done.

Sun Broadband Wireless: first impressions

I’ve been thinking of having my own internet connection in our apartment for months now. Using “internet-over-bluetooth” with my post paid phone kept me “connected” for the past few months and now my phone’s battery is screaming for it’s life, so I decided to subscribe to an ISP, for real.

There’s a plethora of internet plans available, but what I’m looking for must be something “mobile” and it has to be unlimited. The only plan so far that fits my requirements is Sun’s Broadband Wireless.

So I went to a Sun shop in Robinson’s Pioneer to get one. After coughing out P2,694, (modem fee + initial down payment for the first month… ouch!), I received my USB 3G modem (a Huawei e160) and a Sun SIM card. The connection was activated after 4 hours.

Initial speed is promising, download speed is 30kB/s average and it can go as high as 200kB/s in the early hours.

Here are some screenshots of the 200+kB/s 🙂


using the application

 


using uTorrent