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

make_project fails on setting up database with exception: _mysql_exceptions.OperationalError: (1071, 'Specified key was too long; max key length is 767 bytes') #2140

Closed
EndysGit opened this issue Sep 23, 2017 · 5 comments

Comments

@EndysGit
Copy link

I want to get sorry for a possibly stupid issue, but I really can't find the solution.

My system configuration:
Debian 9 on VirtualBox
50Gb storage
2Gb RAM

Also I have installed all dependencies with boinc-server-maker, but then compiled the server from sources.

When I try to start make_project script it always fails on setting up database with:
gleb@BOINCserver:~/boinc-src/tools$ ./make_project firstTest
Creating project 'firstTest' (short name 'firstTest'):
PROJECT_ROOT = /home/gleb/projects/firstTest/
PROJECT_HOST = BOINCserver
URL_BASE = http://BOINCserver.vorfolomeevboinc.com/
HTML_USER_URL = http://BOINCserver.vorfolomeevboinc.com/firstTest/
HTML_OPS_URL = http://BOINCserver.vorfolomeevboinc.com/firstTest_ops/
KEY_DIR = /home/gleb/projects/firstTest/keys/
DB_NAME = firstTest
DB_HOST =

Continue? [Y/n] y
Creating directories
Generating encryption keys
Copying files
Setting up database
Traceback (most recent call last):
File "./make_project", line 234, in
project.install_project()
File "/home/gleb/boinc-src/py/Boinc/setup_project.py", line 592, in install_project
drop_first = options.drop_db_first
File "/home/gleb/boinc-src/py/Boinc/database.py", line 290, in create_database
_execute_sql_script(cursor, os.path.join(srcdir, 'db', file))
File "/home/gleb/boinc-src/py/Boinc/database.py", line 277, in _execute_sql_script
cursor.execute(query)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 226, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorvalue
_mysql_exceptions.OperationalError: (1071, 'Specified key was too long; max key length is 767 bytes')

@davidpanderson
Copy link
Contributor

I can't repro this with:
mysql --version
mysql Ver 15.1 Distrib 10.0.30-MariaDB, for Linux (x86_64) using readline 5.1

@EndysGit
Copy link
Author

Can it appear because of:
mysql Ver 15.1 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

@marcowenwolf
Copy link

marcowenwolf commented Mar 14, 2018

Same from me using newer Maria database:

Debian: Stretch:

root@mars:~# uname -a
Linux mars 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux
root@mars:~# mysql --version
mysql  Ver 15.1 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

@davidpanderson
Copy link
Contributor

This is probably explained here:
https://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes

Try editing boinc/db/schema.sql, change all the 255s to 254, see if that works

@AenBleidd
Copy link
Member

Closed in favor of #4515

@AenBleidd AenBleidd added this to Other Aug 14, 2023
@AenBleidd AenBleidd moved this to Done in Other Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants