Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts

Monday, July 13, 2009

Slow Performance when query MySQL Database

My environment: RH FC8 X86_64

MySQL server version: mysql-server-5.0.45-6.fc8

Just hit a problem that takes me several hours to get it solve.  The symptom is extremely slow performance when connecting the database remotely either via JDBC connection from my JSP page or using MySQL front GUI.

After hours and hours of troubleshooting, I’ve found out the MySQL server need some sort of DNS lookup when an external client attempts to connect to it, and in my demo environment unfortunately the name server is down.

The trick is to comment the name server entry in /etc/resolv.conf.  After I did that, it resumes to normal!

Friday, April 3, 2009

Quick and Dirty way to allow remote access to your MySQL server

I usually do this in my lab environment.  I'm sure you will use it with care when you do it in production environment, and to make it more securely and restrictive.

GRANT ALL ON *.* TO 'someuser'@'somehost';

'somehost' could be '%', it will allow all hosts to access.  Again use it with great care!

Then you can use some GUI tools (e.g. MySQL-Front, my favorite GUI for MySQL) to remote access and administer your MySQL database.

http://dev.mysql.com/doc/refman/5.1/en/grant.html

External Database integration with Cisco Unified Contact Center Express 5.0

My environment:

Unified Communications Manager 6.1

Unified Contact Center 5.0

MySQL Server 5.0.45 on RH FC8

You can use query or update the external database (e.g. MySQL in my example) in your call flow, by creating an aef script with Cisco CRS Editor. 

1. Download MySQL ODBC connector from MySQL’s website:

http://dev.mysql.com/downloads/connector/odbc/5.1.html

2. Install it on the CRS server.  Add a new system DSN in Administrative tools > Data Sources (ODBC).

mysql-connector

3. Under CRS Web admin page, go to Subsystems > Database, add a new datasource.

image

image

4. In CRS Editor, create a script or modify your existing script using the Database Steps.  Below are several example screen shots on how to use the Database Steps.

DB Read Step

image

Press “Refresh Database Schema” if you don’t see the data source name you’ve just created in step 3.

image

DB Get Step

You should define DB Read Step before the DB Get Step.  DB Read step is used to define the SQL statement, and DB Get step is used to store the resultset to local variable.

image

image

DB Write Step

DB Write Step is used for INSERT and UPDATE statement.

image

image

The last one DB release step is used to release the database connection.