I’ve followed the guides and I’m up to here, but cannot seem to get past this point. I have even created a new user on the MySQL server with a native password and tried but to no avail.
su discourse -c "bundle exec ruby script/import_scripts/smf2.rb /shared/smf2 -t UTC"
Loading existing groups...
Loading existing users...
Loading existing categories...
Loading existing posts...
Loading existing topics...
Traceback (most recent call last):
7: from script/import_scripts/smf2.rb:701:in `<main>'
6: from script/import_scripts/smf2.rb:28:in `run'
5: from script/import_scripts/smf2.rb:28:in `new'
4: from script/import_scripts/smf2.rb:62:in `initialize'
3: from script/import_scripts/smf2.rb:274:in `create_db_connection'
2: from script/import_scripts/smf2.rb:274:in `new'
1: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `initialize'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `connect': RSA Encryption not supported - caching_sha2_password plugin was built with GnuTLS support (Mysql2::Error)
This seems to be a issue with the script as I can install MySQL client in the container and access the database in the MySQL container via the command line.
This has an interactive prompt and you can select the defaults (MySQL 8 with tools)
Then I installed the normal MySQL 8 library and continued the build:
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y libmysqlclient-dev
su discourse -c 'bundle config unset deployment'
su discourse -c 'bundle install --no-deployment --path vendor/bundle --jobs 4 --without test development'
Once this was all done the rest was the same, the import is now running.
The Discourse devs may want to adjust the import scripts to account for this, at least it’s now on the forums for others to see if they get stuck like I did.