I am very new to ngrok, so please bear with me.
I have a very simple React test app that is using Django as a server and local MySQL database. Django pulls/inserts some info from the local database and sends to the frontend. Everything works well.
What I'm trying to do is expose this local app to public Internet. I have successfully installed and configured Ngrok, established a tunnel and was able to view the app on a different computer through the address generated by Ngrok. The problem is, I was able to see only the UI that is not related to the database. All data that React pulls from the local database, was not visible when I used a different computer. My question is, is there a way to use the same app through Ngrok and get the same data from the local MySQL database that I see when I just run the app locally? I know that I can create another tunnel that exposes the port MySQL or Django are running on (3306 and 8000 respectively) but if I do this, how would I access the data through Ngrok? Would I need to change anything in React code?
Thank you in advance!
Related
Using the deck app, that uses Multipass & Docker to build containers and instances of specific technologies (such as Laravel, CodeIgnite, Apache, etc.,) to create a mysql instance it installs a copy of phpmyadmin and allows you to view the server through the browser.
I cannot logon to the phpmyadmin page that is created by this mysql/phpmyadmin instance in the deck app
I have messed around using CLI (terminal) to initiate the server to make it active, however this generally resulted in errors.
I have web hosting that allows me to use remote myqsl through cpanel but I don't know how to connect it to a localhost.
I would like to know how to login or use the mysql server.
I would appreciate advice on what I need to do to make this new mysql instance usable, so I can get a username, password & database name to utilise in a laravel project.
I would also like to know if there is any better solution for creating a mysql & phpmyadmin database to use for a laravel project.
Thanks in advance!
I have messed around using CLI (terminal) to initiate the server to make it active, however this generally resulted in errors.
What are the errors?
I have web hosting that allows me to use remote myqsl through cpanel but I don't know how to connect it to a localhost.
You wouldn't; you'll want to install your own phpMyAdmin locally rather than connecting your web host to your local server. You should not expose your local database server to the internet.
I would like to know how to login or use the mysql server.
Using the password you set during installation, or if you weren't prompted, usually it's a blank password.
My client has a website hosted on hostinger, He has linked me on his hosting. Database is Mysql. It is a ecommerce business website and I need to get some data from the mysql server through my NODEJS Application
It has a remote mysql feature.
I tried using mysql npm library, but i dont know what credentials to put there. I have no clue how to connect to a already hosted mysql database, It has a remote access feature, which I could not use.
For a school project, we want to create an app using flutter (dart + android studio), and for it we would need a database to which we connect the app.
We have two options :
A MySQL database that's hosted on our school's servers (on a Ubuntu VM, accessible from SSH with a host address, username an password)
Another MySQL database on our school's server, but hosted directly on a server for databases (no VM). For that one, we would have more 'common' logs as the host and port.
Here are the specs of the second one :
Linux Fedora Core 18 //
Apache/2.4.4 PHP/5.4.14 //
MySQL Community Server (GPL) 5.5.31 //
phpMyAdmin 3.5.8.1 (2013-04-24)
My question is, how can I access these sql databases (ideally using the second method) from my flutter app ? I know there's a way to access local MySQL databases from flutter, but as the base will be hosted on an external server, I don't know how to correctly connect and dialogue with it.
Thanks
I faced the same problem. The mysql1 package is not well maintained. Google Dart developers do not provide built-in support of RDBMS.
There is another package to work with mysql, maybe you can take a look. mysql_client
I think that the best solution is to create a restApi on your server to manage your crud operation with the mysql database. There are a lot of tutorials on how to create a node application that lives in your server and interact with your database.
This is also a good solution because you add a layer that manage all the back-end stuff of your application.
I am developing a desktop app and I want to store data in hosted database like MySQL/MongoDB. I know one solution is using webservice to manipulate db. I am wondering is there a way to connect desktop app with hosted db directly.
I am using OpenShift I know I can use port-forward to do this. But it's unpractical to open port forward every time for every PC. So is a way simply like this:
mongoose.connect('mongodb://user:pass#host:port/db');
I tried this but I got 'connect refused' or 'connect not found' errors. OpenShift doesn't allow external access to database directly because security issues, right? Then how could I do it without port-forward?
Also I read some articles about SSH, is it possible to use SSH to access db directly when desktop app is launched?
Thanks for any suggestion.
I don't think OpenShift is going to be a good fit for what you are trying to do, unless you decide to build a service layer between your desktop app and the database. It sounds like you are looking for a Database As A Service. You mentioned both MongoDB and MySQL. MongoLab is a good MongoDB DBaaS option. For other databases like MySQL, PostgreSQL and several others you could look at Amazon RDS.
I would like to create a desktop application that should work with data on a mySql server running on a remote machine.
So each user has a copy of the desktop app and edits data on the remote mySql server.
Now my problem is that the mySql server will not allow connections from other hosts.
Question, is this just the wrong way of creating the app. If not how do I give any host access to the MYsql server.
(I know I can open up for a specific IP but that won't work as the app could be running anywhere)
You should front your database on the server with a thin service layer, where you could do some validation / processing on the data, perform authentication, etc. Your client apps would then expose those methods in your service layer as web services, to which your client apps would communicate using either SOAP/XML, REST/JSON, etc. In general, it is a bad idea to expose your database directly if your application is within a LAN, and a terrible one to expose it on the internet.