FAQ I Lost my password: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
Tag: 2017 source edit
mNo edit summary
Tag: 2017 source edit
Line 40: Line 40:
*At the MySQL prompt, type
*At the MySQL prompt, type


<source lang="sql">
<syntaxHighlight lang="sql">
mysql> UPDATE mysql.user SET Password = PASSWORD('anewpassword') WHERE User = 'root';
mysql> UPDATE mysql.user SET Password = PASSWORD('anewpassword') WHERE User = 'root';
or on a more recent version
or on a more recent version
mysql> SET PASSWORD FOR 'root@localhost' = PASSWORD('anewpassword');
mysql> SET PASSWORD FOR 'root@localhost' = PASSWORD('anewpassword');
</source>
</syntaxHighlight>
And to take change into account
And to take change into account
<source lang="sql">
<syntaxHighlight lang="sql">
mysql> FLUSH PRIVILEGES;
mysql> FLUSH PRIVILEGES;
mysql> QUIT;
mysql> QUIT;
</source>
</syntaxHighlight>


*Type
*Type
Line 82: Line 82:
*At the MySQL prompt, type
*At the MySQL prompt, type


<source lang="sql">
<syntaxHighlight lang="sql">
mysql> UPDATE mysql.user SET Password = PASSWORD('anewpassword') WHERE User = 'userusedfordolibarrdatabase';
mysql> UPDATE mysql.user SET Password = PASSWORD('anewpassword') WHERE User = 'userusedfordolibarrdatabase';
or on a more recent version
or on a more recent version
mysql> SET PASSWORD FOR 'userusedfordolibarrdatabase@localhost' = PASSWORD('anewpassword');
mysql> SET PASSWORD FOR 'userusedfordolibarrdatabase@localhost' = PASSWORD('anewpassword');
</source>
</syntaxHighlight>
The to take the change into account.
The to take the change into account.
<source lang="sql">
<syntaxHighlight lang="sql">
mysql> FLUSH PRIVILEGES;
mysql> FLUSH PRIVILEGES;
mysql> QUIT;
mysql> QUIT;
</source>
</syntaxHighlight>


Note that you may need to change the "localhot" with the ip of the server if the database is onto another server.
Note that you may need to change the "localhot" with the ip of the server if the database is onto another server.
Line 114: Line 114:
*At the MySQL prompt, type
*At the MySQL prompt, type


<source lang="sql">
<syntaxHighlight lang="sql">
mysql> UPDATE mysql.user SET Password = PASSWORD('anewpassword') WHERE User = 'root';
mysql> UPDATE mysql.user SET Password = PASSWORD('anewpassword') WHERE User = 'root';
or on a more recent version
or on a more recent version
mysql> SET PASSWORD FOR 'root@localhost' = PASSWORD('anewpassword');
mysql> SET PASSWORD FOR 'root@localhost' = PASSWORD('anewpassword');
</source>
</syntaxHighlight>
Then validate the change with
Then validate the change with
<source lang="sql">
<syntaxHighlight lang="sql">
mysql> FLUSH PRIVILEGES;
mysql> FLUSH PRIVILEGES;
mysql> QUIT;
mysql> QUIT;
</source>
</syntaxHighlight>


*Type
*Type
Line 154: Line 154:
*At the MySQL prompt, type
*At the MySQL prompt, type


<source lang="sql">
<syntaxHighlight lang="sql">
mysql> UPDATE mysql.user SET Password = PASSWORD('anewpassword') WHERE User = 'dolibarruserofdatabase';
mysql> UPDATE mysql.user SET Password = PASSWORD('anewpassword') WHERE User = 'dolibarruserofdatabase';
or on a more recent version
or on a more recent version
mysql> SET PASSWORD FOR 'dolibarruserofdatabase@localhost' = PASSWORD('passfordolibarruserofdatabase');
mysql> SET PASSWORD FOR 'dolibarruserofdatabase@localhost' = PASSWORD('passfordolibarruserofdatabase');
</source>
</syntaxHighlight>
And to take the change into account
And to take the change into account
<source lang="sql">
<syntaxHighlight lang="sql">
mysql> FLUSH PRIVILEGES;
mysql> FLUSH PRIVILEGES;
mysql> QUIT;
mysql> QUIT;
</source>
</syntaxHighlight>


*Go into
*Go into

Navigation menu