Bench new-site site1.local get error

I am getting error with this step

l@localhost frappe-bench]$ bench new-site site1.local
MySQL root password:

Creation of your site - site1.local failed because MariaDB is not properly
configured to use the Barracuda storage engine.
Please add the settings below to MariaDB’s my.cnf, restart MariaDB then
run bench new-site site1.local again.

[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

=================================================
[nul@localhost frappe-bench]$

how can I fix this problem?

My OS: Centos 7

MariaDB [(none)]> status


mysql Ver 15.1 Distrib 10.1.24-MariaDB, for Linux (x86_64) using readline 5.1

Connection id: 22
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ‘’
Using delimiter: ;
Server: MariaDB
Server version: 10.1.24-MariaDB MariaDB Server
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 1 hour 13 min 11 sec
Threads: 1 Questions: 132 Slow queries: 0 Opens: 17 Flush tables: 1 Open tables: 10 Queries per second avg: 0.030

I cannot help you much on this, but did you do what the error message said. Which is to:

Please add the settings below to MariaDB’s my.cnf, restart MariaDB then
run bench new-site site1.local again.
[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4

locate my.cnf

/etc/my.cnf
/etc/my.cnf.d
/etc/my.cnf.d/client.cnf
/etc/my.cnf.d/mysql-clients.cnf
/etc/my.cnf.d/server.cnf
/home/kanel/Documents/bench-repo/vm/ansible/roles/mariadb/templates/my.cnf.j2

I added /etc/my.cnf

[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

[client-server]
!includedir /etc/my.cnf.d
1 Like

So did you restart MySQL and what happens when you run bench new-site site1.local? Same error?

Thanks

Jay

3 Likes

THANKS @JayRam

Great to see you make some technical replies. :slight_smile:

Buddy. That was hardly technical!

Have the same problem. Added the settings to my.cnf but still getting the same error

Did you try restarting MySQL as mentioned above?

restarted mysql and tried, also tried rebooting machine many times.
checked sudo mysqld --print-defaults
it shows argument --innodb-file-format=barracuda

Which system are you trying to install this on?
Did you manually install or use the easy install script?

I am trying to manually install on fresh installed Debian 9 VM.
easy install script did not run as it does not support debian 9.

I’m getting the same error, I updated mariadb.cnf (because my.cnf is symlinked to it), restarted and even rebooted but end up with same error:

frappe@ubuntu:~/frappe-bench$ bench new-site site1.local --admin-password 0 --mariadb-root-password 0
================================================================================
Creation of your site - site1.local failed because MariaDB is not properly 
configured to use the Barracuda storage engine. 
Please add the settings below to MariaDB's my.cnf, restart MariaDB then 
run `bench new-site site1.local` again.


[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

================================================================================
ubuntu@ubuntu:~$ sudoedit /etc/mysql/mariadb.cnf
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.

#
# This group is read both both by the client and the server
# use it for options that affect everything
#

[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4
[client-server]

# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
1 Like

The settings were already present before I modified any .cnf:

ubuntu@ubuntu:~$ less /etc/mysql/conf.d/settings.cnf
mysqld]

# GENERAL #
user                           = mysql
default-storage-engine         = InnoDB
socket                         = /var/lib/mysql/mysql.sock
pid-file                       = /var/lib/mysql/mysql.pid

# MyISAM #
key-buffer-size                = 32M
myisam-recover                 = FORCE,BACKUP

# SAFETY #
max-allowed-packet             = 64M
max-connect-errors             = 1000000
innodb                         = FORCE

# DATA STORAGE #
datadir                        = /var/lib/mysql/

# BINARY LOGGING #
log-bin                        = /var/lib/mysql/mysql-bin
expire-logs-days               = 14
sync-binlog                    = 1

# REPLICATION #
server-id                      = 1

# CACHES AND LIMITS #
tmp-table-size                 = 32M
max-heap-table-size            = 32M
query-cache-type               = 0
query-cache-size               = 0
max-connections                = 500
thread-cache-size              = 50
open-files-limit               = 65535
table-definition-cache         = 4096
table-open-cache               = 10240

# INNODB #
innodb-flush-method            = O_DIRECT
innodb-log-files-in-group      = 2
innodb-log-file-size           = 512M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table          = 1
innodb-buffer-pool-size        = 630M
innodb-file-format             = barracuda
innodb-large-prefix            = 1
collation-server               = utf8mb4_unicode_ci
character-set-server           = utf8mb4
character-set-client-handshake = FALSE
max_allowed_packet             = 64M

# LOGGING #
log-error                      = /var/lib/mysql/mysql-error.log
log-queries-not-using-indexes  = 0
slow-query-log                 = 1
slow-query-log-file            = /var/lib/mysql/mysql-slow.log

[mysql]
default-character-set = utf8mb4

# BEGIN ANSIBLE MANAGED BLOCK
# Import all .cnf files from configuration directory
!includedir /etc/mysql/mariadb.conf.d/
# END ANSIBLE MANAGED BLOCK

Try moving the mariadb.cnf file to /etc/mysql/mariadb.conf.d/ folder. Create the folder if it doesn’t exist. Restart mysql and then try creating a site again.

1 Like

I have used this command:
locate my.cnf

The result is:
/etc/alternatives/my.cnf
/etc/mysql/my.cnf
/etc/mysql/my.cnf.fallback
/home/frappe/bench-repo/playbooks/roles/mariadb/templates/my.cnf.j2
/var/lib/dpkg/alternatives/my.cnf

What should I do to pass this command below:
bench new-site erp.site
MySQL root password:

After writing any password I have this error below:
MySQL root password:

Click Here To Show The Error

MySQL root password:
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 34, in new_site
verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 65, in _new_site
admin_password=admin_password, verbose=verbose, source_sql=source_sql,force=force, reinstall=reinstall)
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 38, in install_db
create_database_and_user(force, verbose)
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 62, in create_database_and_user
if force or (db_name not in dbman.get_database_list()):
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 549, in get_database_list
return [d[0] for d in self.db.sql(“SHOW DATABASES”)]
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 165, in sql
self.connect()
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 115, in connect
charset=‘utf8mb4’, use_unicode = True, conv = conversions, local_infile = self.local_infile)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/init.py”, line 90, in Connect
return Connection(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 699, in init
self.connect()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 936, in connect
self._request_authentication()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1156, in _request_authentication
auth_packet = self._read_packet()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1018, in _read_packet
packet.check_error()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 384, in check_error
err.raise_mysql_exception(self._data)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, u"Access denied for user ‘root’@‘localhost’ (using password: YES)")

I have passed this code:
bench new-site example.site
MySQL root password:

Creation of your site - example.site failed because MariaDB is not properly
configured to use the Barracuda storage engine.
Please add the settings below to MariaDB’s my.cnf, restart MariaDB then
run bench new-site example.site again.

[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

But I can’t configure the MariaDB

Most likely the password you’re entering is incorrect. Use the password you used to setup MariDB.


In reference to your second error,

Create a file in /etc/mysql/mariadb.conf.d/ named mariadb.cnf and paste the above there.

2 Likes

thanks… it’s work