Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

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 distribution

    Copyright (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!