who is “Definer” in terms of MySQL

Today I was playing with our database settings and trying to grant/ cut permissions of users from the development DB and production DB, changing passwords and so on.
Using our primitive hosting’s control panel I wanted to remove the main production DB user from Development DB, which I ended up loosing the user completely.
I created a new user/pass and in few seconds I changed the configurations. Evertyhing looked fine till I found that something is missing and not working properly.

The problem was on one of our scripts and the error was :

The user specified as a definer : (‘no_such_user’@’no_such_host’) is invalid or unregistered

And thank to our primitive control panel, I was not able to recreate the user as it contains “_” [underscore] in the username.

All the settings were fine and I was wondering what’s causing the problem. At first rush I thought that it could be a cache, as I had requested recently to have xcache on our server.

But it wasn’t the case. The error was much more stupid than even one can imagine. That specific script uses a stored procedure to insert / fetch data to/from MySQL. The user who had created the sp was the one who was deleted. And that was the problem. The term “Definer” in terms of MySQL is the one who creates the stored procedure and for the stored procedure to be executed that user must exists.

A quick solution for that was dropping the old stored procedure and re-create it while logged in to MySQL with the new user.

Voila, it solved our issue. Not the best solution but at least I figured out what “Definer” means and it must exists when a sp is being called.

Concurrent projects has never been easier

The way I kept my tasks for each project organized and easy to follow up, was writing them in an Excel file. Having several different columns for different information and color-codes for different statuses.

A nice team of developers who are working with us in one of projects, intorduced us to this fantastic web-based project management tool, basecamp.

It has made my life much easier. This wonderful tool, allow you to add different projects, TODO lists, Milestones, files, white boards ,etc.
Assign each one to one of the team members and follow how is he/she progressing and what’s the status of that task from the comments.

The user-Interface is just perfectly user-friendly and easy to use. Even people in finance and marketing departments can find their way around easily. Every thing is well designed and organized. That’s one of the rare tools in this field which I can say is built by experts, not only perfect programmers. Looking at the ease of use is the best evidence of that.

The professional one is commercial and one has to subscribe to and pay the monthly charges, which is pretty inexpensive in comparision to what you get and I believe it does worth it. But it has a free “single project” version as well, which you can give it a try and see what I’m talking about.

I migrated the Excel files to basecamp and now everybody is enjoying it. I can track and follow the tasks I give out to people and organized my own ones and see what’s remaining at a glance.