Mysql User-defined Functions (udf)?

liunx

Guest
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'.<br /><br /><blockquote><br />CREATE FUNCTION myfunc_double RETURNS REAL SONAME "udf_example.so"<br /><br />Access denied for user 'MYUSERACCOUNT'@'localhost' to database 'mysql'<br /></blockquote><br /><br />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. <br /><br />Thanks for any help/info!<!--content-->
Welcome to the forums ksturner<br /><br />Did you add a user to the database with read/write access?<!--content-->
<!--quoteo(post=180836:date=May 29 2006, 06:27 PM:name=TCH-Bruce)--><div class='quotetop'>QUOTE(TCH-Bruce @ May 29 2006, 06:27 PM) <a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=180836"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><div class='quotemain'><!--quotec-->Welcome to the forums ksturner<br /><br />Did you add a user to the database with read/write access?<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />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:<br /><br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->/*<br />** example file of UDF (user definable functions) that are dynamicly loaded<br />** into the standard mysqld core.<br />**<br />** The functions name, type and shared library is saved in the new system<br />** table 'func'. To be able to create new functions one must have write<br />** privilege for the database 'mysql'.If one starts MySQL with<br />** --skip-grant, then UDF initialization will also be skipped.<br />...<br />** The CREATE FUNCTION and DROP FUNCTION update the func@mysql table. All<br />** Active function will be reloaded on every restart of server<br />** (if --skip-grant-tables is not given)<br />...<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />I think this is what I'm encountering.<!--content-->
Welcome to the forum, ksturner. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
 
Back
Top