Search Results for mysql
mysql.sock path in Mac OS X
In my last post I discuss how to enable PHP over Apache in Mac OS X lion and today I bumped into a new problem. The problem is that when you install MySQL on Mac OS X and try to connect it via PHP, you will get an error. This error is thrown due to the fact that the path of the MySQL sockets are dif
How to reset lost MySQL password
There are times when you get stuck with a lost password of MySQL database. And yes it becomes difficult to recall one with the computerized brains of ours :) In this post, I am going to show you how you can rest a lost MySQL password. Using this procedure you can reset the lost password of root o
MySQL: Increment an existing record in the table
This is a small tip which can help you optimize your MySQL query. Since you do not have to first “read” the record, instead you can increment it right there. I have seen some newbies doing the read and then increment process, which uselessly increases a select query to the database, each time yo
MySQL Optimization from a developer’s point of view
Undoubtedly a Web Application’s backbone is a database. Apparently, the Web Application’s performance is dependent on the database’s overall performance. However, some developers blame Database Administrators for non-performing of the web application to the end user. In fact, the role of de
Free Entry Passes for Spark IT 2011 – Building Next Gen Apps
Spark IT 2011 is just around the corner. This year the agenda of the event would be “Building Next Gen Apps”. Last I was there at Spark IT 2010, where I spoke about Social Media, HTML5, Web Workers, etc. I have been invited again as a Speaker and this time I am going to talk about the followi
Difference between InnoDB and MyISAM in MySQL
MyISAM and InnoDB are two most commonly used storage engines of MySQL database. However, MyISAM is the default storage engine chosen by MySQL database, when creating a new table. The major differences between these two storage engines are : InnoDB supports transactions which is not supported by
Enable query cache in MySQL to improve performance
There are lot many solutions to cache your database queries. Some use client level cache, some server side cache. However, MySQL itself provides a cache mechanism which is called “Query Cache” in which the queries being fired at the database are cached. Clearly saying, the result sets are cached
Install MySQL Server 5 on Ubuntu and adding support to PHP
When you start web development MySQL is must have database. Since its free and is being used widely. Installing MySQL on Ubuntu is pretty easy and quick process. To install MySQL just run the following command. Open a terminal window and type the following command. sudo apt-get install mysql-se
Getting started with PHP framework codeigniter
I have always worked with core PHP and was always reluctant to use any CMS (Joomla, Drupal etc). Coincidentally I never got a chance to work on any of the frameworks in PHP. But in the current project at work, we have decided to use CodeIgniter. CodeIgniter is a light weight open source web applic
Memory(heap) Storage engine in MySQL
Lately, I have been doing a lot of database stuff and during my odyssey I found lots of exciting stuff in MySQL. Memory storage in engine is one of those exciting stuff, which can be really useful at times, if used on right time at right place. Memory (heap) for the name itself signifies what I a
Check username availability and validation using ajax,php
So you are creating a signup form and you want to create a fancy looking username validation Ajax script. I know that looks fancy when you signup for Gmail or Yahoo mailbox, instead these kind of validation are now on every signup form. We are going to create this simple script using Javascript, A
Transfer database from one host to other using mysqldump and shell
Transferring your blog or web site from one host to another can sometimes be very cumbersome if not troublesome. There may be instances when you get stuck at few points and one of the major loop hole is to transfer data from one host to another. Most of us use browser based user friendly phpmyadmin
Difference between truncate and delete in mysql
Well this is very common but much confused discussion. This question is often asked from freshers in interviews as well. The difference is pretty simple but yet people confuse it because they see the result to be the same of both the queries. Truncate and Delete are both SQL commands which result
Install wordpress in local environment
Well this post is not for the regular RSS readers, but sure is for those nomads who look around how to setup wordpress on their systems and land on to Digimantra using Google Search. I know wordpress is one Open Source blogging application which is pretty easy to install but for some who are not so
Insert and update in single mysql query using on duplicate key
Hey Guys, Let me first explain you the scenario in which more likely you can use this type of query. A generic scenario would be that you are inserting data into a table and along with this you want to update a counter which is nothing but a field in the same table. More precisely or by taking