김예미

modify mysql account part

No preview for this file type
......@@ -28,7 +28,7 @@ connect_btn.addEventListener("click", () => {
win.show();
});
/*
var connection = mysql.createConnection({
host:'localhost',
user:'root',
......@@ -36,6 +36,12 @@ var connection = mysql.createConnection({
});
connection.connect();
*/
var mysql = {
user : 'root',
password : '1234'
};
function apkInstall(){
cmd_install = exec('adb -s '+device+' install -r app-release.apk',function(error, stdout, stderr){
......@@ -77,13 +83,13 @@ function extractDB () {
cc.innerHTML="make InnerDB SQL";
cmd_sqlNdb = exec('sqlite3 networkDatabase.db .dump | python SQLiteToMysql_network.py > networkDatabase.sql', function(error, stdout, stderr){
cc.innerHTML="make NetworkDB SQL";
cmd_makeIdb = exec('mysql -uroot -p1234 -e "DROP DATABASE IF EXISTS DATAEXTRACTION;CREATE DATABASE DATAEXTRACTION CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;USE DATAEXTRACTION;"',function(error, stdout, stderr){
cmd_makeIdb = exec('mysql -u'+mysql.user+' -p'+mysql.password+' -e "DROP DATABASE IF EXISTS DATAEXTRACTION;CREATE DATABASE DATAEXTRACTION CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;USE DATAEXTRACTION;"',function(error, stdout, stderr){
cc.innerHTML="create InnerDB";
cmd_insertIdb = exec('mysql -uroot -p1234 DATAEXTRACTION < InnerDatabase.sql',function(error, stdout, stderr){
cmd_insertIdb = exec('mysql -u'+mysql.user+' -p'+mysql.password+' DATAEXTRACTION < InnerDatabase.sql',function(error, stdout, stderr){
cc.innerHTML="insert Data ; InnerDB";
cmd_makeNdb = exec('mysql -uroot -p1234 -e "DROP DATABASE IF EXISTS DATAEXTRACTION_network;CREATE DATABASE DATAEXTRACTION_network;USE DATAEXTRACTION_network;"',function(error, stdout, stderr){
cmd_makeNdb = exec('mysql -u'+mysql.user+' -p'+mysql.password+' -e "DROP DATABASE IF EXISTS DATAEXTRACTION_network;CREATE DATABASE DATAEXTRACTION_network;USE DATAEXTRACTION_network;"',function(error, stdout, stderr){
cc.innerHTML="create NetworkDB";
cmd_insertNdb = exec('mysql -uroot -p1234 DATAEXTRACTION_network < networkDatabase.sql',function(error, stdout, stderr){
cmd_insertNdb = exec('mysql -u'+mysql.user+' -p'+mysql.password+' DATAEXTRACTION_network < networkDatabase.sql',function(error, stdout, stderr){
cc.innerHTML="insert Data ; NetworkDB";
cc.innerHTML="Data Extraction Complete !";
cc.innerHTML="Click 'NEXT' Button";
......