ITDB default to use SQLite as a database, this modified version of the official website 1.14 version
1, modify the steps:
Converting a database to a MySQL database
Modify ITDB program code to use MySQL database
2. Convert sqlite database to MySQL database
Download and install: Dbconvert for SQLite & MySQL
You can direct Baidu dbconvert for SQLite & MySQL to find the download point, or rushed to the following website directly to download:
https://dbconvert.com/convert-sqlite-to-mysql-pro.php
After this software download installs, the direct trial can, the trial can only convert up to 50 tables, but ITDB this version only has 35 tables, therefore enough, once is done.
3, modify the ITDB program code:
3.1 Modify the init.php file:
Modify the 119 rows to:
$DBH = new PDO ("mysql:host= database server address; dbname= database name", "Database User", "Database user password", Array (pdo::attr_persistent=>true,pdo:: Mysql_attr_init_command = ' SET NAMES utf8 ');
Notes 131 to 133 lines
$ret = $dbh->exec ("PRAGMA case_sensitive_like = 0;");
$ret = $dbh->exec ("PRAGMA encoding = \" utf-8\ ";");
$ret = $dbh->exec ("PRAGMA Foreign_keys = on");
3.2 Modify the function.php file:
Modify the 148 rows to:
$DBH = new PDO ("mysql:host= database server address; dbname= database name", "Database User", "Database user password", Array (pdo::attr_persistent=>true,pdo:: Mysql_attr_init_command = ' SET NAMES utf8 ');
4. All modifications completed
Tested for normal use.
Modify IT Asset inventory management (ITDB) using MySQL database