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.


Jon Stephens
MySQL Documentation Team @ Oracle

MySQL Dev Zone
MySQL Server Documentation

Options: ReplyQuote

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

Sorry, only registered users may post in this forum.

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.