Installation problem, Adding Initial User...ERROR.Unable to add initial user login credentials Step 3

christchara wrote on Saturday, April 23, 2016:

Hello,
I create a subdomain in my webserver. I create a database and change the collation in phpmyadmin in utf8mb4_general_ci. In subdomain folder I extract the openemr-4.2.1.zip file. I continue to installation and in step 3 I take the following message:
Configuring OpenEMR…

Connecting to MySQL Server… OK.
Creating Main tables… OK
Creating Language Translation (utf8) tables… OK
Creating CVX Immunization Codes tables… OK
Writing SQL configuration… OK.
Setting version indicators… OK
Writing global configuration defaults… OK
Adding Initial User… ERROR. Unable to add initial user login credentials

Table ‘stetoua_servicesdatabase.users_secure’ doesn’t exist (#1146)

How would I solve this problem so as to continue in OpenEMR installation?

fsgl wrote on Saturday, April 23, 2016:

Step 2 is very different from that on localhost.

Be certain that you have carefully followed instructions for this step.

christchara wrote on Saturday, April 23, 2016:

I put all the items correctly in Step 2. The server Host is localhost for my webserver. The connection with MySQL server is OK. As I say before, firstly I create a database and change the collation with phpmyadmin in utf8mb4_general_ci [I have already created the database]. The problem is that it cannot create stetoua_servicesdatabase.users_secure table and adding user credentials for my administrator user [Initial user field: admin , Initial User Password: I put a password].
The problem is remaining.

fsgl wrote on Sunday, April 24, 2016:

“Localhost” is entered only if not using a hosting service elsewhere.

Note the following instructions from the Wiki, especially the last sentence:

In Step 2 carefully complete the MySQL Server section.
The Server Host is not localhost, but the IP address of the server running MySQL.
The User Hostname is not localhost, but the IP address of the server running Apache/PHP.
Incorrect entries will mean an installation failure.

christchara wrote on Friday, April 29, 2016:

Hello, I manage to install openemr-4.2.1 in my webserver online finally. I can log in open-emr with Default - English(Standard) Language and all things are showed correctly in English. After installation, my database for open-emr has charset: latin1 and collation:latin1_swedish_ci. When I select Greek language for log in my open-emr all things does not show in Greek language but I take ??? everywhere. I supposed that there was a problem with charset and collation and I tried to change. I went to my database and run the following sql command for all of my 199 tables:
ALTER TABLE CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
The only tables for which the above sql command does not run are the following:
drug_templates
gacl_ado
gacl_aco_map
gacl_aro
gacl_aro_map
gacl_axo
gacl_axo_map
integration_mapping
lists_touch
prices
users_secure
For all the above tables I take the message: Error #1071_Specified key was too long; max key lenght is 767bytes.
After all these, I go to log in my open-emr and select Greek language. But again, I take ???. How would I contrieve to show my open-emr in Greek language correclty? Thank you very much for your answers!!!

tmccormi wrote on Friday, April 29, 2016:

The note from FSGL about localhoast is not correct. you ALWAYS use localhost unless you are serving your DATABASE (mysql) from a different server than you have openEMR installed

fsgl wrote on Friday, April 29, 2016:

Try this.

bradymiller wrote on Saturday, April 30, 2016:

Hi,

You should do a reinstall rather than try to fix it(I am assuming you have just installed and have no data to lose). When you installed it, in Step 1, did you choose:
“I have already created the database”
(I am guessing you did this, since if you have OpenEMR create the database, it should set the database to use UTF8 by default)

If you are already creating the database prior to the install, then ensure you set the default encoding of the database to UTF8.

-brady
OpenEMR

bradymiller wrote on Saturday, April 30, 2016:

Hi,

And if need to fix it, then after a full backup, could try following 2 steps:

  1. Convert database to UTF8: http://www.open-emr.org/wiki/index.php/OpenEMR_UTF-8_Upgrade_Howto
  2. Reinstall the translations: http://www.open-emr.org/wiki/index.php/Install_Translations#Development_Translation_Releases

-brady
OpenEMR

christchara wrote on Monday, May 02, 2016:

I installed translation for greek and it work for me. I can see Greek now correctly. But I have a database which has utf8mb4 charset and utf8mb4_general_ci collation. The tables of my database have utf8mb4 charset and utf8mb4_general_ci collation but there are some tables (drug_templates,gacl_ado,gacl_aco_map,gacl_aro,gacl_aro_map,gacl_axo,gacl_axo_map,integration_mapping,lists_touch,prices,users_secure) which have charset: latin1 and collation:latin1_swedish_ci. Is there problem in function of open-emr, if this is remaining?

bradymiller wrote on Monday, May 02, 2016:

Hi,

You will be unable to store any Greek characters in the latin1 tables. To avoid serious pain down the road, would recommend 1 of 2 options:
Option 1. reinstall (this would be ideal, especially if not using it yet in production) and as stated above, ensure you set the default encoding of the database to UTF8 before running setup.php script.
Option 2. Convert entire database to UTF8 (per link above).

-brady
OpenEMR