Tuesday, June 14, 2016

MySQL Short Notes


Connect to a MySQL server instance

mysql connect to remote sql servermysql -h 192.168.94.80 --port 3306 -u username -p

Granting a remote user access to a mysql dbms

log into mysql as root user and enter the following command
GRANT ALL ON *.* TO bar@'192.168.1.10' IDENTIFIED BY 'PASSWORD';

here grant all means granting SELECT, INSERT, UPDATE, and DELETE to a particular user.

Now by having *.* means that we have selected all the databases

bar is the username of the remote user

'192.168.1.10' = is the ip address of the remote user's computer

IDENTIFIED BY 'PASSWORD' = sets the password

Add sql db script to mysql mysql --user=username --password=password < sqlfile

Log all queries that mysql server executes

1.) Open my.ini file

2.) Locate [mysqld] and below that enter the following line

log=log.txt

3.) Restart mysql server

Now the log.txt will be created inside the mysql data folder.

Eg:- “C:\Program Files\MySQL\MySQL Server 5.0\data\log.txt"

Restart mysql server on windows

Open command prompt and enter the following commands
net stop mysql net start mysql

Find out what port MySQL is using / Change port mysql is using

Sometimes you forget the port mysql is running on.

Solution :-

1.) Open my.ini file

2.) locate [mysqld]
# The TCP/IP Port the MySQL Server will listen on port=3306

You can change the port mysql listens to my by assigning a new value to port. After that make sure to restart mysql server.

Tuesday, May 3, 2016

A fast and efficient Android Emulator

Hello everyone. I began learning Android development a few months ago all by myself. I use the Android Simulator that comes with Android Studio to run example code. However that particular Android Simulator is very very slow even after installing the HAXM (Intel Hardware Accelerated Execution Manager ). So I did some research Online and discovered a pretty good program called Genymotion. But one downside to it is that, its not free for everyone. If you are a hobbyist developer who develops apps for fun or personal use then its a perfect solution for you.

Genymotion is a Android Emulator that emulates a Android mobile device on your computer. There are a plethora of Android Device configurations for you to chose from and you can also define new custom Android device specifications to suit your need. However for this to work you need a have a valid Genymotion account. You can create account at http://www.genymotion.com. I can certainly guarantee you that your Android experimental work will be sped up significantly and you will definitely enjoy it.




Saturday, September 27, 2014

Playing DCS with Genius MetalStrike 3D

Until recently, I used to  play DCS with the keyboard and it really sucked. Manoeuvring the plane was extremely difficult with the keyboard. But later I purchased a joystick and it really enhanced the entire gaming experience. Well the joystick that I purchased was the Genius MetalStrike 3D. Although in the system requirements section, it doesn't specifically mentioned that it is compatible with Windows 8.1 64 Bit, it sure is. What is most fascinating about this joy stick is that it has 4 axis of control. Which means that you can control, X, Y, Z and throttle with it. However I am still trying to get the throttle function work with DCS. The other keys on the joystick can be assigned specific functions so that you can do major control operations with the joystick itself rather than having to turn to the keyboard (Eg:- Throttle Both Down, Throttle Both Up, Wheel Brake On/O ff, Landing Gear Up/Down, Flaps Up/Down etc). Overall, In my opinion the Genius MetalStrike 3D works well with DCS even on Windows 8.1 64 bit.


Friday, September 26, 2014

Measuring CPU, GPU temperatures in Windows.

Have you ever wanted to measure the temperatures of your CPU and GPU ? Well if you are a gamer, then you might have wanted to do so especially after realizing how hot your computer becomes while playing games. The program that i am using is called realTemp and it can be downloaded from TechPowerUP.  I have set it up, to show the temperature reading on the notification area.


The temperature text in orange is the temperature of my GPU. The other 4 temperature readings are of the individual cores of my Core i7 processor. I can read all the temperature reading at once  from the notification area. If your notification area is already cluttered up with icons I do not recommend displaying them on it. You could launch it form the task-bar and view all the reading from one window.


The GPU temperature is showed on a button at the bottom left. This application even shows how far away  the maximum junction temperature for each CPU core is.







Opening multiple notepads in windows 8

In windows 8, searching for notepad and then clicking on the notepad result wont open a 2nd notepad window. Instead it would bring front the already opened notepad application. So if you really want to open two instances of notepad what do you do? Well the solution is simple. If you already have a instance running, there would be a task-bar item for it on the task-bar. Right click on the notepad task-bar item and select notepad from it and a another instance of notepad would begin running.

This technique works for other applications too.


You could do this from the command prompt too. Open cmd and enter notepad, a new instance of notepad would start running.