-
Notifications
You must be signed in to change notification settings - Fork 5k
MySql /Mariadb error: max key length is 767 byte #4894
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
Comments
I have the same error. I tried these options in mysql (mariadb): But the create statements of the tables should have (which is not the case): |
For me, it doesn't work. Do you confirm those commands don't solve the issue? |
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 |
Debian 9 uses MariaDB 10.1, that should be mySQL compatible, but it's not mySQL. |
I upgraded to MariaDB 10.2 and now it works. :) |
Here a short description how i get it working.. it is very laborious but it works for me:
To see which tables are currently present:
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. |
It works! Thank you very much. |
@playmyskay Thanks a lot for the solution that worked for me too on |
Because of mysql 5.6 (includes prior versions) InnoDB max index length is 767 bytes, mysql 5.7.7 is up to 3072 bytes. Solutions:
I will fix it later. |
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:
|
worked for me
|
I use mysql5.6 , this error exist, your mysql version is 5.7?? |
Just to add that, for me, I had to also alter database and table's character set. The full list of commands was:
|
Didn't work! :-( Details at: #4891 (comment)
|
The easiest way: |
I would love to upgrade to 10.2, but since it is not arm ready yet, I have a problem :-( EDIT: No problem, converted tables collation also and it works on 10.1 as well. Thanks |
I've passed through this issue, so let me summarize:
|
This is claimed to be fixed by merging #4913, please help test on |
Problem still exists, nothing above fixes it or works, please re-open and raise importance level thank you EDIT:
So I created a new database in virtualmin, before clicking create you click "additional options" and then you select the utf8mb4 character set along with the utf8mb4_general_ci collation Now Gogs installs a new version Problem is it does not detect my repositories inside of /gogs-repositories/ from my previous installation. Can anyone show me how to import my repositories from that directory? I cannot seem to find a "backup repos" or "import/restore repos" section. Thank you |
About backup and restore gogs datas. Backup: Restore: Restore SSH and Repo-hooks:
|
@MyS5Droid upgrade MySQL to 5.7 as per request of https://gogs.io/docs/installation. |
@m2nlight Do you know how to restore it from the directory though? I did not know there was CLI command for backup/restore with an archive file :-/ If that directory is where the entire project is contained you would think that either projects in the directory would be added again, or you would be able to import from that directory... Doesn't matter now, trying to reinstall gogs in the same location has not only cleared the database, but that directory as well... Sadly I have lost a shitty project I was working on. Not that I would have completed it but may have needed the code for other project. @unknwon I use virtualmin, when I select the server and go to "PHP Version" it says "Your system only has PHP version 7.0.27 installed, so selecting a different version for each directory is not possible." - According to that I have PHP >= 5.7 |
I don’t know what you saying, PHP is not MySQL. |
@unknwon Whoops thanks for pointing out I am a stoner without providing steps to locate the correct version number but I am a knowledgeable person so I digress. I click "Webmin" and then "Servers" and then "MySQL Database Server" and at the top it says "MySQL version 10.1.26" so MySQL >= 5.7 This is all moot anyways, I fixed it and posted how, and this is now an issue of being able to restore a repo located in the folder where the repositories are contained. Annnd that is moot now as well considering my files and database got wiped on attempting a reinstall. I accept @m2nlight's way in the future to backup and restore, but what then is the point of the repository directory? |
@MyS5Droid I think you need the gogs-repositories directory and gogs database both. If gogs database is empty, the gogs web UI does not show any repos and others. Because the info is gone. Maybe the conf.ini configured a error database. |
MySQl does not have such version 10.1.26 according to https://en.wikipedia.org/wiki/MySQL#Release_history. |
upgrade gogs document: |
10.1.26 is MariaDB version. Please update to MariaDB 10.2 |
WTF is MariaDB I have PHP and MySQL installed on my server. It is
Virtualmin server. I use PHPMyAdmin to access my MySQL database.
I have never installed MariaDB ever. In fact I specifically followed
instructions to remove it and use MySQL.
Virtualmin may have kept it installed in case it wants to use it for a
virtual server but I assure you my SQL databases are MySQL otherwise I
would have issues lol... I've never upgraded any of the databases I've
designed to MariaDB nor any of the PHP code. It simply would not work the
way it is...
…On 21 May 2018 at 23:59, m2nlight ***@***.***> wrote:
10.1.26 is MariaDB version. Please update to MariaDB 10.2
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4894 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/APjUt6Fis_uqE55oEdzX5wSDGbf37O1Uks5t040YgaJpZM4Qqvf->
.
|
I forgot to mention a second or third time, *the point is moot* as I found
the proper working fix (the code in one of my posts above)
Not allowing restoration of everything from the directory is a big mistake.
The files should contain everything needed to do a basic restore...
The dir is named "gogs-repository" for f's sake, you would think all the
files and data are right there to copy zip and backup in emergency...
…On 1 June 2018 at 14:28, MyS5 Droid ***@***.***> wrote:
WTF is MariaDB I have PHP and MySQL installed on my server. It is
Virtualmin server. I use PHPMyAdmin to access my MySQL database.
I have never installed MariaDB ever. In fact I specifically followed
instructions to remove it and use MySQL.
Virtualmin may have kept it installed in case it wants to use it for a
virtual server but I assure you my SQL databases are MySQL otherwise I
would have issues lol... I've never upgraded any of the databases I've
designed to MariaDB nor any of the PHP code. It simply would not work the
way it is...
On 21 May 2018 at 23:59, m2nlight ***@***.***> wrote:
> 10.1.26 is MariaDB version. Please update to MariaDB 10.2
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#4894 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/APjUt6Fis_uqE55oEdzX5wSDGbf37O1Uks5t040YgaJpZM4Qqvf->
> .
>
|
@MyS5Droid I am sorry you lost your repos. Restore repos from |
[x]
):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.
...
The text was updated successfully, but these errors were encountered: