diff options
Diffstat (limited to 'rulemgt-standalone/src/main')
3 files changed, 20 insertions, 14 deletions
diff --git a/rulemgt-standalone/src/main/assembly/bin/initDB.sh b/rulemgt-standalone/src/main/assembly/bin/initDB.sh index f49123d..905ad1b 100644 --- a/rulemgt-standalone/src/main/assembly/bin/initDB.sh +++ b/rulemgt-standalone/src/main/assembly/bin/initDB.sh @@ -23,8 +23,14 @@ port=$3 host=$4 echo "start init holmes rulemgt db" main_path=$HOME/../ +cat $main_path/dbscripts/mysql/openo-holmes_rulemgt-createobj.sql +echo "user="$user +echo "password"$password +echo "port="$port +echo "host="$host mysql -u$user -p$password -P$port -h$host <$main_path/dbscripts/mysql/openo-holmes_rulemgt-createobj.sql sql_result=$? +cat "sql_result="$sql_result if [ $sql_result != 0 ] ; then echo "failed to init rulemgt database!" exit 1 diff --git a/rulemgt-standalone/src/main/assembly/conf/rulemgt.yml b/rulemgt-standalone/src/main/assembly/conf/rulemgt.yml index 7b8b883..9551eb5 100644 --- a/rulemgt-standalone/src/main/assembly/conf/rulemgt.yml +++ b/rulemgt-standalone/src/main/assembly/conf/rulemgt.yml @@ -14,7 +14,7 @@ server: adminContextPath: /admin connector: type: http - port: 12004 + port: 9101 # Logging settings. logging: diff --git a/rulemgt-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_rulemgt-createobj.sql b/rulemgt-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_rulemgt-createobj.sql index 4d6b296..609ec51 100644 --- a/rulemgt-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_rulemgt-createobj.sql +++ b/rulemgt-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_rulemgt-createobj.sql @@ -13,26 +13,26 @@ -- See the License for the specific language governing permissions and
-- limitations under the License.
--
-/******************DROP OLD DATABASE AND USER***************************/
-USE MYSQL;
-DROP DATABASE IF EXISTS HOLMES;
-DELETE FROM USER WHERE USER='HOLMES';
+/******************drop old database and user***************************/
+use mysql;
+drop database IF EXISTS holmes;
+delete from user where User='holmes';
FLUSH PRIVILEGES;
/******************CREATE NEW DATABASE AND USER***************************/
-CREATE DATABASE HOLMES CHARACTER SET UTF8;
+create database holmes CHARACTER SET utf8;
-GRANT ALL PRIVILEGES ON HOLMES.* TO 'HOLMES'@'%' IDENTIFIED BY 'HOLMES' WITH GRANT OPTION;
-GRANT ALL PRIVILEGES ON MYSQL.* TO 'HOLMES'@'%' IDENTIFIED BY 'HOLMES' WITH GRANT OPTION;
+GRANT ALL PRIVILEGES ON holmes.* TO 'holmes'@'%' IDENTIFIED BY 'holmes' WITH GRANT OPTION;
+GRANT ALL PRIVILEGES ON mysql.* TO 'holmes'@'%' IDENTIFIED BY 'holmes' WITH GRANT OPTION;
-GRANT ALL PRIVILEGES ON CATALOG.* TO 'HOLMES'@'LOCALHOST' IDENTIFIED BY 'HOLMES' WITH GRANT OPTION;
-GRANT ALL PRIVILEGES ON MYSQL.* TO 'HOLMES'@'LOCALHOST' IDENTIFIED BY 'HOLMES' WITH GRANT OPTION;
+GRANT ALL PRIVILEGES ON holmes.* TO 'holmes'@'localhost' IDENTIFIED BY 'holmes' WITH GRANT OPTION;
+GRANT ALL PRIVILEGES ON mysql.* TO 'holmes'@'localhost' IDENTIFIED BY 'holmes' WITH GRANT OPTION;
FLUSH PRIVILEGES;
-USE HOLMES;
-SET NAMES 'UTF8';
+use holmes;
+set Names 'utf8';
/******************DELETE OLD TABLE AND CREATE NEW***************************/
-USE HOLMES;
+use holmes;
DROP TABLE IF EXISTS APLUS_RULE;
CREATE TABLE APLUS_RULE (
RID VARCHAR(30) NOT NULL,
@@ -56,5 +56,5 @@ CREATE TABLE APLUS_RULE ( KEY IDX_APLUS_RULE_TEMPLATEID (TEMPLATEID),
KEY IDX_APLUS_RULE_ENGINEID (ENGINEID),
KEY IDX_APLUS_RULE_ENGINETYPE (ENGINETYPE)
-)
+);
|