<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
No advice/experience with connecting out from the Docker, except that the default Linux docker setup does *not* allow for networking/bridging - that might be the reason you cannot connect.
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Also check permissions on the MariaDB - MySQL/MariaDB permissions are both at the user@host level, so you may need "user@*" or something like that to connect.<br>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div id="divtagdefaultwrapper" dir="ltr">
<div>
<div class="BodyFragment"><font size="2">
<div class="PlainText" style="color:rgb(0,0,0); font-family:Tahoma; font-size:10pt; background-color:rgb(255,255,255)">
<font style="font-size:8pt"><span style="font-family:'Courier New'"></span></font></div>
</font>
<div class="PlainText"><font size="2"></font>
<div><font size="2"></font>
<div>-- </div>
<div>Lars Vilhuber, Economist</div>
<div>Cornell University, Executive Director, Labor Dynamics Institute</div>
<div>  and ILR School - Department of Economics</div>
<div>American Economic Association - Data Editor</div>
<div>Journal of Privacy and Confidentiality - Managing Editor<br>
<br>
</div>
<div>
<div>e: lars.vilhuber@cornell.edu <br>
</div>
</div>
<div>p: <span id="gc-number-91" class="gc-cs-link" title="Call with Google Voice">
+1.607-330-5743</span> </div>
<div>v: <a href="https://cornell.zoom.us/my/larsvilhuber" class="OWAAutoLink">https://cornell.zoom.us/my/larsvilhuber</a></div>
<div>w: <a href="http://lars.vilhuber.com/" class="OWAAutoLink">http://lars.vilhuber.com/</a> <a href="http://lars.vilhuber.com/" class="OWAAutoLink"></a></div>
<div><br>
</div>
<div>
<div>
<div>Assistant: ldi@cornell.edu | <span id="gc-number-92" class="gc-cs-link" title="Call with Google Voice">+1.607-255-2744</span>
<br>
</div>
</div>
</div>
</div>
<font size="2"></font></div>
<font size="2"></font></div>
</div>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Düben, Christian <Christian.Dueben@uni-hamburg.de><br>
<b>Sent:</b> Tuesday, June 9, 2020 10:19<br>
<b>To:</b> Thomas Krichel <krichel@openlib.org>; Lars Vilhuber <lars.vilhuber@cornell.edu><br>
<b>Cc:</b> CollEc Run <collec-run@lists.openlib.org><br>
<b>Subject:</b> RE: [CollEc] RePEc Visual</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">I am having issues with connecting a Docker container with the MariaDB on the host. I tried various solutions, but nothing works. And now I am even facing a permission error when trying to access the database directly on the host.<br>
<br>
@Lars, any advice on connecting a Docker container with MariaDB?<br>
<br>
@Thomas, I do not want to break the host's database. I think I should therefore host another MariaDB server within a container.<br>
<br>
Christian Düben<br>
Research Associate<br>
Chair of Macroeconomics<br>
Hamburg University<br>
Von-Melle-Park 5, Room 3102<br>
20146 Hamburg<br>
Germany<br>
+49 40 42838 1898<br>
christian.dueben@uni-hamburg.de<br>
<a href="http://www.christian-dueben.com">http://www.christian-dueben.com</a><br>
<br>
<br>
-----Original Message-----<br>
From: CollEc-run <collec-run-bounces@lists.openlib.org> On Behalf Of Düben, Christian<br>
Sent: Donnerstag, 4. Juni 2020 18:25<br>
To: Thomas Krichel <krichel@openlib.org><br>
Cc: CollEc Run <collec-run@lists.openlib.org><br>
Subject: Re: [CollEc] RePEc Visual<br>
<br>
Sorry, I got the login process to the root account wrong in the first place. I tried to sign in to root directly without using icanis first. Now I understand how it works. Thanks.<br>
<br>
I do not know what else you store on the server. But if you say that is does not require complex security that is fine with me.<br>
<br>
The CollEc database is now located in the subdirectory. Thanks for the respective code.<br>
<br>
I received an error when installing R outside Docker but it works fine when containerized. I am going to look into that. Running R inside containers is fine for now.<br>
<br>
Regarding point (2), I am not sure which directories ShinyProxy and Docker set. My apps follow the directory structure illustrated in the cheat sheet attached to this e-mail. I can set it up in the home directory. But that does not prevent ShinyProxy and Docker
 from writing files elsewhere. ShinyProxy's configuration file is in /etc/shinyproxy/.<br>
<br>
Christian Düben<br>
Research Associate<br>
Chair of Macroeconomics<br>
Hamburg University<br>
Von-Melle-Park 5, Room 3102<br>
20146 Hamburg<br>
Germany<br>
+49 40 42838 1898<br>
christian.dueben@uni-hamburg.de<br>
<a href="http://www.christian-dueben.com">http://www.christian-dueben.com</a><br>
<br>
<br>
-----Original Message-----<br>
From: Thomas Krichel <krichel@openlib.org><br>
Sent: Donnerstag, 4. Juni 2020 15:03<br>
To: Düben, Christian <Christian.Dueben@uni-hamburg.de><br>
Cc: CollEc Run <collec-run@lists.openlib.org><br>
Subject: Re: [CollEc] RePEc Visual<br>
<br>
  Düben, Christian writes<br>
<br>
> You mentioned in yesterday's e-mail that you gave me root access. <br>
> However, I apparently need a password for that.<br>
<br>
icanis@darni:~$ ssh root@darni<br>
<br>
  Works for me. Am I missing something?  <br>
<br>
> The app itself only needs read access. It reads data from the SQL <br>
> database and from other files stored on disk and displays it. The <br>
> scripts generating the data run independently of the app. They require <br>
> read and write access to the database and the directories the app uses <br>
> and are initiated by a scheduling system. Installing and updating the <br>
> app requires more extensive permissions. I need full access to Docker <br>
> and ShinyProxy for that.<br>
><br>
> How about two accounts? One handles the app and has minor access <br>
> rights. And the other generates the data, controls the Docker images <br>
> and ShinyProxy and has larger access permissions.<br>
<br>
  Actually I created another account "collec", then had a nap,<br>
  and deleted it again. I don't see the point of the two accounts. <br>
  We don't need complicated security, as we have nothing that anybody<br>
  could steal. But if you want to create another user you can do that.<br>
<br>
  For reason related to the weather, I am very sleepy at this time. <br>
<br>
> For security reasons I suggest that these accounts can only access the <br>
> new CollEc's database within MariaDB. This prevents any repercussions <br>
> on non-CollEc databases. When setting these permissions we should make <br>
> sure that "LOAD DATA LOCAL INFILE" or " LOAD DATA INFILE" are still <br>
> available. Restricted access apparently tends to block these <br>
> statements which I use to insert large data sets.<br>
<br>
  root@darni has access to the mysql root account. To call my<br>
  understanding of mysql security rudimentary would be heaping<br>
  praise on it. <br>
<br>
> Feel free to choose any name you like for the account(s) and the database.<br>
<br>
  Kindly consider the following.<br>
<br>
  (1) Once a week, I rsync all the /home /etc /var and /root as backup<br>
  to aigtu, except anything that is in a folder called 'opt'.  At this<br>
  time, aigtu is short of space. It's a good idea to move bulky files<br>
  that can be recalculated into folders called opt.  For example, all<br>
  the icanis path data is in a directory called opt, even though it would<br>
  take months to regenerate it. You can do a<br>
<br>
  cd /var/lib/mysql<br>
  mkdir -p /var/lib/mysql/opt/foo     <br>
  ln -s opt/foo foo<br>
  cd /var/lib/mysql <br>
<br>
  (2) At server migration time---not imminent for helos and darni,<br>
  both are quite new---I copy all of /home, /root and /var as is. All<br>
  other directories will be dealt with by hand. Thus the change in<br>
  /lib/, proposed by the shiny app installation is problematic because<br>
  it needs to be remembered in a few years time when I migrate.  For<br>
  sudo, just use /etc/sudo/sudoers.d files. They can convienently be<br>
  rsynced at migration time. We operate in a resource-poor environment<br>
  where migrations take place only every few years, so I don't use<br>
  things like docker that are important when you have lots of<br>
  servers. But it pays off to keep things in users' home directories.<br>
<br>
<br>
-- <br>
<br>
  Cheers,<br>
<br>
  Thomas Krichel                  <a href="http://openlib.org/home/krichel">http://openlib.org/home/krichel</a><br>
                                              skype:thomaskrichel<br>
</div>
</span></font></div>
</body>
</html>