Archive for the ‘Technical’ Category

MySQL Installation – Issues

Monday, October 1st, 2007

Here are few tips for MySQL installation, if the problem is of “ does not exist”.

Fatal error: Can’t open and lock privilege tables: Table ‘’ doesn’t exist(we can find this info in /var/log/mysqld.log)

Follow the following steps, MySQL will be installed(all wrt Linux)

1. shell > rm -rf /var/lib/mysql

2. Install mysql rpms.

3. Go to directory where mysql binaries are installed(mysqld_safe, mysql etc)

4. ./mysql_install_db –user=mysql –ldata=/mysqldata (where mysqldata is my data directory for MySQL database. datadir can be specified in /etc/my.cnf file, then we can ignore here)

If it gives a message that hostname is not set or conflict in hostname, then use
./mysql_install_db –user=mysql –ldata=/mysqldata –force

5. MySQL is installed, start MySQL server now,
./mysqld_safe –user=mysql &

Congrats, MySQL is up and running….

When MySQL is Installed, MySQL client does not have any password. It will contain four users, root@localhost, root@localhost.localdomain, ”@localhost, ”@localhost.localdomain(” – anonymous user).
Delete all users at localhost.localdomain and all anonymous users. Set password for root@localhost using

shell > mysql

mysql > drop user root@localhost.localdomain;

mysql > drop user ”@localhost;

mysql > drop user ”@localhost.localdomain;

mysql > set password for root@localhost = password(‘mysqlroot’);

mysql > flush privileges;

mysql > \q

shell >

Flush Privileges will tell server that password is set for root.

MySQL is installed and password is set for mysql client.

Another feather in the cap … US Patent

Monday, September 3rd, 2007

US Patent Certificate

Prof. Saraph was granted US patent on VS routing recently. Indeed it is a great personal milestone and acknowledgement of his innovation and expertise. But more so, it is a feather in the cap for Vegayan and its evolving story.

Value of intellectual property (IP) is often not adequately appreciated. Its potential for providing opportunities is rather underestimated and not typically seen in Indian Product Startups. It certainly gives us few bragging rights. The patent sends a clear signal that we understand the market dynamics and are among the first ones to innovate and offer the best solution.

So what is it worth?

Consider this, the capital and operating expenditures in core networks iswell over $100 billion globally. Any solution that brings efficiency in operation and resource allocation may bring substantial savings. Can this technology bring 5% or 10% savings? We have to see! But, even 5% reduction is huge! Can this enable better functionalities and services?

Again, time will tell!

New Hacker Dictionary….

Wednesday, August 8th, 2007

This is “hacker dictionary” it’s really tome of knowledge….

Really cool stuff about "Coding Style"

Thursday, August 2nd, 2007

Hi folks , Straight from “Linus Torvalds” right in Linux Source Tree ….

MySQL Error 2013

Tuesday, July 31st, 2007

Of all MySQL errors, Error Number 2013 is most frustrating and annoying.

MySQL Errors like 1062(Duplicate Entry), 2002(Server is not started), 2006(Server has gone away) are easy to identify and solve. 2013 signifies lost connection to server in midst of query execution.

2013 is frustrating because, you can’t produce it again for same sequence of actions. So you never know when it will come or when it won’t.

Finally, I have come up with few points to look for when MySQL Error 2013 occurs.

1. check for MySQL Status
shell> mysql -u root -p -e “\s” | grep Uptime

It will give uptime of MySQL Server. If it is less than 1 min, then server must have gone down and started again. So, you have look for Status Variable wait_timeout. By default, wait-timeout will be 28800 sec (8 Hours). Developer can change it while starting a server(change has to be done in my.cnf file) or by setting parameter “CLIENT_INTERACTIVE” in “mysql_real_connect()”. If Uptime is not less than a min, then there is a problem with Query.

Query can be too long or it is syntactically correct but not semantically.

Example: I am running a stored procedure spLogin(uname, pword, status). Here uname and pword are input parameters and status output parameter. To supply input to this stored procedure, I use user defined variables.

So, order of queries will be
mysql > SET @user = ‘sarma’, @passwd = ‘sarma’;
mysql > call spLogin(@username, @password, @status);
There is a chance that it will give an error 2013, as query is syntactically correct, but values passed to query are garbage.

Remedy will be
mysql> call spLogin(@user, @passwd, @status);
query Success(if stored procedure is correct).

But as I said earlier, it is tough to reproduce Error 2013. Care should be taken in passing inputs to either Queries or Stored Procedures and wait_timeout should be atleast 4 Hrs.