See
MySQL :: MySQL 5.0 Reference Manual :: 5.5.2 Adding New User Accounts to MySQL for adding a new user, generally though it's easier to add the user via cPanel or whatever control panel you are using.
Without the exact error message I'm having to guess a but, but the script it is asking you to run can't be run via phpmyadmin, it must rather be run from the command line.
Finally try using mysql_fetch_assoc rather than mysql_fetch_array.