Link to home
Start Free TrialLog in
Avatar of Ted Penner
Ted PennerFlag for United States of America

asked on

Run a separate database for contact management

Title: Run a separate database for contact management

I am working with a programmer and we have IntelliJ running a project that we wrote mostly in HTML, J2EE, and JS using IntelliJ.  Since IntelliJ uses a MySQL database and we can access our local project from the internet, I thought it would be easy for us to do a new Contacts database that could run concurrently but we are running into trouble. We want to access the MySQL database that is running in the local system from another device. 

Assistance is greatly appreciated.

Avatar of Kimputer
Kimputer

Problem description not very clear. If you already have a working MySQL database, a second database wouldn't be a problem at all. If it's the same project, you can make the contact management even in the same database, just different tables.
Please post exact TECHNICAL problems you're running into right now, what did you already try, what part of it did work, what part didn't.
Avatar of Ted Penner

ASKER

Kimputer, thank you.

Yes, it appears that we now have a table inside the same database.
I want to use this client to connect.
https://play.google.com/store/apps/details?id=com.tonocodelabs.dbclient&hl=en_US&gl=US
I now have more info than I did. It asks for:

Connection Name: Can this be anything?
Host: I assume this is the external IP address from whatsmyip.org?
Port: I have something recorded for this.
Username: Seems dangerous to use root
Password:  I have this
Database Name: I think I know this.

The error says "Failed to create connection.
Could not connect: failed to connect to /
ip (port) from /:: (port 57866):
connect failed ETIMEDOUT (connection timed out)

Why are you using your Android tablet or phone to diagnose database problems?

Use your PC/laptop, and you'll be faster with diagnosing problems step by step. (In this case, use this tool: https://www.heidisql.com/download.php)

Did you intend to talk to the database directly as an end solution? You should always shield your database, and have only an (web) interface interacting with the database.

Anyway, you said you already have a connection to your database FROM the internet. So look at your IntelliJ config of the database, and you'll have all the info you need.
Ok, yeah, I clearly don't know what I am doing and a web interface sounds like the best solution. Can you be more specific about how to add entries via the web?
I don't want my IntelliJ programmer to be able to open it and it's inside of the database he is working in?

Is it possible to protect it?
I guess EE doesn't allow me to message you directly.

If you gave the IntelliJ Programmers the correct user (NOT the DB root account, but a USER account only able to access the specific database they need to work in), then you can just do the same for the new contact management database. Create it, assign a new user to it. Sadly, designing a web interface for it, requires a lot of programming work. Unless you have a ready made CMS project, you or another programmer will have to do the work. Depending on the complexity:

- standard use, use ready made project
- very custom requirements, build your own)
Am I on the right track here?
Could be, if that's a real connection. I don't see what you filled in as username/password though. Did you ever use that, or you used it, and deleted it for the screenshot?
Originally it sounded like you have two distinct MySQL databases, but you really have just one MySQL database where that database contains a table or tables that are used to manage your contacts.

If the main project that you have hired somebody for is going to require the tables that contain your contact data and you do not want the developer to have access to your contacts, then the best solution is to create a duplicate database in structure and fill it in with fake data or at least just remove all the contact data and replace it with fake data. This may break some things if other tables are linked to contacts such as sales. In that case, you can update the fields in the duplicated database with fake data.  Perhaps using https://www.mockaroo.com/ or https://www.generatedata.com/ That would allow you to keep the ID numbers in tact that may be linked elsewhere.  It may be worth it to have a trusted database dev to do this for you.
What I did was try to create a new database called Contacts to as closely match the other one there as possible, then put in a new username and password for it. Apparently, that is not the screen where you set it but I don't see how to.User generated image
I read, reread but could not understand what you are trying to achieve.

You have an existing project using, HTML j2ee and js.
Part of the project uses a contact list

You pr question deals with a separate way to access/change/add using a different interface/mechanism?

HTML is a rendering ..

You could use the tool you referenced, with a caveat your vps has VPN capabilities such that you setup a VPN connection back to the vps and then use the MySQL, db connection tool to connect to the db.  You do not want to expose your db directly to the Internet.
Nearly all databases these days are 'accessed' over the Internet only via the web application that acts as the client of the database. Never directly, as that's unsecurable.
What is your problem with doing this?
OP is trying different stuff with different angles, and mostly all ill-informed ones. This is best left to a MySQL expert (doesn't even need to be an expert, just a junior educated one would do as well). This will not be solved by a single, or a whole range of questions on EE, as even the basics are not in place here at all.

To just answer the last question still, because you have a DB tool now, doesn't mean everything can be done there in one go. User/DB management still needs the basic knowledge how to administer it correctly to that DB.
In MySQL, you'll need specific commands to create and assign a user to a db. But as I said, it won't help you that much in this case, as there's so much more to fix here.
That is correct. I'm definitely in over my head here and need a real-time conversation with someone that knows more than I do about this.

Slack seems to be a possibility for this and my slack channel link is https://join.slack.com/t/tedpenner/shared_invite/zt-k3m3k4uq-V2qc_ymdXGZ4ssrNmn94lA
Not quite with you there. Slack is a business-oriented chat application. How would that fit in with provisioning a contacts database?

You would also make it easier to help you if you describe the functional requirements that go along with your db
It would provide space for a real-time conversation where it is easier to do screenshots. EE isn't suited for a real-time discussion.
OH, you mean use Slack to discuss this problem?
IMHO, an introduction of detail of what you are working on sets the stage and framework on whose basis an answer is given.

a simpler statement of what it is you are looking to do, complete, need  might start an open discussion that may help narrow down what your need.

The clear is that you need a contact management setup.

This contact management needs to be integrated into your existing inellij development.

do you need any and all apps that may interact with this contact management setup to be able to access read and write or merely read only....

You could have one setup contactDB with an API front end  (AJAX, JSON, etc.) that all your other developments will interact with on the server side//
This contact management needs to be integrated into your existing inellij development.

Really? What has contacts management got to do with with using an IDE?
He has a developer working on something using interlij, that is how it started. I am trying to narrow down what he is trying to accomplish and whether or how the two relate.
I just want to start keeping a separate list of contacts in a MySQL database that only I have access to. At this point, I don't want my IntelliJ developer in it at all and I need to be able to add entries into it from my phone.

Sample Table Headers
ID - Unique ID Field - This field should auto-increments.
DATETIME - Date/Time Field - For when each record is first added to the database.
NAME - Name Feild - Can include first, last, company, or any other details.
SOURCE - Source Feild - Note the source of the contact in the form of a link back to that source.
PHONE - Primary Phone Number
EMAIL - Primary Email Address
ADDRESS - Primary Physical Address
NOTES - Notes Field

Is that for when your Google Contacts breaks? ;)

Seriously, you could install PhpMyAdmin. That would almost instantly give you what you need with two provisos:

a. mobile access might be difficult as it's usually a pc browser interface. Someone might have written a mobile interlace though *
b. the default server is locahost, but that could be changed

* Apparently https://www.adminer.org/en/ + https://github.com/pematon/adminer-theme
What user does the developer use
As was noted earlier as long as the user being used is limited to access the DB you need for the intellij project, any additional DBs you add will not be visible to the developer unless you grant the user rights to the new DB.

is the Mysql that you have, is it on your LAN, or is it a VPS, server accessible via the internet?

just a reminder, the root user is commonly locked to accessing the mysql server via Localhost.

You would need to add a user and grant it access rights on the LAN, or from anywhere (%)

the connection string while local would be
server_ip
port 3306
username: username
password password
database = contacts as an example.

Commonly, a restricted user uses three criteria in the connection string to validate.

Have you considered tying
 https://steemit.com/mysql/@uzairk/how-to-install-mysql-server-in-android-phone

This will have mysql running directly on your phone without your developer's access.


Why re-envent the wheel, there are several contact manager web apps open source.

https://sourceforge.net/projects/webcontactmanag/
Thanks for this comment @CEHJ
Is that for when your Google Contacts breaks? ;) 

Google Contacts is fantastic until you need more functionality such as a table view that you can sort and filter the way that you want to, or until you need things like the date a contact was entered, a way to prioritize each contact, or a unique ID field for the contact, etc.

I definitely don't want to introduce security issues by accessing the database directly on my phone if that's a problem. or let my developer in at all.

I can definitely see the value in not re-inventing the wheel also except that I have so far felt like that was my only alternative here based on what I have seen from Google so thank you @arnold for the link that you sent regarding this potential solution as well.

I really appreciate all the comments here.


Google Contacts is fantastic until you need more functionality such as a table view that you can sort and filter the way that you want to, or until you need things like the date a contact was entered, a way to prioritize each contact, or a unique ID field for the contact, etc.
Yes, i see.
My 'easiest option' solution is to use PhpMyAdmin. I've given you the equivalent as a suggestion
As an alternative, if you have the jetbrains suite, then you do have DataGrip as an alternative option.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.