Released:
Native Package Installer, which uses the native macOS installer (DMG) to walk you through the installation of MySQL. For more information, see Chapter 2, Installing MySQL on macOS Using Native Packages.
- MySQLdb is an interface to the popular MySQL database server for Python. The design goals are: Compliance with Python database API version 2.0; Thread-safety; Thread-friendliness (threads will not block each other) MySQL-3.23 through 5.5 and Python-2.4 through 2.7 are currently supported. Python-3.0 will be supported in a future release.
- For installation on macOS, including using both the binary package and native PKG formats, see Section 2.4, “Installing MySQL on macOS”. For information on making use of an macOS Launch Daemon to automatically start and stop MySQL, see Section 2.4.3, “Installing and Using the MySQL Launch Daemon”.
- To install it on Windows 10 subsystem for Linux use the below command: sudo apt-get install apache2 sudo service apache2 start. Step 4: Installing MySQL on Windows 10 WSL. To install MySQL on Ubuntu Windows 10 WSL, here is the command: sudo apt-get install mysql-server mysql-client sudo service mysql start. Create a root user to use with.
Python interface to MySQL
Project description
MySQLdb is an interface to the popular MySQL database server forPython. The design goals are:
- Compliance with Python database API version 2.0 [PEP-0249]
- Thread-safety
- Thread-friendliness (threads will not block each other)
MySQL-3.23 through 5.5 and Python-2.4 through 2.7 are currentlysupported. Python-3.0 will be supported in a future release.PyPy is supported.
MySQLdb is Free Software.
[PEP-0249] | http://www.python.org/peps/pep-0249.html |
Release historyRelease notifications | RSS feed
1.2.5
1.2.4
1.2.4c1 pre-release
1.2.4b5 pre-release
1.2.4b4 pre-release
1.2.4b3 pre-release
1.2.4b2 pre-release
1.2.4b1 pre-release
1.2.3
1.2.3c1 pre-release
1.2.3b2 pre-release
1.2.3b1 pre-release
1.2.2
1.2.2c1 pre-release
1.2.2b3 pre-release
1.2.2b2 pre-release
1.2.2b1 pre-release
1.2.1
1.2.1c6 pre-release
1.2.1c5 pre-release
1.2.1c4 pre-release
1.2.1_p2
1.2.0
1.1.10
1.1.9
1.1.8
1.0.1
1.0.0
0.9.2
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size MySQL-python-1.2.5.win32-py2.7.exe (1.1 MB) | File type Windows Installer | Python version 2.7 | Upload date | Hashes |
Filename, size MySQL-python-1.2.5.zip (108.9 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for MySQL-python-1.2.5.win32-py2.7.exe
Algorithm | Hash digest |
---|---|
SHA256 | ab22d1322099098730a57fd59d610f60738f95a1cb68dacca2d1c47cb0cbe8ee |
MD5 | 6f43f42516ea26e79cfb100af69a925e |
BLAKE2-256 | 2706596ae3afeefc0cda5840036c42920222cb8136c101ec0f453f2e36df12a0 |
Hashes for MySQL-python-1.2.5.zip
Algorithm | Hash digest |
---|---|
SHA256 | 811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e140c74 |
MD5 | 654f75b302db6ed8dc5a898c625e030c |
BLAKE2-256 | a5e951b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad |
Table of Contents
This section contains notes and hints specific to installing PHP on macOS. PHP is bundled with Macs, and compiling is similar to the Unix installation guide.
chris at spookee dot de ¶There is a 'One Line Installation' tool to use PHP 5.6/5.5/5.4/5.3 for
OS X 10.6/10.7/10.8/10.9/10.10 with the build-in Apache with lots of extensions included:
http://php-osx.liip.ch
I hope posting this link is allowed, because it helped me a lot to get the latest PHP-Version running...
Included extensions:
bcmath bz2 calendar Core ctype curl date dom dtrace ereg exif fileinfo filter ftp gd gettext hash iconv imap intl json ldap libxml mbstring mcrypt memcache memcached mhash mongo mssql mysql mysqli mysqlnd OAuth odbc openssl pcntl pcre PDO pdo_dblib pdo_mysql pdo_pgsql pdo_sqlite pgsql Phar posix Reflection session shmop SimpleXML soap sockets solr SPL SQLite sqlite3 standard sysvmsg sysvsem sysvshm tidy tokenizer wddx xdebug xhprof xml xmlreader xmlrpc xmlwriter xsl zip zlib Xdebug
available but disabled by default: apc, xslcache, twig, uploadprogress
Install Mysql On Macos Sierra
¶I found good gist how to install PHP 5.4 and 5.3 side by side on Max OSX via MacPorts. I suppose, it is applicable for PHP 5.5 too.
https://gist.github.com/raphaelstolt/2721719
For those using Homebrew, Justin Hileman maintains a blog post entitled '(Re)installing PHP on Mac OS X', which documents how to build PHP and extensions: http://justinhileman.info/article/reinstalling-php-on-mac-os-x/
Install Mysql Macos Terminal
Just a note. The darwinports software is now macports and you can get it at: http://www.macports.org/
If you use macports, be sure to change any refernces you may have in your calling scripts to macports as the file macports now gets installed.
My httpd.conf had some of the lines, but not all of them -- mine was missing the LoadModule and AddModule lines for php. I'm not sure why -- I don't delete any of those; I just comment them out if I'm not using them. Plus, the note above put a space in 'LoadModule'; it has no space. I didn't know about the 'apachectl graceful' trick, though -- since 'httpd -k restart' stopped working (probably around 10.2), I had just been doing it manually -- find the process, kill it, and hit httpd again -- thanks for the tip!
So for those who are missing any of the lines, here are the full lines.
In the section with all the other LoadModules:
LoadModule php4_module libexec/httpd/libphp4.so</div>
Directly below that section should be the AddModules; you need:
AddModule mod_php4.c
And then the AddType lines should be right after the language priorities (so after the AddCharset lines and after the LanguagePriority bit):
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Then restart apache/httpd as described above, and hopefully you should be good.
BTW, the actual module should be at:
/usr/libexec/httpd/libphp4.so
So if things fail, you can check to see if that's there.
Thanks to others who posted here; it definitely helped and got me on the right track. I just had to find the module manually to write my own LoadModule line.
To build on MacOS X 10.3.5 set the environment variable CFLAGS in the following way (depending on your shell)
setenv CFLAGS '-DBIND_8_COMPAT=1 -DEAPI -O3'
export CFLAGS='-DBIND_8_COMPAT=1 -DEAPI -O3'
Then launch configure with the options:
./configure --prefix=/usr --mandir=/usr/share/man ....
The -DBIND_8_COMPAT=1 gets you over a problem in the DNS files because MacOS X has definitions for Bind9 and PHP expects Bind8 definitions. -DEAPI is needed if you build it for Apache 1.3.31. -O3 enables the gcc optimizer.
You can also add one of the following lines to your CFLAGS depending on the CPU you use to further improve speed:
-mcpu=G3 -mtune=G3
-mcpu=G4 -mtune=G4
-mcpu=G5 -mtune=G5
- Installation and Configuration