Back Home

Docker Setup

docker run --name=mysql01 -p 3306:3306 -d mysql/mysql-server:5.7.24 

the default root password will be in the logs

mysql -u root -p 

will ask for the default password.

Json Functions

http://www.mysqltutorial.org/mysql-json/

now very similar to postgres

 
INSERT INTO events(event_name, visitor,properties, browser) 
VALUES (
  'pageview', 
   '1',
   '{ "page": "/" }',
   '{ "name": "Safari", "os": "Mac", "resolution": { "x": 1920, "y": 1080 } }'
)');

and the select like sql

SELECT id, browser->'$.name' browser
FROM events;

XML Functions

 
mysql_notes.txt · Last modified: 2019/11/06 04:35 by root
 
RSS - 200 © CrosswireDigitialMedia Ltd