In the past it was difficult to get MySQL working on virtualenv without using system packages. Now you can have a real separated environment with simple steps: Follow this guide to install virtualenv using this command: This command will install a new virtualenv inside a new directory myproject created by the command itself. Activate virtualenv: Upgrade setuptools You can now install MySQLdb, inside the package MySQL-python: Now do a simple test trying to connect to […]
If you have a virtualenv on Windows and you want to add MySQLdb support via mysql-python, read this before spending hours of your life to figure why it doesn’t and it will never work. 1) Install MySQL for Python selecting the same Python version of the virtualenv 2) From site-packages directory above, copy the selected files: 3) (optional) On PyCharm, look for virtualenv site-packages inside the path marked with the arrow: 4) Open your virtualenv […]
Solving the wrong socket problem with MySQL MySQLi on Drupal.
By default, Amarok use SQLite to store collection informations. If you’ve a running MySQL or Postgre server on your machine, you can optimize Amarok collection indexing reducing retrieval time. Open a root shell (sudo bash) and run mysql mysql> create database amarok; Query OK, 1 row affected (0.00 sec) mysql> grant all privileges on amarok.* to 'amarok'@'localhost'\ identified by 'type_here_your_password'; Query OK, 0 rows affected (0.00 sec) Open Amarok and go to Settings > Amarok […]