Mango 4.2 install-mango.sh script and mysql
-
We are not able to install mango with mysql as we got the following error:
MySQL port? [3306]:
Create MySQL database 'mango' and user 'mango'? [yes]:
NOTE: MySQL admin username/password must be supplied via a .mylogin.cnf file
Drop MySQL database and user if they already exist? [no]: yes
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)I think we have setup the .mylogin.cnf file correctly as we can connect to the remote mysql server with the following command:
$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 65147
Server version: 5.6.47.0 Source distributionCopyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Please advise.
-
I think we have setup the .mylogin.cnf file correctly as we can connect to the remote mysql server with the following command:
Is this as root? If the script is running as root, make sure it works as root.
Next step would be to be run the script using
sh -x
and post the output here stripping out any private information. -
@jared-wiltshire We have installed Mango 4.2 with h2. Now we want to do database conversion to mysql. We tried following the method from https://docs-v4.mango-os.com/database-conversions by adding convert.db.* lines to mango.properties file. After restarting mango and reviewing the ma.log, it seems like mango is still using h2 database. Please advise.
-
@jared-wiltshire Since I cannot do database conversion, I tried reinstalling mango via the script again and was successful after creating the .mylogin.cnf file for the root account.
sudo -s
mysql_config_editor set --host=...Thanks for your help!