Category: Database

How to find duplicate entries in a table

By emre gokhan saricicek, February 12, 2010 3:17 PM

Recently I needed to find duplicate entries for some employees on my table. Here is a handy query
SELECT `pid`, COUNT(`pid`) AS Nummber_of_Occurrences FROM employees GROUP BY `pid` HAVING ( COUNT(`pid`) > 1 )

remote access to MySQL server

By emre gokhan saricicek, July 30, 2009 2:09 PM

Yesterday, I was trying to allow access to the mysql server from outside. This post is about how you can use the mysqladmin tool or mysqldump with a remote MySQL server.

On my servers MySQL is installed and lets say one we want to reach has ip 72.32.122.15 (old sa-za ips :D )

Simply create a user with necessary permissions at server you want to reach. You can use phpmyadmin for this and there enter server ip to host. You can simply modify one of the users too by changing host field for that user.

After this settings you should be able to run;

mysqladmin -h 72.32.122.15 status –user=”user-you-created” –password=”password”

I was also able to do a mysqldump such as

mysqldump -h 72.32.122.15 –user=”user-you-created” –password=”password” “database-name” > “dump-name”

Zenteric is powered by Sa-Za