Just moved a magento installation to some local server in order to perform some focus on it.

Transformed my DB particulars in /application/etc/local.xml

Removed cache and session by removing the /var/cache/* and /var/session/*

Magento still tossing a mistake saying it cannot connect with the database using theolduser@localhost.

This really is driving me insane. What might I be missing.

I faced exactly the same problem once, that eats my lots of hrs.Finally i discovered my database was migrated not completely.Database tables count was matched up in local and demo server.Due to constraints error a part of database wasn't imported.

SET FOREIGN_KEY_CHECKS=0; // top of your exported sql file

//Your database queries

SET FOREIGN_KEY_CHECKS=1;  // bottom of your exported sql file

Magento community wiki has article about moving Magento server to server

You should check your database connection by core php mysql connection.create connection file as db.php in root directory and add bellow code together with your db configuration and execute this file to check on connection is available or otherwise.

example :-

$conn = mysql_connect("Your_Host","User_Title","Password") if(mysql_choose_db("Your_DB_title",$conn)) echo "yes" else echo "no"

This might be assist you to.