MySQL Forums
Forum List  »  Newbie

Re: MySQL from command prompt
Posted by: Phillip Ward
Date: August 26, 2020 05:40AM

Quote

Even if you are logged in with Administrative Rights the cmd.exe does not open with those privileges.

I would suggest that this has been the case since early versions of Windows Vista.
Logging in "with Administrative Rights" (which I take to mean logging in while a member of the local Administrators group) does not get you into an "elevated" security context. The only way to do so is to pass through the User Account Control (UAC) "Challenge".

Running cmd "as Administrator" from the Start Menu or setting the compatibility on its shortcut will send you in the (right) direction of the "UAC Challenge".

However, I have to ask - why do you want to run in an elevated context anyway?

Are you starting and stopping the MySQL Windows Service (mysqld)?
If not, then a regular Command Prompt should be perfectly adequate in which to run the mysql client.

Indeed, if you are building a "client-side", Windows Application then, as a rule, you should look to avoid elevation wherever possible. More and more Windows computers are being tied down by Policy so that many Users are simply unable to get past the UAC "Challenge".

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
August 25, 2020 12:52PM
August 25, 2020 02:22PM
Re: MySQL from command prompt
August 26, 2020 05:40AM
October 12, 2020 02:48AM


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.