Wednesday, May 13, 2015

MySQL Service Control in Windows

Maintaining MySQL on Windows is easier when compared to that of in Linux. Windows offers an advantage to install it as a Windows Service which can be controlled easily with a click.

Starting or stopping of MySQL service on Windows can be done through Windows Service Manager. To do that, open Run and type services.msc which opens the WIndows Service Manager. In that search for MySQL and right click on it. Then you can do whatever operation you want to do. But this can be done only if you have administrative privileges.

There is a facility to start or stop MySQL on Windows even if you are not an administrator. This cannot be done through GUI and should be done through command line. Follow the following steps to control the MySQL Service without non-administrative privileges,

1) To stop the MySQL Service from the command line, open the command prompt and then go the base directory or the installation directory of the MySQL, generally

C:\Program Files\MySQL\MySQL Server 5.6\bin

2) Now run the following command to stop the MySQL Server,

mysqladmin -u root shudown

    If you have a password to the 'root' account then the command will be,

mysqladmin -u root -p<password> shutdown

3) To start the service again, the general suggested command that should be run in the same installation directory is as follows,

mysqld

But this doesn't work if the server's configuration file is present in a location other than the installation directory. In such case, the above command should be appended with the location of the configuration file, as follows,

mysqld --defaults-file="<Location of the file>"

If you have MySQL Workbench installed, it provides an option to start or stop the server in its INSTANCE section of Management. It issues the above shell commands automatically when clicked either on "Stop Server" or "Start Server" button.

Saturday, December 6, 2014

Windows Family vs Windows Server Family

We've been using Microsoft Windows since our childhood and we know there are several kinds of editions and versions in the Windows family.

The operating systems of Windows family are classified into two types,
  • Client Operating Systems.
  • Network Operating Systems.

Client Operating Systems


The following operating systems come under Client Operating Systems,
  • Disk Operating System (DOS)
  • Windows 95
  • Windows 98
  • Windows 2000
  • Windows XP (includes XP1, XP2, XP3)
  • Windows Vista
  • Windows 7 (includes Home Basic, Home Premium, Professional, Ultimate etc.)
  • Windows 8 (includes Windows 8.1)
These are designed for delivering standard consumer experience. They can be installed on a standalone computer as well as in a network infrastructure. They can work only as clients and cannot offer any services to other clients if they are installed in a network infrastructure. They are referred as lightweight operating systems and can run even with a minimal hardware configuration. Their license costs are less when compared to that of Network Operating Systems. They are designed with more graphics for the end users.

Network Operating Systems


The following Windows operating systems come under Network Operating Systems,
  • Windows Server 2000
  • Windows Server 2003
  • Windows Server 2003 R2
  • Windows Server 2008
  • Windows Server 2008 R2
  • Windows Server 2012
  • Windows Server 2012 R2
These are designed only to be installed in a network infrastructure. Once installed in a network they can run and provide services to the clients. The difference between Network and Client operating systems are, Active Directory Services can be installed on network operating systems. The Active Directory Services authenticate all the clients in a Windows Domain Network and provide services to them. Through Active Directory, they define security policies and other authorities to all the clients present in that domain. These operating systems need high end hardware configuration like more number of processors, high amount of physical memory. Unlike Client Operating Systems they have minimal graphics in their user interface. These operating systems concentrate on background process mostly to ensure better services to the clients. Their license costs are more than that of client operating systems. These are used in professional production environments.

Thursday, November 27, 2014

Delete Connection History in SSMS 2012




Connection History in SSMS 2012 is stored as a .bin file in the following location,

%appdata%\Microsoft\SQL Server Management Studio\11.0

Copy and paste the above path in RUN dialog box and open it. There you can find a file with name SqlStudio and of format .bin. Just delete that file and then open SSMS. Then you will find no connection history.