While I have not installed a PHP-Nuke site in several years, I think I can answer this question.
In the Dreamhost environment, there is no need for the line you are referring to. You would run it from the command line, but Dreamhost’s MySQL setup handles the assigning of database privileges to users in a different manner.
You “grant” database privileges to a db user via the Control Panel–>Goodies–>Manage MySQL screens, “edit user”. You can double check this to be sure (by “editing” the user), but I belive your initial db user created when you created the database on Dreamhost via the Control Panel should be set up properly. If they are, you are ready to proceed with no other requirement to use that line of code. If they are not , you just set the privileges from the Control Panel screen.