Convert tables to INNODB format
The developers of GLPI have created a script that allows you to do the migration, it is in REPERTOIRE_GLPI / scripts / innodb_migration.php With a small database, it is possible to launch the script directly from a browser. I strongly advise against this solution which can damage your database. To migrate the database we will use GLPI in CLI mode, ie execute the script directly from a command prompt for Windows or from a console on Linux.
GLPI migration INNODB on Windows
1. Open your Windows Explorer and go to the installation location of GLPI 1 and identify script 2.
Emplacement du script de migration innodb
Tip: select the script, hold down the Shift key and right click on it and click Copy As Path.
2. Open a notepad (Notepad ++) and paste.
3. Do the same with the PHP executable found in C: \ Program Files (x86) \ PHP \ vX.X \ php.exe
4. Copy the path before the script location in the notepad. You should have something that looks like the catch below.
Ligne de commande à passer
5. Open a command prompt in Administrator and copy the line of the notepad and press Enter to start the command.
"C:\Program Files (x86)\PHP\v7.2\php.exe" "D: \www\glpi\scripts\innodb_migration.php"
Invite de commande GLPI migration INNODB
6. Wait while migrating tables.
Migration ...
7. When finished, close the window.
Migration innodb terminée
8. Return to GLPI and refresh the page, the message should be gone.
Edit : this works only for glpi version< 9.4
since 9.4 use console command
Windows
1.Abrir Panel de Control de XAMPP
2.Click Shell
3.Ir a la Ruta de la Carpeta Script, Ejemplo: "Cd C:\xampp\htdocs\scripts" <sin las comillas
4.Teclear: "php innodb_migration.php" <sin las comillas
5. Esperar y FinSaludos
These steps solved my problem using Xampp.
Thank you
@cleomar :read this
https://glpi-install.readthedocs.io/en/ … -line.htmlsame problem=> same solution
Solved my problem. Tks.
]]>same problem=> same solution
]]>305 tables not migrated to InnoDB engine.
But don't have in the folder of this file "innodb_migration.php"
"/glpi/scripts/innodb_migration.php was not found on this server"
What should i do to fix this ?
Thanks,
]]>Have you free space on your database system?
Hi Thanks for help, the problem was space on disk.
The table glpi_logs has 9gigs, but after migration stay with 21gigs. Do you know if it is normal?
how can I do the shrink in this database?
Thanks in advance
Willian Rocha
]]>Hello,
See a tip at the link below. It's in Portuguese.
Hi Everyone,
Someone could help in this case? I run this command to migrate all tables, but locked in the table glpi_logs and report an error that I am describing below:
Note: the table size is 9gigs
[root@serverscripts]# php innodb_migration.php
Tables found: 250
Migrating glpi_logs...DBmysql::query() in /var/www/html/glpi/inc/dbmysql.class.php line 177
*** MySQL query error:
SQL: ALTER TABLE glpi_logs ENGINE = InnoDB
Error: The table '#sql-7e95_26c' is full
Backtrace :
inc/dbmysql.class.php:206
scripts/innodb_migration.php:56 DBmysql->queryOrDie()
PHP Fatal error: Uncaught RuntimeException: - Error during the database query: ALTER TABLE glpi_logs ENGINE = InnoDB - Error is The table '#sql-7e95_26c' is full in /var/www/html/glpi/inc/dbmysql.class.php:216
Stack trace:
#0 /var/www/html/glpi/scripts/innodb_migration.php(56): DBmysql->queryOrDie('ALTER TABLE glp...')
#1 {main}
thrown in /var/www/html/glpi/inc/dbmysql.class.php on line 216
$args = [];
---------------------
One more - part of code in the file:
-----------------------------------------------------------
// Ensure current directory when run from crontab
chdir(__DIR__);
$args = [];
if (isset($_SERVER['argv'])) {
for ($i=1; $i<count($_SERVER['argv']); $i++) {
$it = explode("=", $argv[$i], 2);
$it[0] = preg_replace('/^--/', '', $it[0]);
$args[$it[0]] = (isset($it[1]) ? $it[1] : true);
}
}
------------------------------------------------------------
What is the reason of problem?
]]>I have updated my glpi to 9.3 and i have this message :
tables not migrated to InnoDB engine.
I try to start script like: http://forum.glpi-project.org/viewtopic.php?id=163853
But, I have a problem with exec innodb_migration.php script.
I try run command by ssh:
/public_html/scripts$ php innodb_migration.php
There is an error:
PHP Parse error: syntax error, unexpected '[' in /home/d/foldername/public_html/scripts/innodb_migration.php on line 36
artre:~/public_html/scripts$
How can I resolve the problem?