codekasten/xml2typo3/mysql_connect.py
2008-01-03 19:59:36 +00:00

22 lines
368 B
Python
Executable file

#/usr/bin/env python
import sys
import MySQLdb
if __name__ == '__main__':
try:
conn = MySQLdb.connect(db="meinedatenbank",
host="localhost",
user="ich",
passwd="geheim")
print "Verbunden"
except:
print "Verbindungsfehler"
sys.exit(1)
conn.close()
print "Verbindung getrennt"
sys.exit(0)