LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-01-2015, 02:10 PM   #1
jerseyqueen
LQ Newbie
 
Registered: Jan 2015
Posts: 1

Rep: Reputation: Disabled
Python-Mysqldb Error in Ubuntu


I work on an web project.I try to connect web.py to mysql, but I take an error like this:


Traceback (most recent call last):
File "project.py", line 17, in <module>
db = web.database(dbn='mysql', user='..', pw='..', db='..')
File "//web/db.py", line 1143, in database
return _databases[dbn](**params)
File "//web/db.py", line 975, in __init__
import MySQLdb as db
File "//MySQLdb/__init__.py", line 19, in <module>
import _mysql
ImportError: _mysql: init failed
 
Old 01-02-2015, 10:54 PM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,258
Blog Entries: 24

Rep: Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193
Quote:
Originally Posted by jerseyqueen View Post
ImportError: _mysql: init failed
Are you sure the MySQL database has been initialized and the server is running?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
python-mysqldb or pythonconnector - which is the best way to connect to the DB sayhello_to_the_world Programming 1 07-02-2014 05:35 PM
Etch 4.0 stable - python 2.5 and python-mysqldb? jantman Debian 1 06-06-2008 02:34 PM
Python MySQLdb syntax issues... elvenson Programming 4 12-18-2007 12:36 PM
problem installing mysqldb for python ssaigol Slackware 1 06-15-2005 02:45 PM
Help me (python and MySQLdb module) Dark Carnival Programming 2 04-22-2004 07:31 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration