Entrar en la consola de MySQL
mysql -u root -p
grant ALL on base_de_datos.* to usuario@localhost identified by 'password';
Más información
http://www.mysql-hispano.org/page.php?id=4&pag=5
http://www.webtaller.com/construccion/lenguajes/mysql/lecciones/gestion_usuarios_mysql.php



Y si también tienes que crear la base de datos:
mysql –user=root -p –execute=”CREATE DATABASE base_de_datos DEFAULT CHARSET utf8;GRANT ALL PRIVILEGES ON base_de_datos.* TO usuario@localhost IDENTIFIED BY ‘password’;”
Un saludo!