I know it is possible to install a Python plugin in PostgreSQL to execute Python code natively.
Is it possible in MySQL server to execute native Python or C++ code?
Yes, there is an api for python and Mysql as well as C++ and Mysql.
You will need the Mysql Connector/Python 2.0 but make sure that it is compatible with your version of Python since they have one for Pv2 and Pv3.
More information here: http://dev.mysql.com/doc/connector-python/en/
There is also a Mysql Connector/C++ 1.1
More information here: http://dev.mysql.com/doc/connector-cpp/en/index.html
Related
I have a development server with Mysql. I need mysql specifically as I have used the C++ connector API extensively in my code and this API does not work with MariaDB. I need to install a very secure, easily configurable mail server on this server and have chosen to install iRedMail. The thing is, on Buster, mysql gets replaced by MariaDB when you run the iRedMail install script.
Is there a way to configure iRedMail to run with a mysql backend?
I have tried the following tutorial:
https://docs.iredmail.org/install.iredmail.with.remote.mysql.server.html
It did not work. That is the only one I have found.
I am creating a project using Django + Python 3.4. However, according to this question, the standard MySQL connector for Python does not support the language's third release (which I'm having a difficult time believing, but that's beside the point).
Ultimately, my question is whether or not it is justifiable to use a non-standard connector fork (such as that which is presented in the linked question above) over downgrading to Python 2.x. For example, are there any significant security issues with using the forked connector instead of waiting for an official release?
MySQL Connector/Python is not bundled with Django, but it is made by Oracle. So I'm not sure if it should be considered an unofficial fork.
I'm using it with an old mySQL database, python 3.4 and django 1.7. The only problem I've noticed is that sometimes the error messages are a bit wonky.
Installation is very easy:
pip install mysql-connector-python --allow-external mysql-connector-python
I have been using the mysql-connector-python connector for several months without issue. This is using Python 3.4.2 and Django-1.7.1.
It actually works much better than the git fork someone else did of the python 2 connector.
My opinion, don't downgrade to python 2 - This is a solid connector in my experience.
I have downloaded the MySQL community server and extracted the files from the .tar file. But how do I install it? I simply cannot find a easy way to to this, or any method for that matter. Or is it already installed after tar xvf MySQL.tar? And also, when installing the .pkg version, shouldn't it create the files anywhere? Finally, the community server is the one used with django right?
Thanks in advance!
I would suggest using the .dmg version. It's an easier way of installing mysql, it can be a pain http://dev.mysql.com/downloads/mysql/
If you are developing and testing, do you really need to use MySQL? You can use sqlite which is bundled with Python.
As Vezu suggested, the best way to get started with the server is to download the binary installer - the mysql-5.5.24-osx10.6-x86.dmg file.
If you plan to use it with Python, you will also need to install MySQLdb for OSX. For that, see this answer for a link to steps you need to follow.
I need to be able to read/write to a mysql database using Perl. On all previous servers I have been able to use ppm-shell do download and configure the DBI module for mysql (mysql-dbd I think). However on one particular server, I don't have internet access.
Is there an easy way to get this installed? I'm on Windows 2008 Server by the way. I'm not brilliant at Perl either so if anyone can give some easy to understand instructions I'd really appreciate it
Thanks
Download the module from here http://cpan.uwinnipeg.ca/PPMPackages/10xx/
install via the command line:
ppm install filename.ppd
Get the module. ( this can help: http://win32.perl.org/wiki/index.php?title=PPM_Repositories)
and do: ppm install FILE.ppd
The HBase shell is now based on jirb, the JRuby implementation of the interactive ruby shell irb. Are there any nice tricks for interacting with HBase in JRuby programmatically other than through this shell?
The example on the Hadoop wiki appears to just be straight calls to the Java API; is there anything else I can do?
You can interact directly with the HBase client Java classes.
There's a sample here:
http://wiki.apache.org/hadoop/Hbase/JRuby
There are Thrift and REST APIs for HBase:
http://wiki.apache.org/hadoop/Hbase/ThriftApi
http://hbase.apache.org/docs/r0.20.4/api/org/apache/hadoop/hbase/stargate/package-summary.html#package_description
I'd assume that either of these could be used from Ruby.
There's Rhino http://qslack.com/projects/rhino-a-ruby-hbase-orm/ which is an Ruby ORM for HBase