Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created DB uses latin1 charset, not utf8 #70

Open
mzocher opened this issue Jan 24, 2019 · 3 comments
Open

Created DB uses latin1 charset, not utf8 #70

mzocher opened this issue Jan 24, 2019 · 3 comments
Assignees

Comments

@mzocher
Copy link

mzocher commented Jan 24, 2019

When this package automagically creates the database in MySQL, tables are created using latin1 instead of utf8. This breaks some content submissions, including ticker concerto/concerto#749 and video concerto/concerto-remote-video#43

I'm not familiar enough with the .deb creation process, so I don't know where the step is for creating the database. I appreciate any help tracking down this step, to fix for future deployments!

@mfrederickson mfrederickson self-assigned this Sep 9, 2019
@mfrederickson
Copy link
Contributor

https://www.debian.org/doc/manuals/dbconfig-common/ch-develguide.html section 3.2.7 has a setting for the dbc_mysql_createdb_encoding. I'm looking into that.

@mfrederickson
Copy link
Contributor

This is a problem for migrations for stretch:

stretch_1  | == 20110530231844 DeviseCreateUsers: migrating ================================
stretch_1  | -- create_table(:users)
stretch_1  |    -> 0.0582s
stretch_1  | -- add_index(:users, :email, {:unique=>true})
stretch_1  | rake aborted!
stretch_1  | StandardError: An error has occurred, all later migrations canceled:
stretch_1  | 
stretch_1  | Mysql2::Error: Specified key was too long; max key length is 767 bytes: CREATE UNIQUE INDEX `index_users_on_email`  ON `users` (`email`) 
stretch_1  | /usr/share/concerto/vendor/bundle/ruby/2.3.0/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in `_query'

Anyone have any ideas for resolving this?

@homer2320776
Copy link

homer2320776 commented Feb 12, 2020

I was able to fix mine by changing some settings in the my.cnf file, which was located at /etc/mysql/mariadb.conf.d/50-server.cnf on Debian Stretch.

I added

innodb-file-format=barracuda
innodb-file-per-table=ON
innodb-large-prefix=ON
innodb_default_row_format = 'DYNAMIC'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants