Solved: Converting from SQLite to MySQL - Error Produced

I'm following this guide on converting my database as recently Owncloud has become unusable - predicting weeks to sync 1.5GB of data with little in the way of changes.

Above is the guide that I'm following, I type in the following and I get this error

sudo -u www-data php occ db:convert-type --all-apps mysql oc_mysql_user owncloud_db
What is the database password?
  Failed to connect to the database: An exception occured in driver: SQLSTATE  
  [HY000] [2002] Connection refused                                            
db:convert-type [--port PORT] [--password PASSWORD] [--clear-schema] [--all-apps] [--chunk-size CHUNK-SIZE] [--] <type> <username> <hostname> <database>

Could anyone suggest a way I can move forwards please? SQLlite doesn't set a password unlike MySQL when you first setup ownCloud.

I'm running $OC_Version = array(9,1,3,1); on OpenMediaVault using Nginx.


a good starting point would be to google for that error message here.

A few topics you can see there are showing some debugging notes / infos. Overall, your mysql database doesn't accept the connection to its port. Either the MySQL server is not running at all, doesn't listen on TCP, listen on a non-default port or similar.

I discovered the problem was actually related to the fact I already has MySQL installed and configured without even realising it. Once I dug out the password it all worked (at least, I think it did). I have a different set of problems instead.