Install mysql support for python on linux ubuntu

to add the MySQL database support on Linux Ubuntu use the following command :

sudo apt-get install python-mysqldb

and to import this module into your scripts use this command :

me2resh@me2resh-desktop:~/Desktop/MySQL-python-1.2.2$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>>

and enjoy the power of MySQL in your python applications ;)

Comments

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">