Posts

Showing posts from August, 2017

How to Manage or Access Multiple MySQL server using one PhpMyAdmin ?

phpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL with the use of a web browser. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements; or managing users and permissions. In this tutorial I will show you how to configure PhpMyAdmin to administrate various MySQL database servers. To install and run PhpMyAdmin we need to install LAMP stack or indivudual each component on the server. After complete installation we need to modify the PhpMyAdmin configuration file.  1) If installed LAMP Statck Navigate to below path. Assume you installed LAMP     in /opt directory.          cd  /opt/lampp/phpmyadmin/ 2) In not installed LAMP Stack then Navigate to below path.          cd  /etc/phpmyadmin/ 3) Open config.inc.php file using below command.         sudo nano config.inc.php 4) Search for the below content: // First server $i++

How do I uninstall MySQL completely from Ubuntu ?

Open a terminal (press Ctrl+Alt+T) and run the following command in sequence: sudo service mysql stop  #or mysqld sudo killall -9 mysql sudo killall -9 mysqld sudo apt-get remove --purge mysql-server mysql-client mysql-common sudo apt-get autoremove sudo apt-get autoclean sudo deluser mysql sudo rm -rf /var/lib/mysql sudo apt-get purge mysql-server-core-5.5 sudo apt-get purge mysql-client-core-5.5 sudo rm -rf /var/log/mysql sudo rm -rf /etc/mysql Remove PHP completelly from ubuntu To Remove PHP completely from Ubuntu run the following: sudo apt-get purge php.* 

Connect to EC2 instance using SSH and Ubuntu terminal

Assuming you have a Key Pair file .pem already created in EC2 management console, connect to your instance, in my case Ubuntu 12.04.2 LTS 64 with this command: $ ssh -i ec2.pem ubuntu@ec2-23-22-122-111.compute-1.amazonaws.com where ec2.pem should be name of your key file, this command works only if you are in the directory where .pem file is stored, otherwise use ssh -i /home/Downloads/your_key_name.pem ... ubuntu is the default user name used on EC2 instances with Ubuntu default AMIs. ec2-23-22-122-111.compute-1.amazonaws.com is Public DNS, you can find it in EC2 management console > Instances > Description. First time you will be asked to trust public key, replay by writing whole word "yes". The authenticity of host '23.22.122.111 (23.22.122.111)' can't be established. ECDSA key fingerprint is 55:1b:99:99:a4:9c:eb:94:fd:7b:4f:11:5b:bf:94:7d. Are you sure you want to continue connecting (yes/no)? yes   Hit Enter and then you will

What is Timer and TimerTask in Java

Introduction Timer in Java is a utility class which is used to schedule tasks for both one time and repeated execution. Timer is similar to alarm facility many people use in mobile phone. Just like you can have one time alarm or repeated alarm, You can use java.util.Timer to schedule one time task or repeated task. In fact we can implement a Reminder utility using Timer in Java and that's what we are going to see in this example of Timer in Java. Two classes java.util.Timer and java.util.TimerTask is used to schedule jobs in Java and forms Timer API. TimerTask is actual task which is executed by Timer. Similar to Thread in Java, TimerTask also implements Runnable interface and overrides run method to specify task details. This Java tutorial will also highlight difference between Timer and TimerTask class and explains how Timer works in Java. By the way difference between Timer and Thread is also a popular Java questions on fresher level interviews. What is Timer and TimerTa