MySQL Forums
Forum List  »  General

Re: Per-database custom parameters
Posted by: Jon Stephens
Date: November 13, 2023 06:22AM

Sorry, but the short answer is "No".

A user variable is specific to a single user session; it cannot be shared between different users/sessions and cannot be persisted.

If you need to store information specific to a given database, I'd suggest that you create a table in that database just for this purpose, and store any such values in it. Then any user with SELECT access to that table can retrieve the values, and the values survive across user sessions and server restarts.

cheers

Jon Stephens
MySQL Documentation Team @ Oracle

MySQL Dev Zone
MySQL Server Documentation
Oracle

Options: ReplyQuote


Subject
Written By
Posted
November 13, 2023 05:24AM
Re: Per-database custom parameters
November 13, 2023 06:22AM
November 13, 2023 08:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.