Setup error "unable to connect to database as root"

hi @anton ,
For the password to the openemr mysql user, look in your sites/default/sqlconf.php script.

Thanks @brady.miller!
There was indeed a random password which I never gave by myself, and it works.

I have been trying to get OpenEMR running on my FreeBSD box, and I ran into the “unable to connect to database as root” message. I am happy to report I have found TWO ways to get around this message.

  1. In the MySQL Server Details->Server Host: field use instead of localhost
  2. Add the following lines to your php.ini file (note these values are specific for FreeBSD):

mysqli.default_socket = /var/run/mysql/mysql.sock
pdo_mysql.default_socket = /var/run/mysql/mysql.sock

Note that #2 “fixes it” so that leaving the default value of “localhost” will work. This has the side benefit of fixing OTHER php based utilities such as phpMyAdmin.

I hope this is helpful.