Apache Superset error in the encoding in the docker-based Version - utf-8

I want to connect superset with a mysql database, which contains a table with some greek letters (utf8).
When I install superset from scratch it works fine, displaying the greek letters correctly.
When I install I choose the docker installation, it displays ??? where the greek letters are. Notice that in the docker version, I install the the drivers with echo "mysqlclient" >> ./docker/requirements-local.txt, as it is recommended in the documentation.
The connection string I use in both cases is mysql://<UserName>:<DBPassword>#<Database Host>/<Database Name>
Any idea why this problem with the encoding, only in the docker-based version?

The encoding problem is solved using mysql-connector-python drivers, instead of the default mysqlclient!
Append mysql-connector-python to ./docker/requirements-local.txt
from superset, connect to mysql with this driver, using the following sqlalchemy uri mysql+mysqlconnector://<user>:<password>#<host>[:<port>]/<dbname>

Related

Timescaledb extension for postgresql V.13 Beta 3 (windows)

I am using PostgreSQL 13 Beta 3 on (windows.8/*64bit). I want to add timescaledb extension. My "postgresql.conf" directory is correct but every time i try to install the extension, I get a message which is attached.
I had also changed Environment Address to "C:\Program Files\PostgreSQL\13\bin" [The address of pg_config.exe", but nothing changed. Is there a possibility that i have to use from postgreSQL V.12 as mentioned in the installation instruction? enter image description here
Thank you in advance for your help and guide
You cannot to do it. Timescale doesn't support Postgres 13 yet. Postgres 13 was not releases yet - there only test releases are available.
PostgreSQL extensions should be compiled for specific Postgres major version. So you cannot to use timescale for Postgres 12 or Postgres 11 for Postgres 13.
It's not ready yet. It's expected on the upcoming TimescaleDB v2.0.1. Read more at their release notes: https://docs.timescale.com/latest/release-notes.

Incompatibility between server and localhost charset

I'm currently developing a Spring Boot App with MariaDB as a Database. My localhost is a Windows 10 installation and the production server is a AWS Linux (first gen) image.
On localhost I have a local MariaDB installation.
On production I have a AWS RDS instance running MariaDB, default parameters.
Currently the problem I facing is the following, I'm trying to save the following characters ["↑", "↓", "→", "←"] to DB. On localhost characters are save as excepted. On the production server characters are saved as "?". Both DB's have the same mysqldump file.
I already debugged both Spring instances and they both receive parameters as intended.
Any ideas?
Extra 1:
The only big difference between both instance is that localhost runs with the ./mvnw command while the production site is a generated jar running inside a Docker container.
In utf8 (or utf8mb4), those characters are hex E28691 E28693 E28692 E28690
See "question mark" in Trouble with UTF-8 characters; what I see is not what I stored for an explanation of the step you failed to do.
In addition, check for ?useUnicode=yes&characterEncoding=UTF-8 in the getConnection() call.

MariaDB clashing with MySQL on Travis-CI

I have a test suite that runs on Travis-CI and requires MariaDB (but it breaks on MySQL). The pre-test scripts call the mysql command, but run commands against MariaDB, as the command is the same for both.
echo "CREATE DATABASE test1" | mysql -u travis
The tests on worker v2.5.0 were passing just fine (https://travis-ci.org/stems/join-monster/jobs/256751422). However, the tests started running on a later version of the worker v2.9.3 and failing without any changes to the code (https://travis-ci.org/stems/join-monster/jobs/260001701). According to the system build information, this new version seems to be installing MySQL in addition to MariaDB. Now when I run my mysql command, it's running against MySQL instead of MariaDB and breaking the build.
I need either:
to go back to a previous version of the worker (can't find any info on how to do this in the Travis docs.
to specify that I want to run commands and connect to MariaDB, NOT MySQL.
to tell Travis to not install MySQL to avoid the clashing
Any of these solutions would be appreciated.
Fixed it by switching the Ubuntu version back to 12 rather than 14, which had become the new default.
In the .travis.yml
dist: precise

How to use postgresql with mamp

I would like to use mamp and postgresql, do you know how this is possible?
I have a postgresql database, and I already use mamp and mysql, but I can not find documentation to use postgresql with mamp
Sorry for my bad english ;)
"mamp" appears to be a canned installer for MySQL + Apache + PHP for Mac OS X.
There are related things for PostgreSQL; see the download page. But otherwise, all the components are easily installed individually. Many people use things like Homebrew.
Look at this for the answer.
https://www.drupal.org/node/1438206
Postgres on Max OS X with MAMP
Last updated February 13, 2012. Created on February 13, 2012.
Edited by diricia. Log in to edit this page.
At the moment I'm running MAMP Pro, but the setup should work with MAMP free version as well.
Requirments;
Download and install MAMP from MAMP
1. Download and install postgres 8.4 or higher from Enterprise DB
2. Add the bin directory of postgres, /Library/PostgreSQL/8.4/bin to the PATH in your .bashrc file in your home directory. Remember to run ./.bashrc to update the path.
3. Sudo to your root user and execute the following commands. '>' is the prompt on your terminal and should be excluded. Text in () is an explanation and should not excluded.
a. > su postgres (log in as the postgres user)
b. > createuser --no-createdb --no-password (choose as a super user)
c. > createuser --no-createdb ----pwprompt devel (enter a password 'drupal', and choose as a super user, this is if your site is using the standard devel user with password drupal)
> exit
4. Edit table at the bottom of the /Library/PostgreSQL/8.4/data/pg_hba.conf file to so that the options for local look like this. This states that the devel (or your user) must have a md5 password and all other users can log in with no password. (This is only recommended for your local host and is not secure on a server)
# "local" is for Unix domain socket connections only
local all devel md5
local all all trust
5. In your applications folder stop and start the postgres server using the apps under the Postgres folder
6. Log out of your root user
7. Create your postgres database as specified in INSTALL.pgsql.txt:
a. > createdb --encoding=UTF8 --owner=username databasename (The owner is devel or the user you created)
I installed Bitnami's MAMP Stack, and then also the Bitnami Postgresql module:
Bitnami MAMP Stack: https://bitnami.com/stack/mamp/installer
Bitnami MAMP Postgresql Module: https://bitnami.com/stack/mamp/modules

PostgreSQL environment file on Mac OSX?

PostgreSQL seems to have an environment file that allows settings environment variables. On Linux (Kubuntu 11.10 in my case), it is located at e.g. /etc/postgresql/8.4/main/environment and empty by default, apart from a few helpful comments.
On Mac OSX Lion, the file does not seem to exist: I would expect it at e.g. /Library/PostgreSQL/9.0/data/ as that's where all the other configuration files are, but it is not there - and if I create it, it does not seem to be used.
How can I set environment variables for the PostgreSQL server on Mac OSX ?
There is no standard way to specify environment variables for PostgreSQL, I assume that file is Kubuntu specific.
What I did to ease my life was copying approach used by ORACLE:
I have /etc/pgtab file on each server where I run PostgreSQL databases;
I specify each cluster I run on a single line in the /etc/pgtab;
I've created a script pgenv which based on the /etc/pgtab shows the menu of clusters (in case there're more then just one) and initialize all PATHs and variables.
It works on my MacBookPro and on all Linux and HP-UX based servers.

Resources