Hey Hi, Thanks for the quick reply. It did well.
I updated Python to 2.7 and I could able to install it upto DB import.
During the step “bench new-site site1.local”, giving errors. Pasted the errors. Sorry for pasting such a big error list
MySQL root password:
Created user site1.local
Created database site1.local
Granted privileges to user site1.local and database site1.local
Starting database import…
ERROR 1064 (42000) at line 10: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(6) DEFAULT NULL,
modified
datetime(6) DEFAULT NULL,
modified_by
varchar’ at line 3
Imported from database /var/www/html/erpnext.flask.com/public_html/frappe-bench/apps/frappe/frappe/data/Framework.sql
Traceback (most recent call last):
File “/var/www/html/erpnext.flask.com/public_html/frappe-bench/env/bin/frappe”, line 9, in
load_entry_point(‘frappe==4.4.6’, ‘console_scripts’, ‘frappe’)()
File “/var/www/html/erpnext.flask.com/public_html/frappe-bench/apps/frappe/frappe/cli.py”, line 53, in main
return run(fn, parsed_args)
File “/var/www/html/erpnext.flask.com/public_html/frappe-bench/apps/frappe/frappe/cli.py”, line 81, in run
out = globals().get(fn)(*args.get(fn), **args)
File “/var/www/html/erpnext.flask.com/public_html/frappe-bench/apps/frappe/frappe/cli.py”, line 67, in new_fn
return fn(*args, **new_kwargs)
File “/var/www/html/erpnext.flask.com/public_html/frappe-bench/apps/frappe/frappe/cli.py”, line 328, in install
_install(db_name, root_login, root_password, source_sql, admin_password, force, site_config, reinstall, quiet, install_apps)
File “/var/www/html/erpnext.flask.com/public_html/frappe-bench/apps/frappe/frappe/cli.py”, line 311, in _install
install_app(“frappe”, verbose=verbose, set_as_patched=not source_sql)
File “/var/www/html/erpnext.flask.com/public_html/frappe-bench/apps/frappe/frappe/installer.py”, line 90, in install_app
frappe.clear_cache()
File “/var/www/html/erpnext.flask.com/public_html/frappe-bench/apps/frappe/frappe/init.py”, line 287, in clear_cache
frappe.sessions.clear_cache()
File “/var/www/html/erpnext.flask.com/public_html/frappe-bench/apps/frappe/frappe/sessions.py”, line 49, in clear_cache
for sess in frappe.db.sql(“”“select user, sid from tabSessions”“”, as_dict=1):
File “/var/www/html/erpnext.flask.com/public_html/frappe-bench/apps/frappe/frappe/database.py”, line 121, in sql
self._cursor.execute(query)
File “/var/www/html/erpnext.flask.com/public_html/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/var/www/html/erpnext.flask.com/public_html/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, “Table ‘site1.local.tabSessions’ doesn’t exist”)
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/root/bench-repo/bench/cli.py”, line 29, in cli
return bench()
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/root/bench-repo/bench/cli.py”, line 89, in new_site
_new_site(site)
File “/root/bench-repo/bench/utils.py”, line 76, in new_site
exec_cmd(“{frappe} --install {site} {site}”.format(frappe=get_frappe(bench=bench), site=site), cwd=os.path.join(bench, ‘sites’))
File “/root/bench-repo/bench/utils.py”, line 59, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File “/usr/local/lib/python2.7/subprocess.py”, line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘/var/www/html/erpnext.flask.com/public_html/frappe-bench/env/bin/frappe --install site1.local site1.local’ returned non-zero exit status 1
Actually I am using the MySQL Database.
Here is the MySQL conf setting /etc/my.cnf
The MySQL server
[mysqld]
default-storage-engine=MyISAM
#skip-innodb
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size = 16K
max_allowed_packet = 4M
table_open_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 128K
Can’t I use MySQL instead mariDB?
I have checked the MySQL, site1.local DB was created with only table _Auth.
Please help me in resolving this issue.
Ram