Thursday, February 21, 2013

How to read mysql logs in Amazon RDS


To get access to the MySql logs in RDS all you need to do is query the MySql table named general_log. 

By default the logging is disabled so you will probably see this table as empty if you have not configured your RDS DB Parameter group to enable logging. 

You can enable logging by going to DB Parameter group's "general_log" and enabling it either from RDS console or using RDS command line tool as below: 


rds-modify-db-parameter-group mydbparametergroup --parameters "name=general_log,value=ON,method=immediate"

Wednesday, December 19, 2012

Some Basic Rules for choosing to use Indexing or not



- Indexes slow down inserts and updates, so you should use them carefully on columns that are FREQUENTLY updated.
- Indexes speed up where clauses and order by.
Remember to think about HOW your data is going to be used when building your tables.
There are a few other things to remember. If your table is very small, it's worse to use an index than to leave it out and just let it do a table scan. Indexes really only come in handy with tables that have a lot of rows.

Why indexes may hurt performance of mysql DB incase of INSERT statements?



Indexes slow down INSERTS because of the overhead required to update the index, but an update might not hurt depending on whether the update is changing the index or not.
Updates that don't change indexes won't incur that extra overhead.
An update is actually a combination of a read and a write.  If the read uses the index and the update doesn't change it, the update might even be faster instead of slower. 

Tuesday, November 27, 2012

svn: warning: cannot set LC_CTYPE locale



svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LC_CTYPE is UTF-8
svn: warning: please check that your locale name is correct


To fix above issues, simply create an environment variable LC_ALL and set it to 'C'. 

e.g., 

export LC_ALL=C


Thursday, November 8, 2012

Configuring Filezilla for Resuming File Upload


1. Go To Transfer Option On Top. 
2. Expand It,Click Default File Exits Action.
3. A small Window will come where u will see Download and Upload.
4. Expand Upload and click Resume File Transfer.

That's all you need to do. 

Cheers.

Wednesday, November 7, 2012

Change Timezone of Ubuntu Machine to UTC from Command line



1.  Open Terminal. 
2.  sudo dpkg-reconfigure tzdata
3.  Follow on screen instructions and select your preferred time zone. 


Simple.. Isn't It?

Saturday, October 27, 2012

What is NAT (Network Address Translation)?


When your firewall or router is configured so that all other devices on internet recognize your home/office servers as having a valid Public IP Address then such a configuration is said to be using NAT or IP masquerading. 

Why NAT?

1.  No one on the Internet knows your true IP address. Thus it protects your PCs by assigning them IP addresses from "private" IP address space that cannot be routed over the Internet. This prevents hackers from directly attacking your home systems because packets sent to the "private" IP will never pass over the Internet.

2.  Hundreds of PCs and servers behind a NAT device can masquerade as a single public IP address. This greatly increases the number of devices that can access the Internet without running out of "public" IP addresses.


NAT Configurations? 

You can configure NAT to be one to one in which you request your ISP to assign you a number of public IP addresses to be used by the Internet-facing interface of your firewall and then you pair each of these addresses to a corresponding server on your protected private IP network. You can also use many to one NAT, in which the firewall maps a single IP address to multiple servers on the network.