• Resolved imincognito

    (@imincognito)


    Can you confirm whether (or not) Real Media Library creates the following function in information_schema.routines?
    – fn_realmedialibrary_childs

    If so, I’m wondering if there is a possible issue when using tools like Duplicator to migrate from/to dev to prod (or a new site entirely).

    I believe that any migration tool that populates a new mysql db needs a db user with create/alter function privileges. In a typical shared hosting environment:
    – the cpanel mysql databases module does not support the function privilege.
    – the myphpadmin user tab is crippled for security reasons.

    When populating the target mysql db, I believe functions will not get migrated unless the db user has create/alter functions privileges, so it’s possible that, if you do create this function in information_schema.routines, it may get dropped in the migration.

    AFAIK, the only8 way around this would be to have the hosting vendor manually add these privileges each time migration is executed, which is impractical.

    Note – this would be an issue for any plugin that creates functions.

    Can you pls confirm if this function is yours?

    Thx

    • This topic was modified 3 years, 1 month ago by imincognito.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter imincognito

    (@imincognito)

    Hi

    I now have access to create/alter routine privileges, so this is no longer a problem.

    But…the name suggests that fn_realmedialibrary_childs may possibly be one of your functions. Just as an FYI, I had deleted real media from the site in question, so if this is yours, looks like it might be a leftover from the delete process.

    Plugin Contributor Matthias Günter

    (@mguenter)

    Hey @imincognito !

    Can you confirm whether (or not) Real Media Library creates the following function in information_schema.routines?

    Yeah, Real Media Library creates such function which ensures a high-performance selection of folders and media associations within your database.

    If so, I’m wondering if there is a possible issue when using tools like Duplicator to migrate from/to dev to prod (or a new site entirely).

    Duplicator provides a function / option to make the migration work also with UDFs (User defined functions) within your database dump.

    AFAIK, the only8 way around this would be to have the hosting vendor manually add these privileges each time migration is executed, which is impractical.

    Yes, you can remove the function temporarily completely from your dump (or database) as it is recreated as needed.

    Regards,
    Matthew ??

    Thread Starter imincognito

    (@imincognito)

    Ok, that’s all good to know.

    For some odd reason, my hosting service had previously not exposed function privileges for db users, but that’s resolved.

    Otherwise, Duplicator automatically migrates functions (providing the user has create function privileges).

    Thx for the quick response!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Real Media – Functions – Migration Issue(?)’ is closed to new replies.