Line 1:
Line 1:
−
aaa
+
[[Category:FAQ EN]]
+
You may have forget your MySQL database password or for an unknown reason, it does not works anymore. This is a solution to restore this.
+
This FAQ speak about a MySQL database administrator password problem and not about the lost of the password of a Dolibarr account used to work on Dolibarr.
+
+
= With Microsoft Windows =
+
== DoliWamp ==
+
* Connect to a Windows administrator account on your computer,<br />
+
* Go on menu Windows:
+
Menu Start -> parameters -> Setup panel -> Administration tools -> Services.
+
* Find the service MySQL '''doliwampmysql''' into the list and stop it.
+
* Launch the command line command by going to
+
Menu Start -> Execute -> cmd
+
* Type the following lines to restart MySQL in a particular mode.
+
CD C:\dolibarr\bin\mysql\mysql5.0.45\bin
+
C:\dolibarr\bin\mysql\mysql5.0.45\bin\mysqld-nt --skip-grant-tables
+
* Launch another command line by going to
+
Menu Start -> Execute - cmd (a second time)
+
* Type in this new windows
+
CD C:\dolibarr\bin\mysql\mysql5.0.45\bin
+
C:\dolibarr\bin\mysql\mysql5.0.45\bin\mysql -u root
+
* At the MySQL prompt, type
+
<source lang="sql">
+
mysql> UPDATE mysql.user SET Password = PASSWORD('anewpassword') WHERE User = 'root';
+
mysql> FLUSH PRIVILEGES;
+
mysql> QUIT;
+
</source>
+
* Type
+
C:\dolibarr\bin\mysql\mysql5.0.45\bin\mysqladmin -u root -panewpassword shutdown
+
* Restart Windows.
+
+
+
You should now be able to access your MySQL database, you can now tell to Dolibarr to use the new password.
+
If you use the root user also to allow Dolibarr to connect to your database (not recommanded but why not)
+
* Go into
+
C:\dolibarr\www\dolibarr\htdocs\conf
+
* Edit file conf.php to change variable
+
$dolibarr_main_db_pass
+
with value of the new password.
+
* Save file and quit. It should be ok.
+
+
If Dolibarr use another MySQL user than root,
+
* Go in Windows menu
+
Menu Start - > execute -> CMD
+
cd C:\dolibarr\bin\mysql\mysql5.0.45\bin\
+
C:\dolibarr\bin\mysql\mysql5.0.45\bin\mysql -u root -ppassword
+
* At the MySQL prompt, type
+
<source lang="sql">
+
mysql> UPDATE mysql.user SET Password = PASSWORD('anothernewpassword') WHERE User = 'userusedbydolibarr';
+
mysql> FLUSH PRIVILEGES;
+
mysql> QUIT;
+
</source>
+
* Go into
+
C:\dolibarr\www\dolibarr\htdocs\conf
+
* edit file conf.php and search lines
+
$dolibarr_main_db_user="xxx";
+
$dolibarr_main_db_pass="yyy";
+
Replace xxx and yyy by real values.
+
+
== Dolibarr + XAMPP/Wampserver/EaysPHP... ==
+
To complete
+
+
= Linux =
+
To complete
+
+
= Mac =
+
== DoliMamp ==
+
A compléter