Wednesday, 30 April 2014

UCCX7 db write in MYSQL

By default, the user that is used to connect remotely to MYSQL server is only allowed to use “select” query.
To update or insert values to the database, we have to change the privileges of the user.
Click the user that is currently used for connection. Add update and insert rights for modification of the specific DB
Back to script editor, drag db_write set to the editing panel.  In the test tab, try the below sql command to insert an entry of data
INSERT INTO `books`.`books` (`BOOK_ID`, `BOOK_NAME`, `AUTHOR_NAME`, `BOOK_ISBN`, `PUBLISH_YEAR`) VALUES ('12349', 'HELLO PYTHON', 'GEORGIAN', '6458958', '2008');
It will return Boolean value = 1 to tell you that this command is okay to running

In the SQL tab, put the insert command
Test this script
After testing, go back to MYSQL server to check if a new entry is added







No comments:

Post a Comment