Friday, March 27, 2015

How to connect from windows command prompt to mysql command line

The cd in your question is invalid 


cd CD:\MYSQL\bin\
 
You can't cd to CD:\ anything, because CD:\ isn't a valid directory in Windows. CD: would indicate a drive, except that drives are restricted to a single letter between A and Z

If your \MYSQL\BIN is on drive C:, then your commands need to be:


C:\>cd \MYSQL\Bin

C:\MYSQL\Bin>mysql -u root -p admin

-
 
If you're not already on C: (which you'll know by looking at the prompt in the cmd window), or your MySQL folder is on another drive (for instance, D:), change to that drive too:


C:\> cd /d D:\MYSQL\Bin

D:\MYSQL\Bin>mysql -u root -p admin

-
 
 
The .exe after mysql is optional, since .exe is an executable extension on Windows. If you type mysql, Windows will automatically look for an executable file with that name and run it if it finds it.
Read more....

Saturday, March 21, 2015

create an animated scroll to top

In this tutorial you will learn how you can create an animated scroll to top button with jQuery.

create the button.


 
<a href="#" class="scrollToTop">Top</a> 
 
//----------------------------------------------------
// CSS  PART
// ---------------------------------------------------
 
.scrollToTop{
 width:100px; 
 height:130px;
 padding:10px; 
 text-align:center; 
 background: whiteSmoke;
 font-weight: bold;
 color: #444;
 text-decoration: none;
 position:fixed;
 top:75px;
 right:40px;
 display:none;
 background: url('arrow_up.png') no-repeat 0px 20px;
}
.scrollToTop:hover{
 text-decoration:none;
}
 
 //-----------------------
//  Jquery part  
//---------------------------- 
 
$(document).ready(function(){
 
 //Check to see if the window is top if not then display button
 $(window).scroll(function(){
  if ($(this).scrollTop() > 100) {
   $('.scrollToTop').fadeIn();
  } else {
   $('.scrollToTop').fadeOut();
  }
 });
 
 //Click event to scroll to top
 $('.scrollToTop').click(function(){
  $('html, body').animate({scrollTop : 0},800);
  return false;
 });
 
});
 
 


 
Read more....

Friday, March 20, 2015

Remove nginx and re activate apache

Remove nginx and re activate apache

 
//First, you need to stop nginx so it releases port 80 so that apache2 can listen to it later on.
-------------------------------------
sudo service nginx stop                                                           

//Next, if nginx was installed with apt-get, removing it would be as simple as

sudo apt-get remove nginx

//Instead, you can also use

sudo apt-get purge nginx

//First one removes all package files, while the second also removes the configuration files.
//If you intend to use nginx later on with the configuration you did, use remove. Else, I would suggest using purge.

//After removing nginx, you can restart apache to make sure it is listening to port 80.

sudo apache2ctl restart

//If you had removed apache before installing nginx, you can re-install it with

sudo apt-get install apache2 
 
 
Read more....
Related Posts Plugin for WordPress, Blogger...