# Error BD - lang\_constants and latin1\_bin

**URL:** <https://forums.librehealth.io/t/error-bd-lang-constants-and-latin1-bin/3848>\
**Category:** Support\
**Created:** [November 18, 2020, 1:03pm UTC](https://forums.librehealth.io/t/error-bd-lang-constants-and-latin1-bin/3848 "2020-11-18T13:03:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnet](https://forums.librehealth.io/user_avatar/forums.librehealth.io/johnet/32/1530_2.png) [@johnet](https://forums.librehealth.io/u/johnet)\
**Post date:** [November 18, 2020, 1:03pm UTC](https://forums.librehealth.io/t/error-bd-lang-constants-and-latin1-bin/3848/1 "2020-11-18T13:03:11Z")

</div>

Hi. Download the program files (v2.0.0) , then upload them by ftp to my hosting account. Then create the database, relate the user, etc. Then I ran the installation. Apparently it installed well but when entering the site and with a couple of clicks on some options the following error is displayed:

_ERROR: query failed: SELECT \* FROM lang\_definitions JOIN lang\_constants ON lang\_definitions.cons\_id = lang\_constants.cons\_id WHERE lang\_id =? AND constant\_name =? LIMIT 1_

_Error: Illegal mix of collations (latin1\_bin, IMPLICIT) and (utf8\_general\_ci, COERCIBLE) for operation ‘=’_

_/home/_/public\_html/ehr2/library/translation.inc.php at 36: sqlStatementNoLog\*

_/home/_/public\_html/ehr2/library/globals.inc.php at 2830: xl (Māori)\*

_/home/_/public\_html/ehr2/interface/super/edit\_globals.php at 35: require\_once (/home/_/public\_html/ehr2/library/globals.inc.php)_

Please help.

Thank you.

---

<div class="post-metadata">

**Author:** ![muarachmann](https://forums.librehealth.io/user_avatar/forums.librehealth.io/muarachmann/32/2291_2.png) [@muarachmann](https://forums.librehealth.io/u/muarachmann)\
**Post date:** [November 18, 2020, 11:17pm UTC](https://forums.librehealth.io/t/error-bd-lang-constants-and-latin1-bin/3848/2 "2020-11-18T23:17:26Z")

</div>

Hi @johnet how did you create your db? Which Database encoding did you use. Please use _ **utf8** or **utf8mb4** _ .

Thanks, Mua

---

<div class="post-metadata">

**Author:** ![johnet](https://forums.librehealth.io/user_avatar/forums.librehealth.io/johnet/32/1530_2.png) [@johnet](https://forums.librehealth.io/u/johnet)\
**Post date:** [November 19, 2020, 1:33am UTC](https://forums.librehealth.io/t/error-bd-lang-constants-and-latin1-bin/3848/3 "2020-11-19T01:33:28Z")

</div>

Hi. I use cpanel to create the DB. Then I simply ran the installer that the program brings. Look … I attach 4 images about it.

[4 images](https://drive.google.com/drive/folders/1khtUwMYUbYej8w3LgOIwj05d6QSIwJuA?usp=sharing)

---

<div class="post-metadata">

**Author:** ![muarachmann](https://forums.librehealth.io/user_avatar/forums.librehealth.io/muarachmann/32/2291_2.png) [@muarachmann](https://forums.librehealth.io/u/muarachmann)\
**Post date:** [November 19, 2020, 7:44am UTC](https://forums.librehealth.io/t/error-bd-lang-constants-and-latin1-bin/3848/4 "2020-11-19T07:44:07Z")

</div>

> [@johnet](#):
>
> Illegal mix of collations (latin1\_bin,

@johnet the db supports the default coalation which is in English. Please use `utf8_general_ci ` or `utf8mb4_general_ci` . It is normal that you have that error since you chosed Latin (spanish\_ci) coalation instead of English. I will advice you drop all tables and create a new one choosing the correct database encoding else you can convert back to the utf8 general using `ALTER TABLE tbl_name CONVERT TO CHARACTER SET latin1 COLLATE 'latin1_spanish_ci';` but this will have to be done for all the tables. Hope it helps

---

<div class="post-metadata">

**Author:** ![johnet](https://forums.librehealth.io/user_avatar/forums.librehealth.io/johnet/32/1530_2.png) [@johnet](https://forums.librehealth.io/u/johnet)\
**Post date:** [January 3, 2021, 6:27pm UTC](https://forums.librehealth.io/t/error-bd-lang-constants-and-latin1-bin/3848/5 "2021-01-03T18:27:39Z")

</div>

Thank you. Well finally I had to start the installation from scratch. The first thing was to create the DB from cpanel. Then BEFORE starting the installation, enter phpmyadmin, then access the DB and from the “Operations” option change its collation to utf8mb4\_general\_ci. After this if you start the installation with setup.php.😉

---

<div class="post-metadata">

**Author:** ![muarachmann](https://forums.librehealth.io/user_avatar/forums.librehealth.io/muarachmann/32/2291_2.png) [@muarachmann](https://forums.librehealth.io/u/muarachmann)\
**Post date:** [January 4, 2021, 3:02pm UTC](https://forums.librehealth.io/t/error-bd-lang-constants-and-latin1-bin/3848/6 "2021-01-04T15:02:40Z")

</div>


