You can recover MySQL database server password with following five easy steps.
Step # 1: Stop the MySQL server process.
Step # 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password.
Step # 3: Connect to mysql server as the root user.
Step # 4: Setup new root password.
Step [...]
Read Full Post »
Posted in arbit, jlt, mysql, tagged mysql query on December 14, 2007 | 1 Comment »
have you ever thought how a very simple mysql insert query can be so frustrating!! grrr! was coding for the cms and had to write this idiotic query!!
$formdesc_query=”INSERT INTO `form_desc` (`page_modulecomponentid` ,`form_heading` ,`form_loginrequired` ,`form_headertext` ,`form_footertext` ,`form_expirydatetime` ,`form_sendconfirmation` ,`form_usecaptcha` ,`form_allowuseredit` ,`form_allowuserunregister` ,`form_showuseremail` ,`form_showuserfullname` ,`form_showregistrationdate` ,`form_showlastupdatedate`) VALUES ($compId, ‘”.mysql_escape_string($formdesc_content['form_heading']).”‘, ‘”.mysql_escape_string($formdesc_content['form_loginrequired']).”‘, ‘”.mysql_escape_string($formdesc_content['form_headertext']).”‘, ‘”.mysql_escape_string($formdesc_content['form_footertext']).”‘ , ‘”.mysql_escape_string($formdesc_content['form_expirydatetime']).”‘ , ‘”.mysql_escape_string($formdesc_content['form_sendconfirmation']).”‘, [...]
Read Full Post »
Posted in mysql, technical stuff, tagged copy, mysql on December 10, 2007 | No Comments »
hmmm.. dint get much info about copying a row in mysql, so thought will put the code here.. its useful sometime..
the code is
INSERT INTO destinationTable (column_list) (SELECT column_list FROM sourceTable WHERE condition=check)
replace the condition with your condition.
To copy within the same table, the destination and the source table will be the same. And if you [...]
Read Full Post »