• d

    dsmurl

    8 months ago
    if you want my steps that I've found on the way to help with the docs then here they are
    - installed mysql docker for persistance
        - Help here: https://hub.docker.com/r/mysql/mysql-server
        - get docker mysql options with
            > docker run -it --rm mysql:8.0.27 --verbose --help
        - start mysql docker
            - superTokens docker needs bind-address as 0.0.0.0 to listen to all net ips
            >  docker run --restart always --name=mysql1 -d mysql/mysql-server:8.0.27 --max-connections=250 --bind-address=0.0.0.0
        - find one time pass
            >  docker logs mysql1 2>&1 | grep GENERATED
        - login to mysql
            >  docker exec -it mysql1 mysql -uroot -p
        - set mysql root pass
            sql>  ALTER USER 'root'@'localhost' IDENTIFIED BY 'rootPass';
        - check to see if bind is set correctly to 250 (default 105)
            sql>  show global variables like "bind_address";
        - find internal bridge ip of docker (to be used later)
            >  docker exec mysql1 cat /etc/hosts
        - Make a new user besides root to user for superTokens access
            - SOMETHING NEW HERE
        - to rebuild mysql docker, clear it out with
            - docker stop mysql1
            - docker rmi --force  mysql/mysql-server:8.0.27
            - docker container rm mysql1
    
    - installed the docker for superTokens
        - https://supertokens.io/pricing
        - docker run --restart always --name=supertokens1 -p 3567:3567 -e MYSQL_USER="admin" -e MYSQL_PASSWORD="adminPass" -e MYSQL_HOST="172.17.0.2" -e MYSQL_PORT="3306" -e MYSQL_DATABASE_NAME="supertokens" -d registry.supertokens.io/supertokens/supertokens-mysql
        - ran and set restart to always
        - get one time pass
            >  docker logs supertokens1 2>&1 | grep GENERATED
  • r

    rp

    8 months ago
    Thanks!
  • d

    dsmurl

    8 months ago
    Updated instructions
  • r

    rp

    8 months ago
    thank you!
  • d

    dsmurl

    8 months ago
    Hey now it says: (conn=24) Unknown database 'supertokens' Do I need to make the db first with the root or something?
  • d

    dsmurl

    8 months ago
    I figured it would make the db but maybe that new user can't do that.
  • d

    dsmurl

    8 months ago
    I did
  • d

    dsmurl

    8 months ago
    - Make a new user besides root to user for superTokens access
            mysql> CREATE USER 'supertokensadmin'@'localhost' IDENTIFIED BY 'adminpass';
            mysql> GRANT ALL PRIVILEGES ON *.* TO 'supertokensadmin'@'localhost' WITH GRANT OPTION;
            mysql> CREATE USER 'supertokensadmin'@'%' IDENTIFIED BY 'adminpass';
            mysql> GRANT ALL PRIVILEGES ON *.* TO 'supertokensadmin'@'%' WITH GRANT OPTION;
  • r

    rp

    8 months ago
    We can't make the db either. You need to make the db.
  • r

    rp

    8 months ago
    We can make the tables and indexes in the db