Node.js

NodeJs with MySql using Sequelize

This time I am going to explain a very basic CRUD operation on MySql database via NodeJs using Sequelize. Here Sequelize become’s a bridge between NodeJs and MySql database, it is a Object Relational Mapping Library written on javascript. Let us quickly learn the things with the help of Examples and we will use Item Table […]

Kashish Gupta
Kashish Gupta
Read

AWSGrails

Change MySQL Timezone on Amazon RDS

Amazon RDS doesn’t allow you to change timezone, It keeps same UTC time zone across all regions. time_zone variable in the parameter group is read only. You can change the time zone on each connection or session by making a procedure in default mysql database and call this function on each init connection. 1.    Create a procedure for […]

Grails

Show status of MySQL imports using PipeViewer

While working on my current application, I had to import a large database using mysql from a sql dump. The size of the sql dump was around 1.5 GB and hence the import was taking long time. I just felt the need of some tool that could help me check the progress of the import. […]

Grails

Accessing remote data through cross-domain ajax call in jquery

While developing a mobile app using phonegap ( or otherwise also 🙂 ), we can access remotely hosted mysql database using jquery ajax calls. But this interaction between jquery and mysql database cannot happen directly. We will need to specify a server side script (in PHP terminology) or a controller action (in Grails Terminology) that […]

raj
raj
Read

Technology

Logging to remote MySQL Server using SSH tunneling

Very often, we all need to access a remote database for debugging or any other related stuff. The simplest thing that comes to mind is to take the dump of remote database and bring it to the local and run the application using that data. We can avoid that, if we can connect our local […]

Sachin
Sachin
Read

Technology

Toggling foreign key checks in MySQL

Recently in my project, we needed to import database dumps of a legacy database in MySQL, which was involved in a nested relationship where one tuple could be the parent record of another tuple. We created the appropriate domain structure and checked that the foreign key references were created accordingly. All well and good. So […]

Roni C Thomas
Roni C Thomas
Read

Technology

Removing/replacing special character from database.

Recently in one of my project i faced a problem that database was having special character, which is shown as space on the User Interface. So as to solve this issue i found a very simple solution which consists of following steps: 1. First, you just need to identify which type special character to be […]

Technology

Clear Time function for MySQL

Hi all, Here is a simple function that can allow you to clear time from the DATETIME field of your database table [sql] DROP FUNCTION IF EXISTS cleartime; delimiter // CREATE FUNCTION cleartime(dt datetime) RETURNS DATETIME NO SQL DETERMINISTIC BEGIN DECLARE t varchar(15); — the time part of the dt DECLARE rdt datetime default dt; […]

Technology

mysqldump of particular records without create – drop of tables

Hi,   Recently i was in a situation where i need to take the dump of particular records in mysql. We are pretty much familiar with the normal mysqldump statement given below : [sql] mysqldump –user=usr –password=pwd database_name table_name > dumpFile.sql; [/sql] The above statement will provide us the dump of the respective database and […]