Re: Having trouble creating new database with MySQLdb
Argh! Worked it out!
import MySQLdb as mysql
db = mysql.connect(user="root", host="localhost", passwd="****")
c = db.cursor()
dbName = 'testDB'
cmd = "create database " + dbName + ";"
c.execute(cmd)
Just required me to think a little differently.
Regards
Patrick
Subject
Written By
Posted
November 11, 2006 05:23AM
Re: Having trouble creating new database with MySQLdb
November 11, 2006 06:14AM
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.