In this release we have updated the hypernode-importer once again. It will now show a friendlier error message when the database username of the shop that is being imported is too long.

Previously when that error occurred it would show a stack trace like this:

Hypernode importer failed. Output:

*** Exception:

<class '_mysql_exceptions.OperationalError'>: (1470, "String 'thisdbuseristoolong' is too long for user name (should be no longer than 16)")

  File "/usr/lib/python3/dist-packages/kamikaze3/importer/perform_import.py", line 224, in flatten_exception
    yield
  File "/usr/lib/python3/dist-packages/kamikaze3/importer/perform_import.py", line 251, in run
    self.import_strategy.execute()
  File "/usr/lib/python3/dist-packages/kamikaze3/importer/strategy/magento2.py", line 97, in execute
    super(ImportMagento2, self).execute()
  File "/usr/lib/python3/dist-packages/kamikaze3/importer/strategy/magento.py", line 427, in execute
    self.prepare_database()
  File "/usr/lib/python3/dist-packages/kamikaze3/importer/strategy/magento.py", line 122, in prepare_database
    self.importer.local_db_conn.driver.create_database()
  File "/usr/lib/python3/dist-packages/kamikaze3/importer/db.py", line 254, in create_database
    self.db_connection.importer.remote_db_info['password']
  File "/usr/lib/python3/dist-packages/kamikaze3/importer/db.py", line 216, in exec_query
    with self.exec_query_context(query, params=params) as cursor:
  File "/usr/lib/python3.5/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/usr/lib/python3/dist-packages/kamikaze3/importer/db.py", line 202, in exec_query_context
    cursor.execute(query, params)
  File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 226, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorvalue
  File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 217, in execute
    res = self._query(query)
  File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 378, in _query
    rowcount = self._do_query(q)
  File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 341, in _do_query
    db.query(q)
  File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 280, in query
    _mysql.connection.query(self, query)

But now it will simply show “the database username was too long. It can be 16 characters max.”.

The 16 character limit comes from MySQL 5.6.

MySQL user names can be up to 16 characters long.

But because shops that are imported to a Hypernode might come from a different environment the 16 character limit could have been exceeded. In the future when we eventually upgrade to MySQL 5.7 the maximum length will become 32 characters, but for now the 16 character limit will be maintained.

The Service Panel automated importer tool and Hyperformance.nl will now also show this error when it occurs instead of displaying the generic “something went wrong” error.