Is it possible to increase php memory without directives in wp-config.php, .htaccess or php.ini?

Using ini_set("memory_limit", "256M"); in a simple plugin works for the most part. Ugly, yes; but it appears to work in my case.

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