why would you "open" a dll file? secondly, why would an error message include the $dir() identifier? Something tells me you're both trying to do the wrong thing and doing it incorrectly at the same time.
Post the line of code that includes this "opening" of mysql.dll along with the $dir(mysql.dll) snippet.