Getting MySQL to work on arch linux

I was setting up the LAMP stack on my arch linux installation, I followed the wonderful arch wiki and had no trouble getting apache and php working but there seems to be a problem with MySQL. It installs just fine but the daemon doesn’t start up.

lovelock# rc.d restart mysqld
:: Stopping MySQL Server [FAIL]
:: Starting MySQL Server  [FAIL]

I tried fixing the ownership and permissions but didn’t have any success. I realized the cause of the problem after running mysqld_safe

lovelock# /etc/rc.d/mysqld
usage: /etc/rc.d/mysqld {start|stop|restart}
lovelock# mysqld_safe
/usr/bin/mysqld_safe: line 531: hostname: command not found
111209 17:06:03 mysqld_safe Logging to '/var/lib/mysql/.err'.
/usr/bin/mysqld_safe: line 608: hostname: command not found
111209 17:06:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
111209 17:06:03 mysqld_safe mysqld from pid file /var/lib/mysql/.pid ended

I installed hostname

pacman -S inetutils

But that didn’t solve it either and I had to do this to fix it

rm -rf /var/lib/mysql/*
mysql_install_db --user=mysql --basedir=/usr

This removes the databases and creates a new copy. For me it wasn’t an issue as this is a fresh install but you should be careful when upgrading mysql. Its always handy to back up the databases first.

Getting graphics.h to work on Windows and Linux

We have an introductory Computer Graphics course at our university this semester, we will be working with BGI(Borland Graphics Interface) which has its origins in Borland Turbo C. It goes without saying that I’m not a big fan of Turbo C, its a wonder why its so popular in India even though its so out of date. I have mingw set up on windows and also dual boot sabayon linux. I’ll set it up on both and list the steps here. This should work with Bloodshed Dev-Cpp but your mileage might vary. Continue reading Getting graphics.h to work on Windows and Linux

Back to NITT

As I stare blankly into the computer screen, I know that my time at home is coming to an end, now that the holidays are finally over its time to head back to college. The feelings and emotions that i felt upon my first visit to that place come storming back to me. I first went to Trichy an year back excited at being admitted into one of the finest institutions of the country and life has been an adventure there, there have been both ups and downs and overall it has been a great year.

Continue reading Back to NITT

Setting Up Android SDK on Sabayon

Mobile application development seems to be in vogue these days, with the iPhone and Android platforms being the top contenders. iPhone had all of the market to itself sometime back  but now android is making progress at a very fast rate. I’ve decided to get my feet wet and get to know the basics of developing for android. The android sdk can be installed on windows, linux as well as mac osx. The installation instructions on the android developer are perfect for windows, mac and ubuntu (and its derivatives). Its not plain sailing for others, a few hacks are required here and there but it all works eventually. These instructions are tested on sabayon 6 kde x86_64 but should work with other editions too. Continue reading Setting Up Android SDK on Sabayon

Meeting Mr. Tux

One of my friends asked me as to how one should get started with linux. That made me think, “How did it all start for me?”. I didn’t know too much about linux when I started, so let me recollect those memories that adventure and share with you the difficulties that i faced and the mistakes I made. Probably it’ll help someone who is just starting out, in not making the same mistakes that I made. A wise man learns from another mans mistake whereas a fool makes them all himself and then learns, morons just keep repeating them over and over. I fall in the category in the middle and if you’re reading this then you fall in the first category. Continue reading Meeting Mr. Tux

Automatically Mount Partitions at Boot Up

I dual boot windows and linux and what happens is that most of my data resides on an ntfs volume which can be accessed by both the operating systems. It’s really simple to mount this volume, all that needs to be done is that you click it in the file manager and depending on your distro you may or may not be prompted for the administrator password. This system works well but its not very convenient. I generally configure my distro to automatically mount some partitions at boot up, that way i can easily create symbolic links  that span across volumes and make it easier to access files. Continue reading Automatically Mount Partitions at Boot Up

Choosing a Linux Distribution

A lot of people are curious to know about linux, but its hard for a beginner to start. Linux is really easy to use but there are a lot of prevalent myths that surround it, all of which fade away after you get to know it. There’s a popular saying in the open source world :

Linux is user friendly, it’s just picky about who its friends are.

Enough about that I’ll tell you where you should get started. For somebody who is new the best place to start is playing with linux in a virtual machine. The two most popular options for this are VMware Player and VirtualBox. This is a good way to learn about any Operating System (OS) in an isolated environment without any risk. While virtual machines are rather convenient, you’ll soon realise that they are not ideal for nothing can match the actual experience on native hardware. Its best to test drive a distros live cd/dvd before actually installing it. They are a good way to test hardware compatibility, specially for users who use laptops, hardware support for certain manufacturers is still quite shaky in some linux distros. Continue reading Choosing a Linux Distribution

The online journal of Nikhil Bhardwaj