Show customize date format

Some times we need to show date at customize format. As usual we can’t use format function to format the date at SQL. For that we need to use date_format function to show it.Example is bellow.

select date_format(column_name, ‘%d-%m-%Y’) from table_name;


Installing Apache, MySQL Server 5, phpmyadmin on Ubuntu

To Install Apache, MySQL Server 5, phpmyadmin on Ubuntu you need to run the following command on Terminal.

First Open Terminal (Press Alt+F2 for open run dialogue box, type gnome-terminal and press Enter)

sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5-mysql
sudo apt-get install phpmyadmin

sudo apt-get install mysql-admin

To create a new database, use the mysqladmin command:

mysqladmin create <databasename>

Backup MySQL Database

Here I show a way to full backup of MySQL Database. The command line using mysqldump is bellow.

mysqldump.exe infopath> c:\MySqlBackup.sql –user=Root_OR_Your_user_name –password=Your_Passwd

This command backup your full database on C drive named MySqlBackup.sql
You can also backup your database using graphical user interface.

MySQL remote connection configure

If your MySql server on Linux and you want to use it from another Linux or Windows PC then use the following command.

1. First login on your Linux mysql server (mysql -u root-p)
2. Now enter the following command.

For Set permission on the server:
mysql> grant all privileges on *.* to ‘root’@’%’ identified by ‘root’ with grant option;

For access on the server:
mysql> set password for ‘root’@’%’=old_password(‘passwd’);