At step bench new-site site1.local getting the following error,
pymysql.err.OperationalError: (1045, u"Access denied for user ‘root’@‘localhost’ (using password: YES)")
seems to have highlighted in multiple threads…no progress
mysql -uroot -pYourMysqlPasswordOfChoice -Bse "GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.%.%.%' IDENTIFIED BY 'YourMysqlPasswordOfChoice' WITH GRANT OPTION;"
#and/or
mysql -uroot -pYourMysqlPasswordOfChoice -Bse "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'YourMysqlPasswordOfChoice' WITH GRANT OPTION;"
Delete the existing database, or specify a different db name on bench new-site:
% bench new-site --help
Usage: bench new-site [OPTIONS] SITE
Create a new site
Options:
--db-name TEXT Database name
--mariadb-root-username TEXT Root username for MariaDB
--mariadb-root-password TEXT Root password for MariaDB
--admin-password TEXT Administrator password for new site
--verbose Verbose
--force Force restore if site/database already exists
--source_sql TEXT Initiate database with a SQL file
--install-app TEXT Install app after installation
--help Show this message and exit.
In my understanding, you stuck in first site creation and in some way you already tried before and the “old” db still there.
So, in this case, you already have the same db name that bench new-site is going to create, if you don’t delete the old db or you don’t specify a new name, you can’t proceed.
I tried this command:
Now I am getting this error:
For key innodb_large_prefix. Expected value ON, found value OFF
For key collation_server. Expected value utf8mb4_unicode_ci, found value utf8mb4_general_ci
For key innodb_file_format. Expected value Barracuda, found value Antelope
================================================================================
Creation of your site - erp.LTS failed because MariaDB is not properly
configured. If using version 10.2.x or earlier, make sure you use the
the Barracuda storage engine.
Please verify the settings above in MariaDB's my.cnf. Restart MariaDB. And
then run `bench new-site erp.LTS` again.
================================================================================
Database settings do not match expected values; stopping database setup.
Edit your mysql config file… nano /etc/mysql/my.cnf
and make sure it includes something like this…
[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
# Set buffer pool size to 50-80% of your computer's memory
innodb_buffer_pool_size=1024M
# Set the log file size to about 25% of the buffer pool size
innodb_log_file_size=256M
innodb_log_buffer_size=128M
# the default here is 4MB, or maybe 16MB?? in more recent versions, which sometimes allows for disconnects in the middle of transactions
max_allowed_packet=64M
[mysql]
default-character-set = utf8mb4
Then restart mysql sudo systemctl restart mysql
and then try to run the bench new-site erp.LTS again