convert index to mysql