MacOS upgrade/install problems


(arnen) #1

Situation
Hi
Have been using openemr on Mac since version 3. Upgraded recently to 5.0.1 & patches OK.
When I went to upgrade to 5.0.2 I noted new requirements (PHP). Upgraded PHP & mysql.
New install of 5.0.1 -> difficulties. Due to older existing mysql I decided to go for a clean install mysql & openemr and then worry about old data.

OpenEMR Version
5.0.2

Browser:
Firefox 71

Operating System
OSX 10.13.6

mysql Ver 8.0.18 for macos10.14 on x86_64 (MySQL Community Server - GPL)
PHP 7.3.6 (cli) (built: Jun 22 2019 11:43:32) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.3.6, Copyright © 1998-2018 Zend Technologies
with Zend OPcache v7.3.6, Copyright © 1999-2018, by Zend Technologies
with Xdebug v2.7.2, Copyright © 2002-2019, by Derick Rethans
Apache 2.4.18
PHP setup as per openemr requirements

Logs

New installation of 5.0.2

Fix permissions as required

Step 1 - have database created by setup

Step 2 - fill in login details
			- no 2fa 

Create db and user

Step 3 4 5 completed OK

Step 6 - added openemr settings to apache config:
	/usr/local/apache2/conf/other/openemr.conf
	
Final page notes administrator:administrator as initial user/pass
    
Restarted apache.
	administrator -  Invalid username or password 
	openemr - Invalid username or password 
	root - Invalid username or password 
	
Terminal:
	
	$ mysql -u openemr -p : logs in ok
	mysql> SELECT * FROM mysql.db WHERE Db = 'openemr'; returns:
		 | localhost | openemr | openemr |
		1 row in set (0.00 sec)
	
	$ mysql -u administrator -p 
		ERROR 1045 (28000): Access denied for user 'administrator'@'localhost' (using password: YES)
	
	$ mysql -u root -p
	mysql> select host, user from mysql.user;
		+-----------+------------------+
		| host      | user             |
		+-----------+------------------+
		| localhost | arnen            |
		| localhost | mysql.infoschema |
		| localhost | mysql.session    |
		| localhost | mysql.sys        |
		| localhost | openemr          |
		| localhost | root             |
		+-----------+------------------+
		6 rows in set (0.00 sec)

	$ mysql -u openemr -p
	mysql> show grants for 'openemr'@'localhost';
		+--------------------------------------------------------------+
		| Grants for openemr@localhost                                 |
		+--------------------------------------------------------------+
		| GRANT USAGE ON *.* TO `openemr`@`localhost`                  |
		| GRANT ALL PRIVILEGES ON `openemr`.* TO `openemr`@`localhost` |
		| GRANT SELECT ON `mysql`.`db` TO `openemr`@`localhost`        |
		+--------------------------------------------------------------+
		3 rows in set (0.00 sec)

	mysql> show grants for 'openemr'@'openemr' ;
	ERROR 1141 (42000): There is no such grant defined for user 'openemr' on host 'openemr'
	mysql> show grants for 'administrator'@'openemr';
	ERROR 1142 (42000): SELECT command denied to user 'openemr'@'localhost' for table 'user'

	$ mysql -u root -p
	mysql> create user 'administrator'@'localhost' IDENTIFIED BY 'administrator';
	ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
	mysql> create user 'administrator'@'localhost' IDENTIFIED BY 'Ad-123456';
	Query OK, 0 rows affected (0.01 sec)
	mysql> GRANT ALL
    -> ON openemr.*
    -> TO 'administrator'@'localhost'
    -> WITH GRANT OPTION;
Query OK, 0 rows affected (0.02 sec)

Restarted apache.
	administrator -  Invalid username or password 
	openemr - Invalid username or password 
	root - Invalid username or password 

Accessed openemr database via NaviCat and user 'administrator' had been created. Reset password for administrator.
Openemr still doesn't accept any of the logins.

	$ mysqldump -u root -p --databases openemr > openemr_5.0.2_Initialized.sql does work

-----------------------------------------------------

If I rerun 5.0.2 setup.php I get:

Step 3

Configuring OpenEMR...
Connecting to MySQL Server... OK.
unable to execute SQL: 'INSERT INTO `medex_icons` (`i_UID`, `msg_type`, `msg_status`, `i_description`, `i_html`, `i_blob`) VALUES(1, 'SMS', 'ALLOWED', '', '', ''),(2, 'SMS', 'NotAllowed', '', '', ''),(3, 'SMS', 'SCHEDULED', '', '', ''),(4, 'SMS', 'SENT', '', '', ''),(5, 'SMS', 'READ', '', '', ''),(6, 'SMS', 'FAILED', '', '', ''),(7, 'SMS', 'CONFIRMED', '', '', ''),(8, 'SMS', 'CALL', '', '\r\n\r\n', ''),(9, 'SMS', 'EXTRA', '', '', ''),(10, 'SMS', 'STOP', '', ' STOP', ''),(11, 'AVM', 'ALLOWED', '', '', ''),(12, 'AVM', 'NotAllowed', '', '', ''),(13, 'AVM', 'SCHEDULED', '', '', ''),(14, 'AVM', 'SENT', '', '', ''),(15, 'AVM', 'FAILED', '', '', ''),(16, 'AVM', 'CONFIRMED', '', '', ''),(17, 'AVM', 'CALL', '', '\r\n\r\n', ''),(18, 'AVM', 'Other', '', '', ''),(19, 'AVM', 'STOP', '', ' STOP', ''),(20, 'EMAIL', 'ALLOWED', '', '', ''),(21, 'EMAIL', 'NotAllowed', '', '', ''),(22, 'EMAIL', 'SCHEDULED', '', '', ''),(23, 'EMAIL', 'SENT', '', '', ''),(24, 'EMAIL', 'READ', '', '', ''),(25, 'EMAIL', 'FAILED', '', '', ''),(26, 'EMAIL', 'CONFIRMED', '', '', ''),(27, 'EMAIL', 'CALL', '', '\r\n\r\n', ''),(28, 'EMAIL', 'Other', '', '', ''),(29, 'EMAIL', 'STOP', '', ' STOP', ''),(30, 'POSTCARD', 'SENT', '', '', ''),(31, 'POSTCARD', 'READ', '', '', ''),(32, 'POSTCARD', 'FAILED', '', '', ''),(33, 'POSTCARD', 'SCHEDULED', '', '', ''),(36, 'AVM', 'READ', '', '', ''),(37, 'SMS', 'CALLED', '', '\r\n\r\n', ''),(38, 'AVM', 'CALLED', '', '\r\n\r\n', ''),(39, 'EMAIL', 'CALLED', '', '\r\n\r\n', '')' due to: Duplicate entry '1' for key 'PRIMARY'