Showing entries 91 to 100 of 378
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Python (reset)
Install python and pip as local user on shared Linux

A few days ago, I was struggling to install python on a Linux machine, in which I had no root permission. That machine was shared with many other users and there was only an old python version already installed on the machine. After a bit of search and trial, I was able to install a newer version of python on this machine to my local directory.

My goal was to run a program developed under python 2.7 on the Linux server which already had python 2.6 installed. As you can see, it was impossible for me to upgrade python on the system because I had no root permission. The only solution was to install the python 2.7 into my local directory and override the necessary environment variables. Even though this blog aims for python 2.7, I believe it should also be the same for python 3.0. The detailed steps are as follows:

  1. Install python to local directory

Firstly, I create a folder in my home directory, download the …

[Read more]
Announcing MySQL Utilities 1.6.3 Beta!

The MySQL Utilities Team is pleased to announce a new beta release of MySQL Utilities. This release includes a number of improvements for usability, stability, and a few enhancements. A complete list of all improvements can be found in our release notes.

New Enhancements!
This release represents a stable release of the product. Along with several defect patches, we also include the following enhancements.

Improved support for MySQL 5.7
Improved functionality of --exclude option with SQL wildcards
Improved packaging in RPM and Windows distributions
Improved accuracy of calculated disk usage for mysqldiskusage
...and a host of minor improvements for quality and robustness


How Can I Download MySQL Utilities?
You can download MySQL Utilities 1.6.3 Beta from the …

[Read more]
MySQL Connector/Python currently not available from PyPI

With PEP 470 now requiring files to be hosted on PyPI, you may have noticed that MySQL Connector/Python is now no longer available using the pip-tool.

The MySQL Engineering team at Oracle really would like to have the connector available through PyPI and have been talking with the Python Foundation towards that. We know users and developers of OpenStack, for example, have requested this as well as lots of other Python users.

For now we suggest to download the latest Connector/Python directly from the MySQL homepage:

  • Download: http://dev.mysql.com/downloads/connector/python/
  • Using MySQL repository (APT/YUM/..): http://dev.mysql.com/downloads/repo/

Going forward …

[Read more]
Using Connector/J with Python

With Python you would normally use MySQL Connector/Python or the older MySQLdb to connect from Python to MySQL, but there are more options.

There are also multiple Python implementations: CPython (the main implementation), PyPy, Jython and IronPython. PyPy tries to be faster than CPython by using a Just-in-Time compiler. Jython runs on the JVM and IronPython runs on the .NET CLR.

Connector/Python by default (Without the C Extension) is a pure Python implementation and can work with most if not all implementations. And for MySQLdb there is a drop-in replacement called PyMySQL, which is a pure python implementation.

So there are many options …

[Read more]
The performance of TLS with MySQL Connector/Python

I've ran a simple test to see the performance impact of TLS on MySQL connections with MySQL Connector/Python

The test results are in this Jupyter notebook.

TL;DR:

  • Try to reuse connections if you use TLS
  • Establishing TLS connections is expensive (server & client)
  • Improved performance might be possible in the future by using TLS Tickets

Not tested:

  • Difference between YaSSL and OpenSSL
  • Difference between Ciphersuites
  • Performance of larger resultsets and queries
The performance of MySQL Connector/Python with C Extension

The source of this post is in this gist on nbviewer.

After reading about the difference between MySQL Connector/Python and MySQLdb on this blog post I wondered how the C Extension option in Connector/Python would perform.

If you want to run the code yourself you'll need: Jupyter/IPython, Python 3, Requests, MySQLdb, Connector/Python, Matplotlib, Pandas and MySQL.

In [1]:

%matplotlib notebook

In [2]:

import random
import gzip
import time

import pandas as pd
import matplotlib.pyplot as plt
import requests
import mysql.connector
import MySQLdb
for imp in [mysql.connector, MySQLdb]:
    print('Using {imp} {version}'.format(imp=imp.__name__, version=imp.__version__))
print('C Extension for …
[Read more]
Announcing: MySQL Fabric 1.6.2 on Labs

The MySQL Fabric team is pleased to announce that a new version is now available on Labs. This labs release includes our latest developments to give you a taste of what we have been working on. In particular, it includes the following new features and improvements:

  • Multi-node Fabric support is now available!

My first impressions about Go language

I am fascinated. Maybe that should be enough, but I guess I have to write a bit more here because we are not on twitter.

I spent a few days to get know Go language, and now I am more than satisfied. I mean, all the project ideas which are floating in my head should be written in Go.

First of all, I have rewritten Mambo-collector to go (https://github.com/banyek/mambo) because I have faced some serious errors when I used it on CentOS 7 – I blame systemd -: If the process was running as root then after a few days of data collecting, killing that process was lead to restart the entire system, which is not a bug, it is a catastrophe. I tried to debug it several ways, but I am not sure where the problem is, it could be at the ‘loghandler’ redirection or any other place in python-daemon, or it is simply there is a buffer inside which overflows – I don’t really care, because mambo was just a proof of concept – what I used in …

[Read more]
Announcing: MySQL Fabric 1.5.5 GA is Available!

The MySQL Fabric team is pleased to announce that a new (GA) release is now available. This release includes several improvements in terms of stability and usability (bug fixes and feature enhancements). In a nutshell:

  • Two new types of users for backup and restore are now available allowing a better managements of the required privileges for each user type.

MySQL Utilities release-1.6.2 BETA

The MySQL Utilities Team is pleased to announce the Beta release of MySQL Utilities. This release includes a number of improvements for usability, stability, and a few enhancements. A complete list of all improvements can be found in our release notes.…

Showing entries 91 to 100 of 378
« 10 Newer Entries | 10 Older Entries »