Error while creating a new site

Hi All,

I am new to the frappe/erpnext. I am facing the below error while creating a new-site. Please help me in fixing this error.

MacOSX.

command> bench new-site wxyz
MySQL root password:
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1171 (42000) at line 173: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
Database not installed, this can due to lack of permission, or that the database name exists.
** Check your mysql root password, or use --force to reinstall**

Complete trace:

15:09:31 watch.1 | $ node rollup/watch.js
15:09:31 web.1 | * Debugger is active!
15:09:31 web.1 | * Debugger PIN: 220-900-244
15:09:32 watch.1 |
15:09:32 watch.1 | Rollup Watcher Started
15:09:32 watch.1 |
15:09:32 watch.1 | Watching…
15:09:32 watch.1 | Rebuilding frappe-web.css
15:09:32 watch.1 | Rebuilding frappe-web-b4.css
15:09:32 watch.1 | Rebuilding chat.js
15:09:34 watch.1 | Rebuilding frappe-recorder.min.js
15:09:36 watch.1 | Rebuilding frappe-web.min.js
15:09:37 watch.1 | Rebuilding bootstrap-4-web.min.js
15:09:38 watch.1 | Rebuilding control.min.js
15:09:39 watch.1 | Rebuilding dialog.min.js
15:09:40 watch.1 | Rebuilding desk.min.css
15:09:40 watch.1 | Rebuilding frappe-rtl.css
15:09:40 watch.1 | Rebuilding printview.css
15:09:40 watch.1 | Rebuilding desk.min.js
15:09:43 watch.1 | Rebuilding module.min.css
15:09:43 watch.1 | Rebuilding form.min.css
15:09:43 watch.1 | Rebuilding form.min.js
15:09:45 watch.1 | Rebuilding list.min.css
15:09:45 watch.1 | Rebuilding list.min.js
15:09:46 watch.1 | Rebuilding report.min.css
15:09:46 watch.1 | Rebuilding report.min.js
15:09:47 watch.1 | Rebuilding web_form.min.js
15:09:47 watch.1 | Rebuilding web_form.css
15:09:47 watch.1 | Rebuilding email.css
15:09:47 watch.1 | Rebuilding social.min.js
15:09:48 watch.1 | Rebuilding modules.min.js
15:10:31 schedule.1 | Traceback (most recent call last):
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 68, in enqueue_events_for_all_sites
15:10:31 schedule.1 | enqueue_events_for_site(site=site, queued_jobs=jobs_per_site[site])
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 94, in enqueue_events_for_site
15:10:31 schedule.1 | log_and_raise()
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 82, in enqueue_events_for_site
15:10:31 schedule.1 | if is_scheduler_inactive():
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 229, in is_scheduler_inactive
15:10:31 schedule.1 | if is_scheduler_disabled():
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 238, in is_scheduler_disabled
15:10:31 schedule.1 | return not frappe.utils.cint(frappe.db.get_single_value(“System Settings”, “enable_scheduler”))
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/database/database.py”, line 552, in get_single_value
15:10:31 schedule.1 | tabSingles where doctype=%s and field=%s"“”, (doctype, fieldname))
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/database/database.py”, line 156, in sql
15:10:31 schedule.1 | self._cursor.execute(query, values)
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/cursors.py”, line 170, in execute
15:10:31 schedule.1 | result = self._query(query)
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/cursors.py”, line 328, in _query
15:10:31 schedule.1 | conn.query(q)
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 517, in query
15:10:31 schedule.1 | self._affected_rows = self._read_query_result(unbuffered=unbuffered)
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 732, in _read_query_result
15:10:31 schedule.1 | result.read()
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 1075, in read
15:10:31 schedule.1 | first_packet = self.connection._read_packet()
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 684, in _read_packet
15:10:31 schedule.1 | packet.check_error()
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/protocol.py”, line 220, in check_error
15:10:31 schedule.1 | err.raise_mysql_exception(self._data)
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
15:10:31 schedule.1 | raise errorclass(errno, errval)
15:10:31 schedule.1 | pymysql.err.ProgrammingError: (1146, “Table ‘_a0d8a72797b5185f.tabsingles’ doesn’t exist”)
15:10:31 schedule.1 |
15:10:31 schedule.1 | Traceback (most recent call last):
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 68, in enqueue_events_for_all_sites
15:10:31 schedule.1 | enqueue_events_for_site(site=site, queued_jobs=jobs_per_site[site])
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 94, in enqueue_events_for_site
15:10:31 schedule.1 | log_and_raise()
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 82, in enqueue_events_for_site
15:10:31 schedule.1 | if is_scheduler_inactive():
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 229, in is_scheduler_inactive
15:10:31 schedule.1 | if is_scheduler_disabled():
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 238, in is_scheduler_disabled
15:10:31 schedule.1 | return not frappe.utils.cint(frappe.db.get_single_value(“System Settings”, “enable_scheduler”))
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/database/database.py”, line 552, in get_single_value
15:10:31 schedule.1 | tabSingles where doctype=%s and field=%s"“”, (doctype, fieldname))
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/database/database.py”, line 156, in sql
15:10:31 schedule.1 | self._cursor.execute(query, values)
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/cursors.py”, line 170, in execute
15:10:31 schedule.1 | result = self._query(query)
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/cursors.py”, line 328, in _query
15:10:31 schedule.1 | conn.query(q)
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 517, in query
15:10:31 schedule.1 | self._affected_rows = self._read_query_result(unbuffered=unbuffered)
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 732, in _read_query_result
15:10:31 schedule.1 | result.read()
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 1075, in read
15:10:31 schedule.1 | first_packet = self.connection._read_packet()
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 684, in _read_packet
15:10:31 schedule.1 | packet.check_error()
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/protocol.py”, line 220, in check_error
15:10:31 schedule.1 | err.raise_mysql_exception(self._data)
15:10:31 schedule.1 | File “/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/env/lib/python3.7/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
15:10:31 schedule.1 | raise errorclass(errno, errval)
15:10:31 schedule.1 | pymysql.err.ProgrammingError: (1146, “Table ‘_2b46d233a795b486.tabsingles’ doesn’t exist”)
15:10:31 schedule.1 |
15:10:32 web.1 | * Detected change in ‘/Users/akhilbhavirisetty/Desktop/frappe_setup/frappe-bench/apps/frappe/frappe/utils/pycache/logger.cpython-37.pyc’, reloading
15:10:33 web.1 | * Restarting with fsevents reloader
15:10:34 web.1 | * Debugger is active!
15:10:34 web.1 | * Debugger PIN: 220-900-244

Hi everyone ,
I am also getting the same error while creating new-site.

MySQL root password: 
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1171 (42000) at line 173: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
Database not installed, this can due to lack of permission, or that the database name exists.
			Check your mysql root password, or use --force to reinstall