I've created a simple stored procedure:
mysql> CREATE FUNCTION hello (s CHAR(20)) -> RETURNS CHAR(50) DETERMINISTIC -> RETURN CONCAT('Hello, ',s,'!'); Query OK, 0 rows affected, 1 warning (0.00 sec)
But failed to run it:
mysql> SELECT hello('world'); ERROR 1370 (42000): execute command denied to user ''@'localhost' for routine 'test.hello'
Is it possible that my user name is an empty string? How do I create users and grant privileges? Can I grant a user all the privileges on all entities within a database?