Retrieving a Value from a wp-database

I believe for your foreach function should be like below:

foreach ($result as $item){
            $eventname= $item->meta_value;
        }

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