edx-platform - How to fix mysql error when installing OpenEdX using the Configuration repo

The installation method of Open EdX using the Configuration repository listed on github supposes to work only for a freshly installed server. So if you have already installed mysql-server, you will got this error:

TASK: [edxlocal | create a database for edxapp] ******************************* 
failed: [localhost] => {"failed": true, "item": ""}
msg: unable to connect, check login_user and login_password are correct, or alternatively check ~/.my.cnf contains credentials

FATAL: all hosts have already failed -- aborting


To fix this error and continue the installation process, create the /root/.my.cnf file with the following content:

[client]
user=root
password=<your root pass>

[mysql]
user=root
password=<your root pass>

[mysqldump]
user=root
password=<your root pass>

[mysqldiff]
user=root
password=<your root pass>


Run the installing script again, everything should work.

Comments