MySQL Forums
Forum List  »  General

Re: Mysql 5.6 Dropping root password on restart windows
Posted by: Peter Brawley
Date: July 04, 2015 11:08AM

> why would the root password be lost everytime the server is restarted?

How'd you prove it's "lost"? MySQL doesn't delete rows by itself, so there must be a problem with how your websites are logging in.

One problem is that "root" should never be used for website logins, period. A website needs a mysql user defined with just the privileges required by the website and no more. The root user login should be used only by the root user.

You'll need to study the result of this query ...

select user, host, password from mysql.user;

and amend it such that root has one row with all privileges and a secure password, and websites have their own distinct passwords with their own passwords. Note that in no case should these passwords be given out to website users; they're passwords for the websites themselves, and should be known therefore only to developers and webapp administrators. Web app user logins need to use app-specific mechanisms, never mysql.user data.

Options: ReplyQuote


Subject
Written By
Posted
Re: Mysql 5.6 Dropping root password on restart windows
July 04, 2015 11:08AM


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.