3👍
✅
I finally got MySQLdb compiled without installing MySQL server in my MacOSX.
The steps:
- Download appropriate MySQL package (tar) not install version and unpack
- Download MySQLdb wrapper from MySQL Python bindings
- Unpack MySQLdb
- Edit site.cfg to point to mysql_config into the directory you have downloaded
- Follow the instructions in MySQLdb (essentially build & install)
- Copy the file libmysqlclient_r.15.dylib from your ‘mysql/lib’ folder to /usr/local/mysql/lib (assuming you have choosen threadsafe version)
- Now you are ready to use MySQLdb with any MySQL server
- You can test the installation using: python >>> import MySQLdb
2👍
You need to install mysql’s client libraries on the machine running Django so it can connect to a remote MySQL server. Both plain libmysqlclient and python’s mysql driver. Further details depend on the platform you are running this on.
- [Django]-@monthly cron job is not reliable
- [Django]-Can a Django project be hosted in Firebase? If yes, give me an idea
1👍
Install a pre-compiled version of the MySQLdb driver. Most Linux distributions provide it in their repositories — for example, in Debian and Ubuntu it’s named python-mysqldb
.
Also, as this does not involve programming, it would be best moved to Superuser.
- [Django]-Login and Redirect
- [Django]-How to make permission for groups and administrators
- [Django]-How can I sign a file with PKCS11 in Python?
Source:stackexchange.com