Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8245969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:21:20+00:00 2026-06-07T22:21:20+00:00

So I started looking into node-mysql since my entire site is built with PHP,

  • 0

So I started looking into node-mysql since my entire site is built with PHP, but I’d like to use node/socket.io for smooth asynchronous user-end updates. However there is one issue I’m seeing with node-mysql which I haven’t quite gotten an answer yet. How is the login information for the mysql server not public information?

according to the documentation https://github.com/felixge/node-mysql you connect to the database like so

var mysql      = require('mysql');
var connection = mysql.createConnection({
  host     : 'localhost',
  user     : 'me',
  password : 'secret',
});

connection.connect();

connection.query('SELECT 1', function(err, rows, fields) {
  if (err) throw err;

  console.log('Query result: ', rows);
});

connection.end();

So what’s stopping a user from just plopping the server file into their navigation bar and viewing the login information for the mysql server? I’m extremely confused by this, could someone please explain it to me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T22:21:21+00:00Added an answer on June 7, 2026 at 10:21 pm

    Node.js is server-side JavaScript. You would place those files in a similar place that you place your PHP files, and not in a publicly accessible location.

    You run your Node application, which serves up the public HTML/CSS/JS files you want (or alternatively, serialized data such as that in JSON form).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started looking into the use of jQuery UI. What I would like
I have just started looking into .net MVC and I really like it. There
I started looking into CSS more deeply and decided I would like to convert
I've just started looking into Amazon's DynamoDB. Obviously the scalability appeals, but I'm trying
I've started looking into using Knockout for my team's use; I've been very pleased
I have recently started looking into using Azure but I'm having some issues getting
I have recently started looking into Google Charts API for possible use within the
I just started looking into jQuery yesterday, before this I programmed in only PHP.
I'm a Java/.NET developer but on my spare time I've started looking into WordPress
i literally just started looking into php, connecting to a remote database and returning

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.