creating wp query with posts with specific category

Use either:

$the_query = new WP_Query('posts_per_page=2&category_name=events');

or

$the_query = new WP_Query(array(
    'posts_per_page' => 2,
    'category_name' => 'events', // this is the category SLUG
));

// EDIT
Please note that category_name actually is the category slug (which is for one-word names originally the same). It is not the actual name (maybe having spaces, special characters etc. in it), though. In your case, where you just want to specifiy a certain category, you can do this either by means of the ID (cat=42) or the slug (category_name=events).

If you really want/have to use the name, you have to use get_cat_ID('Category Name'), for instance like so:

$the_query = new WP_Query(array(
    'posts_per_page' => 2,
    'cat' => get_cat_ID('Events'),
));

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)