MySQL Forums
Forum List  »  Connector/Python

Re: help : Problem in connection(python with mysql)
Posted by: pratik shah
Date: April 19, 2009 06:11AM

you have to change the connection string this will solve your problem here is the connection string that will work with python(any versions)

connecttodb($servername,$dbname,$dbusername,$dbpassword);
function connecttodb($servername,$dbname,$dbuser,$dbpassword)
{
global $link;
$link=mysql_connect ("$servername","$dbuser","$dbpassword");
if(!$link){die("Could not connect to MySQL");}
mysql_select_db("$dbname",$link) or die ("could not open db".mysql_error());
}

Future Desings And Gadgets only at: http://techonova.com
Latest Technology News and Updates by http://technologytoday.in
Latest World News : http://technologytoday.in/category/world-news/

Options: ReplyQuote


Subject
Written By
Posted
Re: help : Problem in connection(python with mysql)
April 19, 2009 06:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.