How to install MySQL

  1. Install MySQL
    yum install mysql-server mysql php-mysql

How to configure MySQL

  1. Set the MySQL service to start on boot
    chkconfig –levels 235 mysqld on
  2. Start the MySQL service
    service mysqld start
  3. Log into MySQL
    mysql -u root
  4. Set the root user password for all local domains
    SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(‘new-password‘);
    SET PASSWORD FOR ‘root’@'localhost.localdomain’ = PASSWORD(‘new-password‘);
    SET PASSWORD FOR ‘root’@’′ = PASSWORD(‘new-password‘);
  5. Drop the Any user
    DROP USER ”@’localhost’;
    DROP USER ”@’localhost.localdomain’;
  6. Exit MySQL

Install vsftpd and the FTP client -

$ yum install vsftpd
$ yum install ftp

Configure VSFTP

$ vi /etc/vsftpd/vsftpd.conf

You need to change the Anonymous_enable to No:


Uncomment the local_enable option, changing it to yes.


Uncomment command to chroot_local_user. When chroot_local_user is set to Yes, all the local users will be jailed within their chroot and will be denied access to any other part of the server.


Finish up by restarting vsftpd:

$ service vsftpd restart

In order to ensure that vsftpd runs at boot, run chkconfig:

$ chkconfig vsftpd on

We can use the following shell commands to know the installed Linux distribution name and version -

  • $ cat /etc/*-release
  • $ lsb_release -a
  • $ cat /proc/version


Free & open source, high-performance, distributed memory object caching system. Read more about memcached from here –

To develop with memcached in Windows environment – download the memcached binary distribution from here. Double click the memcached.exe file to start it. Now you can use memcached server from PHP.

Read the rest of this entry

, , , , , ,

This example brings few jQuery plugins together to make it solve a very interesting feature of current trend. Using this example you will be able to collect the user location from his address line. The extra facility to select a place by dragging over the map makes it more easier to use. The use of Google maps API makes it possible to get the Latitude and Longitude from the address entered.

snap 2013 05 29  00 31 34 000

Read the rest of this entry

, , , , ,

AJAX requests are only successful within the same domain where the javascript code is being execured. The same origin policy is the security measure implemented in all browsers. The main limitation of this policy is that, you can only request through AJAX only to your own domain, instead of being able to request some different domain. Among many ways to solve this a reputed way is taking help of JSONP with a callback function.

snap 2013 05 28  23 11 52 000

Read the rest of this entry

, , , ,

Sometimes in our code of PHP development we need some way to display the value of an array or object for our ease of coding. For this we generally take help of the PHP builtin functions like print_r() or var_dump() etc. But we have much more flexible ways to do these and sometimes its very easier and time saving. The way is using FirePHP with FireBug.

snap 2013 05 27  23 24 30 000

Read the rest of this entry

, , , ,

This example demonstrates the use of few best jQuery plugins like Validate, Form etc. Some preview of the test run are as follows. To open an example either select them from the list in the left panel or click in the individual images.

test.1 (3)

Read the rest of this entry

, , , , ,

This is a small code library of CSS utility. We frequently need them to design a website. The basic modules gathered here are Labels, Badges, Buttons and Pagination. I shall update the repository as I make more versatile designs on these topics.

snap 2013 05 24  23 24 41 000

Read the rest of this entry

, , ,

You can put this code anywhere in the webpage and it will start tracking any AJAX call made in this page.

<script type="text/javascript">
$(document).ajaxSuccess(function(data) {
alert("The AJAX call is successful");

$(document).ajaxComplete(function(data) {
alert("The AJAX call is successful");

, , ,