Modify IT Asset inventory management (ITDB) using MySQL database

Source: Internet
Author: User
Tags sqlite database

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.