ksturner Posted May 29, 2006 Posted May 29, 2006 I was trying to get a MySQL user-defined function working but was getting an error that I don't have permission to access/write to the table 'mysql'. CREATE FUNCTION myfunc_double RETURNS REAL SONAME "udf_example.so" Access denied for user 'MYUSERACCOUNT'@'localhost' to database 'mysql' I believe 'mysql' is responsible for maintaining a list of available functions, and that might cause conflicts on a shared server, but I still need the functionality. I have data that really needs a custom function to prune it at the database level. Thanks for any help/info! Quote
TCH-Bruce Posted May 29, 2006 Posted May 29, 2006 Welcome to the forums ksturner Did you add a user to the database with read/write access? Quote
ksturner Posted May 29, 2006 Author Posted May 29, 2006 Welcome to the forums ksturner Did you add a user to the database with read/write access? Yes, but I don't believe it matters because the database in question is 'mysql', not the database containing my personal data. This is a snip from a comment in the MySQL example file for a UDF: /*** example file of UDF (user definable functions) that are dynamicly loaded ** into the standard mysqld core. ** ** The functions name, type and shared library is saved in the new system ** table 'func'. To be able to create new functions one must have write ** privilege for the database 'mysql'. If one starts MySQL with ** --skip-grant, then UDF initialization will also be skipped. ... ** The CREATE FUNCTION and DROP FUNCTION update the func@mysql table. All ** Active function will be reloaded on every restart of server ** (if --skip-grant-tables is not given) ... I think this is what I'm encountering. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.