bind MySql to multiple ipaddress

If you are looking to bind MySql Service with multiple ip address on given machine. Then you cannot do it selectively. When I say selectively, if there are 5 network cards (IP Addresses) to given machine and you want to allow connections to be made only from 3 network cards (IP Addresses). Then you cannot configure MySql service to bind selective IP addresses. What you can do is either you can bind it with single ip address or all the IP addresses available on the machine. [Read More]

Mysql 5.5 is not accessible remotely.

I recently installed MySql 5.5 and tried to access it from remote machine. But it was not accessible. I had added remote user for the remote machine from which I was trying to access the DB. But it was failing to connect, I even tried to connect it through telnet. Then I found that by default mysql is only bound to serve localhost requests only. If you need to access it remotely you need to make changes in my. [Read More]

MySql Datafiles are getting corrupted on Mac-OSX abrupt shutdown

I have consistently faced this issue of MySql data files getting corrupted when my machine is rebooted abruptly. This has resulted into repetitive work that I have to do to rebuild the data. I tried to google for the solution and see if somebody else has seen this issue. But it seems this the way it will work, as MySql data files are not closed properly which results into corrupt database in case your machine gets abruptly restarted. [Read More]
mysql  mac  OSX 

MySql JPA toplink Auto increment id generation.

To configure JPA entity to make use of auto increment feature of MySql for primary key generation you can make use of IDENTITY strategy ref below code. @Entity public class Customer { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private long id; . . . public long getId() { return id; } } But problem with this way of generating ids with MySql and JPA combination is when you persist new entity and try to retrieve id assigned to newly persisted entity using getId() method. [Read More]
jpa  mysql  ORM  Java