ERROR 1307 (HY000): Failed to CREATE PROCEDURE …
When tried to create a procedure, I got the above error message. The user had the needed create routine privileges and the procedure syntax was corrected. Used the following command to check the version and found out that it was v.5.1.30.
mysql> select version();
+----------------------+
| version() |
+----------------------+
| 5.1.30-community-log |
+----------------------+
1 row in set (0.00 sec)
After some researches, it turned out that the database was a copy from an earlier version. So to resolve the problem, I need to apply the mysql_upgrade script. For Redhat Linux installation, it was located in /usr/bin. But it is easy to find out where it is by using the Linux ‘which’ command:
#> which mysql_upgrade
/usr/bin/mysql_upgrade
To excute the script, from the command line run the script using mysql root user and password:
#>/usr./bin/mysql_upgrade -u root –p
Now it should be fine. The script also printed out messages on the screen on what got updated during the execution.
References:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment