Hi everyone.
I am making an application that you need to sign up and login to.
I want to use an online SQL database to store the login information.
I know how to use a local SQL database, but I want to use an online database.
Please help :)

BTW, this is my first post on Daniweb.

Dani AI

Generated

Short version: yes — you can host your login table in an “online” SQL database, but treat the database as a backend resource (not a public-facing endpoint). As points out the connection string contains the server address, but the recommended pattern for a signup/login flow is: a server-side API (HTTPS) that talks to the database, while clients call that API. For cloud services, use private endpoints or firewall rules rather than opening the DB to the Internet. (learn.microsoft.com)

Store credentials correctly: never keep plaintext passwords. Use an adaptive, memory-hard algorithm (Argon2id preferred; scrypt/bcrypt or PBKDF2 for specific constraints), a per-user random salt, and sufficient work parameters. Consider a short-lived “pepper” and rotate it separately from user salts. Example pseudocode (illustrative only):

salt = random_bytes(16)
hash = Argon2id(password, salt, time=2, memory=19*1024, parallelism=1)
store(userId, salt, hash)

Follow OWASP’s Password Storage guidance for parameters and migration strategy. (cheatsheetseries.owasp.org)

Also harden the app layer: use parameterized/prepared statements or ORM APIs to avoid SQL injection; give the DB account only the privileges it needs (least privilege); and keep connection strings/credentials out of client code — use managed identities or a secrets store (Key Vault / Secrets Manager) for production apps. (cheatsheetseries.owasp.org)

Operational tips: enforce TLS for DB connections (don’t skip cert validation), enable logging/monitoring, rotate secrets, use managed backups, and test connectivity from staging before opening any firewall ports. Cloud providers give native options (Key Vault, Secrets Manager) to avoid embedding secrets in code. (learn.microsoft.com)

These steps keep a simple signup/login safe: client → HTTPS API → authenticated/parameterized DB access, secure password hashes, secrets managed server-side, and encrypted network paths.

Recommended Answers

All 2 Replies

Part of any database connection string is the location of the database. If you are using an online or remote database you simply specify the IP address and port number instead of the server name. E.g.

Data Source=190.123.36.12:4333;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

Awesome! Thanks :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.