Skip to content

Commit

Permalink
figured out the issue (the database charset), added documentation how…
Browse files Browse the repository at this point in the history
… to set up DB from mysql CLI
  • Loading branch information
proost committed May 15, 2017
1 parent 55bb545 commit 65a6326
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/connect_mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,16 @@ the virtual environment.

In the config file the connection needs to be set up using :

SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://user:pass@ip_address/database'
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://user:pass@ip_address/database'


## Setting up the database using the MySQL CLI

First create a database. The character set and collate are important as sqlalchemy-migrate doesn't work with utf8mb4 (the
default).

CREATE DATABASE planet_db_01 CHARACTER SET latin1 COLLATE latin1_general_ci;

Give permissions to a user (planet_dev in this example) to access the database:

GRANT INDEX, CREATE, DROP, SELECT, UPDATE, DELETE, ALTER, EXECUTE, INSERT on planet_db_01.* TO planet_dev@localhost;

0 comments on commit 65a6326

Please sign in to comment.