0

I have downloaded ITDB - IT ITems DataBase application from http://www.sivann.gr/software/itdb.

SQLite database is using in this application. Now I want to migrate this to MySQL database. I have migrated the .db file to .sql file also import the database to MySQL database. Now how to connect it in this existing project any idea?

3
  • Can you share some more information, such as: what have you tried so far, has the documentation not helped? Commented May 25, 2015 at 11:18
  • Thanks Alex. I have fixed the issue by using the following line instead of including .db file in init.php file $dbh = new PDO('mysql:host=localhost;port=3306;dbname=itdb', 'root', 'root', array( PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); Commented May 25, 2015 at 11:26
  • @Srim Please post your question as an answer and accept it so others can find the solution later. Commented May 26, 2015 at 12:00

1 Answer 1

1

I have fixed the issue by using the following line instead of including .db file in init.php file $dbh = new PDO('mysql:host=localhost;port=3306;dbname=itdb', 'root', 'root', array( PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.