Can't upgrade 4.1.2 to 4.2

kornyak wrote on Friday, March 27, 2015:

I do not believe I set a password. When I execute the mysqldump with -p the result is “Access is denied”.
When I looked in xampp > security, there is no file C:\xampp\security\mysqlrootpassword.txt
only webdav.htpasswd which contains:“xampp-dav-unsecure:$apr1$6O9scpDQ$JGw2Tjz0jkrqfKh5hhiqD1”
Now what?

fsgl wrote on Friday, March 27, 2015:

If MySQL root password was never set in the first place, as evidenced by the lack of mysqlrootpassword. txt file; run mysqldump without it.

Paste into Command Prompt:
CD C:\
C:\xampp\mysql\bin\mysqldump -u root -p openemr > dumpfile.sql

After upgrade has been completed, it is very important to secure XAMPP. If not, big fat vulnerability.

kornyak wrote on Saturday, March 28, 2015:

Thanks for the reply. As I mentioned, I already tried that:

Microsoft Windows [Version 6.3.9600]
© 2013 Microsoft Corporation. All rights reserved.

C:\Users\Harold> CD C:
C:>
C:>C:\xampp\mysql\bin\mysqldump -u root -p openemr > dumpfile.sql
Access is denied.

C:>

fsgl wrote on Saturday, March 28, 2015:

In that case, the mysql root password was set previously; just not in the Security Console.

Since it was not written down, try reset.

Or try the credentials from sites\default\sqlconf.php.

kornyak wrote on Monday, March 30, 2015:

Microsoft Windows [Version 6.3.9600]
© 2013 Microsoft Corporation. All rights reserved.

I tried by creating the file with password set to a null string ‘’
I followed the instructions, but there is no command mysqld-nt, so I tried putting a space before the -nt. Results as follows - no change:

C:>C:\xampp\mysql\bin\mysqld-nt --init-file=C:\MSQLpasswordreset.txt
‘C:\xampp\mysql\bin\mysqld-nt’ is not recognized as an internal or external comm
and,
operable program or batch file.

C:>C:\xampp\mysql\bin\mysqld -nt --init-file=C:\MSQLpasswordreset.txt
150329 23:05:27 [Warning] option ‘new’: boolean value ‘t’ wasn’t recognized. Set
to OFF.

C:>C:\xampp\mysql\bin\mysqldump -u root -p openemr > dumpfile.sql
Access is denied.

So I searched and found the file you mentioned, but I have no idea what to do with it:

<?php // OpenEMR // MySQL Config $host = 'localhost'; $port = '3306'; $login = 'openemr'; $pass = 'escargot'; $dbase = 'openemr'; //Added ability to disable //utf8 encoding - bm 05-2009 global $disable_utf8_flag; $disable_utf8_flag = false; $sqlconf = array(); global $sqlconf; $sqlconf["host"]= $host; $sqlconf["port"] = $port; $sqlconf["login"] = $login; $sqlconf["pass"] = $pass; $sqlconf["dbase"] = $dbase; ////////////////////////// ////////////////////////// ////////////////////////// //////DO NOT TOUCH THIS/// $config = 1; ///////////// ////////////////////////// ////////////////////////// ////////////////////////// ?>

in case you meant to try escargot:

Microsoft Windows [Version 6.3.9600]
© 2013 Microsoft Corporation. All rights reserved.

c:>C:\xampp\mysql\bin\mysqldump -u root -pescargot openemr > dumpfile.sql
Access is denied.

c:>

kornyak wrote on Monday, March 30, 2015:

I also just tried setting it to ‘password’, still access denied

UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE User=‘root’;
FLUSH PRIVILEGES;

Microsoft Windows [Version 6.3.9600]
© 2013 Microsoft Corporation. All rights reserved.

c:>C:\xampp\mysql\bin\mysqld --init-file=C:\MSQLpasswordreset.txt

c:>C:\xampp\mysql\bin\mysqldump -u root -ppassword openemr > dumpfile.sql.
Access is denied.

c:>

fsgl wrote on Monday, March 30, 2015:

There are two MySQL users:

  1. root with password that has been lost but it’s definitely not escargot
  2. openemr with password escargot

fsgl wrote on Monday, March 30, 2015:

CD C:\

C:\xampp\mysql\bin\mysqldump -u openemr -pescargot openemr > dumpfile.sql

kornyak wrote on Monday, March 30, 2015:

Thank for persisting with me.
Microsoft Windows [Version 6.3.9600]
© 2013 Microsoft Corporation. All rights reserved.

c:>CD C:\

c:>
c:>C:\xampp\mysql\bin\mysqldump -u openemr -pescargot openemr > dumpfile.sql
Access is denied.

c:>

kornyak wrote on Monday, March 30, 2015:

SIMPLE SOLUTION:
Using Powershell I found out the reason for the error is that the output file cannot be created in the C: directory, so I created a new directory and put it in there, that ran ok using username openemr. I can’t do it with root, I guess my password has been messed up from all this, but I guess with a reinstall it won’t matter. Thanks

fsgl wrote on Monday, March 30, 2015:

I presume that you logged into Windows with Administrator’s privileges, not with a secondary account, when you got the last access denial.

If that is the case, try resetting root password as follows:

  1. Stop MySQL from Xampp Control (C-drive\xampp\xampp control) & exit.
  2. Open Notepad. UPDATE statement gets one line. FLUSH gets one line. See link. Paste:
    UPDATE mysql.user SET Password=PASSWORD(‘MyNewPass’) WHERE User=‘root’;
    FLUSH PRIVILEGES;
  3. Name file as: C:\mysql-init.txt. Save the file. I think that this file will appear as the last item in C-drive tree in Windows Explorer.
  4. Run in Command Prompt:
    C:> C:\mysql\bin\mysqld-nt --init-file=C:\mysql-init.txt
  5. Start MySQL from Xampp Control & exit.
  6. Run mysqldump via user, root, with reset (new) password.

kornyak wrote on Monday, March 30, 2015:

SIMPLE SOLUTION:
Using Powershell I found out the reason for the error is that the output file cannot be created in the C: directory, so I created a new directory and put it in there, that ran ok using username openemr. I can’t do it with root, I guess my password has been messed up from all this, but I guess with a reinstall it won’t matter. Thanks

kornyak wrote on Wednesday, April 01, 2015:

Maybe someone could update the ‘upgrade’ page to reflect that win 8.1 will not allow the file to be placed in C:, so the instructions as given will not work.