diff options
author | Pjotr Prins | 2023-11-12 09:12:02 +0100 |
---|---|---|
committer | Pjotr Prins | 2023-11-12 09:12:02 +0100 |
commit | fdc57d7e7373414305172728966b8485e0a7b45c (patch) | |
tree | 97d07582b61aae5438ed18470b376cdf9d59c8cd /topics/setting-up-local-development-database.gmi | |
parent | bb484f102b739898eae8d7a25f06d35fbc4d0ee5 (diff) | |
download | gn-gemtext-fdc57d7e7373414305172728966b8485e0a7b45c.tar.gz |
Running mariadb in a container with the large DB
Diffstat (limited to 'topics/setting-up-local-development-database.gmi')
-rw-r--r-- | topics/setting-up-local-development-database.gmi | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/topics/setting-up-local-development-database.gmi b/topics/setting-up-local-development-database.gmi index a4c6676..58e19ad 100644 --- a/topics/setting-up-local-development-database.gmi +++ b/topics/setting-up-local-development-database.gmi @@ -61,6 +61,9 @@ SQL_URI="mysql://root@127.0.0.1:3306/db_webqtl_s" ## Method 2 (running a local container) A local container runs as a normal user. It requires some juggling of dirs to load an existing database. Make sure to not run on the same dirs as another mariadb instance(!) +Here we run a new database, but you can use an existing DB as was done in + +=> precompute-mapping-input-data.gmi ``` cd ~/tmp/mariadb @@ -82,17 +85,17 @@ Initialize with mysql_install_db ``` -and run +and run, for example ``` export TMPDIR=/tmp -mysqld_safe --datadir='./database' --port=3307 --user=$USER --nowatch --socket=/var/run/mysqld/mysqld.sock +mysqld_safe --datadir='/var/lib/mysql/' --port=3307 --user=$USER --group=users --nowatch --socket=/var/run/mysqld/mysqld.sock ``` Now from outside the container you should be able to connect with ``` -stromboli:~/tmp/mariadb$ mysql --socket=var/run/mysqld/mysqld.sock +/export/mysql$ ~/opt/guix-pull/bin/guix shell mysql -- mysql --socket=var/run/mysqld/mysqld.sock -uwebqtlout -pwebqtlout db_webqtl ``` and @@ -120,9 +123,6 @@ MariaDB [(none)]> show databases; If you need to tweak the server configuration you can load the my.cnf file with the `--defaults-file=var/my.cnf` inside and outside the container. - - - ## Method 3 (Manual method without Guix) /This is not recommended/ |