Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 334559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:03:55+00:00 2026-05-12T10:03:55+00:00

I am trying configure a Django application to use mysql. I want to use

  • 0

I am trying configure a Django application to use mysql.

I want to use the mysql server available in my network and don’t want to install a local copy.

But when I am trying to install mysqldb it needs mysql_config from Mysql!

What should I do if I want to use the mysql server in another machine?

sh: mysql_config: command not found
Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    metadata, options = get_config()
  File "~/Dev/MySQL-python-1.2.3c1/setup_posix.py", line 43, in get_config
    libs = mysql_config("libs_r")
  File "~/Dev/MySQL-python-1.2.3c1/setup_posix.py", line 24, in mysql_config
    raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found

Tried downloading the MySQL files and pointed to “mysql_config” and built mysqldb.

But when I tried to import mysqldb I get:

>>> import MySQLdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.5-i386/egg/MySQLdb/__init__.py", line 19, in <module>
  File "build/bdist.macosx-10.5-i386/egg/_mysql.py", line 7, in <module>
  File "build/bdist.macosx-10.5-i386/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dlopen(/tmp/MySQL_python-1.2.3c1-py2.5-macosx-10.5-i386.egg-tmp/_mysql.so, 2): Library not loaded: /usr/local/mysql/lib/libmysqlclient_r.15.dylib
  Referenced from: /tmp/MySQL_python-1.2.3c1-py2.5-macosx-10.5-i386.egg-tmp/_mysql.so
  Reason: image not found

Any hint on what the error is?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:03:55+00:00Added an answer on May 12, 2026 at 10:03 am

    I finally got MySQLdb compiled without installing MySQL server in my MacOSX.

    The steps:

    1. Download appropriate MySQL package (tar) not install version and unpack
    2. Download MySQLdb wrapper from MySQL Python bindings
    3. Unpack MySQLdb
    4. Edit site.cfg to point to mysql_config into the directory you have downloaded
    5. Follow the instructions in MySQLdb (essentially build & install)
    6. Copy the file libmysqlclient_r.15.dylib from your ‘mysql/lib’ folder to /usr/local/mysql/lib (assuming you have choosen threadsafe version)
    7. Now you are ready to use MySQLdb with any MySQL server
    8. You can test the installation using: python >>> import MySQLdb
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whole this day I was trying to configure django on production server. I use
I'm trying to configure a PHP installation (5.4.3) with MYSQL (5.0.91) for use with
I've been trying to configure two separate Django apps on one server such that
I am trying to configure the Django admin site for my django application by
I'm trying to use the message middleware in Django, but the view does not
In trying to configure my mysqld appropriately for my all-InnoDB application environment (mysql DB
I'm trying to configure net.pipe bindings on the server between 2 processes (on the
I'm trying to configure logging for a Django app using the Python logging module.
i'm trying to setup django on nginx + gunicorn on a centos6 server (firewall
i'm trying to setup mod_wsgi to serve my django media files (i want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.