Closed
Description
- Gogs version (or commit ref): 0.11.34
- Git version: 2.11.0
- Operating system: Debian 9
- Database (use
[x]
):- PostgreSQLMySQLMSSQLSQLite
- Can you reproduce the bug at https://try.gogs.io:
- Yes (provide example URL)NoNot relevant
- Log gist (usually found in
log/gogs.log
):
Description
I tried to install from binary, I created the database on MariaDB, I launched ./gogs web and opened the installing page on browser. I inserted all needed but I received the error "Database setting is not correct: Error 1709: Index column size too large. The maximum column size is 767 bytes."
I think it's a problem related to MariaDB char set size, but I wasn't able to solve it.
...
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
playmyskay commentedon Nov 26, 2017
I have the same error.
It seems to be a similar problem which is also described here:
https://discuss.gogs.io/t/solved-mysql-error-1064-while-running-first-install/1604/3
I tried these options in mysql (mariadb):
SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_file_per_table=ON;
innodb_large_prefix=1
But the create statements of the tables should have (which is not the case):
ROW_FORMAT=DYNAMIC;
ulorentz commentedon Nov 27, 2017
For me, it doesn't work. Do you confirm those commands don't solve the issue?
ImAnOwl commentedon Nov 27, 2017
have the same problem, but I have already read, upgrading mysql to 5.7 should solve the problem. I'll write later again, when i solved it
ulorentz commentedon Nov 27, 2017
Debian 9 uses MariaDB 10.1, that should be mySQL compatible, but it's not mySQL.
ImAnOwl commentedon Nov 27, 2017
I upgraded to MariaDB 10.2 and now it works. :)
playmyskay commentedon Nov 27, 2017
Here a short description how i get it working.. it is very laborious but it works for me:
-> It will fail with: 'Error 1709: Index column size too large. The maximum column size is 767 bytes.'
BUT the tables were partially created.
To see which tables are currently present:
use gogs; (gogs = your gogs database name!)
SHOW TABLE STATUS;
Alter the tables with the following command:
ALTER TABLE
_tablename_
ROW_FORMAT=DYNAMIC;Now go back to step 2 and repeat it. Always alter all "new" tables which were created.
After 4 or 5 rounds you get every needed table and it's done.
I am not completely sure whether you have to set the above mentioned options. I have done that.
Good luck.
ulorentz commentedon Nov 27, 2017
It works! Thank you very much.
It would be nice to have this process automatic (what should change in gogs code?).
intersel commentedon Nov 27, 2017
@playmyskay Thanks a lot for the solution that worked for me too on
mysql Ver 15.1 Distrib 10.0.32-MariaDB, for debian-linux-gnu (i686) using readline 5.2
on debian 8
m2nlight commentedon Dec 4, 2017
Because of mysql 5.6 (includes prior versions) InnoDB max index length is 767 bytes, mysql 5.7.7 is up to 3072 bytes.
If some varchar column's length is 255, when the character format is utf-8 needs 255*3=765 bytes for index length, It's OK.
But, an utf8mb needs 255*4=1020 bytes for index length.
Solutions:
innodb_file_format=Barracuda
,innodb_large_prefix=on
and create table using ROW_FORMAT=DYNAMIC
orCOMPRESSED
(default for 5.7.7)I will fix it later.
laurivosandi commentedon Dec 16, 2017
Hi, on Debian 9 with MariaDB this sill seems to be much of an hassle. Just to save someone else a bit time, dump this repeatedly to the SQL prompt until Gogs install finishes:
41 remaining items