Automatically sending Google Form responses to a local MySQL Database - mysql

I'm trying to set up a automated system in our lab of archiving metadata information for some next-generation data.
Essentially I want to be able to send a Google Form link to my colleagues, have them enter their data, and when they click submit, have it automatically update a local MySQL database that is running on our main lab computer, so that we can query any information regarding samples we may need later on.
I've a few days trying to figure this out, and haven't really gotten anywhere. The main problems are these: I know you can JBDC Class to do this. However, I am not entirely (or at all) familiar with how a Google Apps Scripts code is supposed to be run, and I am having trouble connecting to our MySQL host (which I am also not familiar with). It's apparent that because I am running a localhost, I cannot actually use JBDC to connect to it, and I had no luck when I tried to grant all connections access to MySQL server by following the answers on this topic (How to grant remote access permissions to mysql server for user?).
I'm kind of at a loss, and it may just be that I simply don't have the knowledge to accomplish what I'd like to do. Can anyone suggest any step by step tutorials, youtube videos, or offer some advice?
Thanks.
EDIT: Post's i've already gone through:
Post Google Forms to a MySQL database?
Google Form output to remote MySQL database
https://developers.google.com/apps-script/guides/jdbc

Related

How to make a mysql server publicly acessible with MySQL Workbench?

So I am developing an app that I want to let include server interaction. I have installed MySQL server and MySQL Workbench. I am able to query my data base locally from Java. such as local host. but when I change the query correctly, to reference the IP of my server and not "localhost", I am unsuccessful both on my server and separate machine. I have pinged my server from my another machine successfully. I have configured user accounts on MySQL workbench in almost every way possible. I have done a lot of googling with little success.
I am 19 and just starting to learn SQl now. It'sn ot a big part of my project. I am sorry if this sounds like a basic question, but google has gotten me no where and I am really eager to publish my app xP . So I would really appreciate the help or even a basic guide as to what I may be doing wrong.
Most likely, this is because you did not yet assign user permissions for remote computers. You'd have to use something like tyhe following:
GRANT SELECT ON myDatabase.*
TO myUser#’mycomputers.ip.address’ IDENTIFIED BY ‘my_password’;
There's a more extensive guide here:
https://support.rackspace.com/how-to/mysql-connect-to-your-database-remotely/

Basic workflow for setting up mysql database online

I'd like to set up a Mysql database online. I've been trying to find information on this online, but I haven't been able to find a good summary of the whole process. I have very limited experience with webhosting in general, so would really appreciate any pointers.
My questions would be:
- do you needed a dedicated mysql server online, or can I just set one up on my webspace (I have a website that I use for random stuff)
- how do I go about setting up a database on my webspace (if possible)
So far I've uploaded phpMyAdmin to my site, and the start screen loads fine, but I'm stumped for user and password. Do I need to enter my webspace ftp user and password here? Or my mysql user and password (which I'd find weird since I have not actually set up any mysql webspace yet). Or do I need to configure phpMyAdmin for a specific user and password?
So yeah, very basic stuff really... :)
Thanks!
Dave

Differences between SQLite and MySQL - login and security

At first I searched in Stack Overflow about the difference between MySQL and SQLite. So there is some answers but still I want to know something. When accessing MySQL I need to give host, username, password and database parameters. But when accessing SQLite I just give database name. Can anyone explain me this why, and for security reasons also, should not be there password for SQLite database, can not be it just downloaded for example from server, so I am totally stuck. So need your help.
The difference is that MySQL is a database server, while SQLite is a database engine that works against single database files.
You are correct that the SQLite database file could just be downloaded if it's placed right in the web application where anyone can reach it.
Most server providers offer a folder where you can place files like this, so that the web application itself can reach it, but it's not directly downloadable.
You can also optionally add protection to the SQLite database file. See this question:
Password Protect a SQLite DB. Is it possible?
SQLite is mainly used for mobile and tablet apps.So they are just used for a single system.
But in MySql its a complete database and can be used from multiple system. So for increasing security ,we have to give all these. So that no one can misuse the data...
SQLite is just a file. If you have read access to the file that is the implicit security model (as well as the possibility to use database encryption).
MySQL is a network service. It can listen on an internet facing socket, meaning anyone in the world can access it if they have the right authentication credentials.
SQLite is file based, MySQL is a service which runs on the server. With SQLite you don't need to enter the database name, but actually the database file.
If you put the database file at an inaccessible location, you should be totally fine and the user will not be able to download the file.

Apache-Mina FTPServer Database User Manager question

I am trying to configure the Apache FtpServer for windows, and i've got most of it running already, however I am having difficulty understanding the database user manager...
I am more or less a complete newbie to this and SQL, however I already have an FTP server up and running in Linux using VSFTPD. the company wants to migrate from linux to windows, and I have to create accounts for close to 5,000 users (which is why I want to use the database manager).
Here are my questions:
I can see that the xml configuration controls the connection to the database, but how does it control authentication? can someone explain which section handles user authentication from the database? EDIT: by user authentication, I do not mean the database connection itself, but rather how FTPServer authenticates a connection THROUGH the database.
How can I prevent / detect brute-force attempts against my server? our current linux ftp server uses DenyHosts for port 22 (ssh) and is hit by attacks at LEAST 20+ times a week, is there any kind of built-in authentication protection, and if not, can anyone suggest a way to create one? I know that the xml config has themax-login-failuressetting, which closes the connection after a certain number of attempts, but I need it to completely deny any further access from that IP, and not just close the connection.
Example:
Any attempt to log in with the following usernames results in immediate IP-BAN:
Root
Admin
Administrator
System
etc
Other settings
Attempts for non-existing users results in IP-BAN after # attempts for IP (including different users)
Attempts for existing users results in 60-second time out after # attempts (including different users)
Any and all help would be greatly appreciated. If you have any questions or require clarification on anything, please post a comment and I will make any necessary changes / replies.
Thanks.
See the example under Data source configuration here
Apache Ftpserver does not provide this functionallity out of the box. You either have to extend it and program this yourself, or use some external system that parses its log files and dynamically add/remove firewall rules (something like what fail2ban does on linux)

Access history report for MySQL - knowing who accessed the database and when

I was wondering if the is a way or tool that will enable me to have access history/report to my MySQL database (I have no root/shell access on the server). I would like to be able to know when and what user accessed the database, and which table, if possible.
Thanks!
The mysql general query log is used for this but you need access to the server and database to enable it. Be aware, even with connections logged like this, if requests are made from scripts on the server, I ain't sure this will give you the ip as the request is made from localhost.