Hello Team,
Error/ Cause
While running the new site command following error has occurred.
bench new-site sitenam
pymysql.err.InternalError: (1470, u"String ‘_62d8d83e1652222d’ is too long for user name (should be no longer than 16)")
Our local configuration,
Latest Frappe repo cloned
Bench version is 4.0.1
$ mysql --version
mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1
With above configuration we are receiving
with above configuration we are getting below error, which is related to MySQL username characters limitation.
** Track-trace => **
$ bench new-site new.local
MySQL root password:
Traceback (most recent call last):
File “/usr/lib64/python2.7/runpy.py”, line 162, in _run_module_as_main
“main”, fname, loader, pkg_name)
File “/usr/lib64/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/apps/frappe/frappe/commands/site.py”, line 33, in new_site
db_type = db_type)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/apps/frappe/frappe/commands/site.py”, line 66, in _new_site
source_sql=source_sql,force=force, reinstall=reinstall, db_type=db_type)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/apps/frappe/frappe/installer.py”, line 36, in install_db
setup_database(force, source_sql, verbose)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/apps/frappe/frappe/database/init.py”, line 16, in setup_database
return frappe.database.mariadb.setup_db.setup_database(force, source_sql, verbose)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/apps/frappe/frappe/database/mariadb/setup_db.py”, line 14, in setup_database
dbman.delete_user(db_name)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/apps/frappe/frappe/database/db_manager.py”, line 31, in delete_user
self.db.sql(“DROP USER ‘%s’@’%s’;” % (target, host))
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/apps/frappe/frappe/database/database.py”, line 165, in sql
self._cursor.execute(query)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py”, line 516, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py”, line 727, in _read_query_result
result.read()
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py”, line 1066, in read
first_packet = self.connection._read_packet()
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py”, line 683, in _read_packet
packet.check_error()
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/home/osboxes/Projects/ERPNext_v10/frappe-bench/env/lib/python2.7/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1470, u"String ‘_62d8d83e1652222d’ is too long for user name (should be no longer than 16)")