Auto generated MySQL backup Using PHP

Many sites are using MySQL as database. It is a good practice that taking backup in regular intervals. My aim was to develop a package which deliver me database backup files [ having extension .sql] and mail me with the file as attachment.

You can download[ link ] this package from[ link ]

Privileged commands without sudo

Motive: Bring out some specific commands like shutdown, restart from sudo restriction.
Example: #sudo reboot to #reboot

Site attacked by Malwares

Last night was so weary !!, one site I worked with was attacked by malware and those who visited this site resulted hanging up their computer some lost their OS, even some says they lost their computer completely. Site owner called me and requested me to check the problem immediately. Tell you the truth, it was my first experience with malware attacks.

Shells: What is grep

From my last post [ link ], some of you may noted the use of grep command, I used for process search. grep is a Unix command that allows you to search for a pattern in a list of files [ man Page ]. We are going to test usage with /etc/passwd file.

The passwd file is used for storing encrypted-passwords for the users. Without a passwd file no one can able to login again. So it is better to make a copy of it before we accidentally delete or edit the file, even we are not intended to do so.

Shells: Search Processes

Motive: My aim is to check the process and also have the facility for search string and getting details about running services.

As I need to check it regularly, so I created a shell script for check that.

Shells: AUTO LOGOFF of idle users

I set up an Ubuntu 9.04 Server fordevelopment purpose and made it online through dyndns [more info], It can access by anyone of our team. We got some accessing problem because all our developers logged in through ssh without any need. So there are many users logged in and stay idle.

What we need to increase the efficiency is to force all idle users out. Here how I do this:


how to know hardware details of your system

Do you want to know the complete details of your Ubuntu/Debian flavor system details ?

OpenOffice Recovery document Problem

Getting too many of this screen and always recovery fails ?. Its happens when the user opens a document downloaded from web or remove a document which last opened with openoffice. Every time user opens, this screen appears. This can be avoided by following steps given.


Browser Cache or AutoComplete

I am currently working as a Project Lead for a local search engine project, there was a problem which is remained unsolved in our bugzillla [ wikipedia]. The problem was, in our keyword field, we are using an Ajax[wikipedia] suggestion. When we re-use the same window a browser generated suggestion came up over our suggestion, its make lots of difficulties on showing suggestion.

apache2: change apache port

Generally, the port for apache is 80, when we type http://localhost, it listen to port 80 which is default for apache server. During some other purposes like, managing system in a LAN [wikipedia], which shares same name, or for securing the apache port, to avoid anonymous view.

First took our famous tool known as Terminal Applications->Accessories->Terminal

Reset MySQL 'root' Password

From this post I tried to explain you about setting the root/user password for mysql. But What if you forgot  root password of mySQL server ?

It happens,well we have a solution for that also.


Change MySQL Password

From Linux/Unix based systems, it is easy to set or change the root password. For setting this you need to open Terminal [ Applications->Accessories->Terminal  or Alt+F2 and type gnome-terminal ] and type the following:

Put your localhost into The Internet

Most of the developers do their works on localhost. I am using my ubuntu machine installed with apache2, mySql and PHP5 for my works.

If one of my clients wants to access my localhost to check my works, I have to either buy a host [still, it is the best idea], having large space so that I can add my development; but it costs time and money. Even if money is not a matter, none of the companies do the registration within an hour or so; or we have to find a free-host for php and upload the files [the worst choice], having very limited resources sometimes it won't work.

Shells: 01- Introduction - Linux Commands

Shell Scripts are the main feature of linux distributions.

Lets know what wikepedia defined about shell scripts[wikipedia page]. Before starting shell script we must learn some important linux/unix commands which makes wonder with shell scripting.