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 232459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:01:10+00:00 2026-05-11T20:01:10+00:00

I have a VPS and I want to make mysql DB accept connection externally

  • 0

I have a VPS and I want to make mysql DB accept connection externally (from my PC for instance). I have Debian Linux installed on the server. I checked some tutorials online and they said to comment out:

bind-address          = 127.0.0.1

But this didn’t seem to help! is there anything specific for VPSs? or Am I missing something else? The command that runs mysql is:

/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
  • 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-05-11T20:01:10+00:00Added an answer on May 11, 2026 at 8:01 pm

    The MySQL server must be configured to accept connections externally (binding to the correct network interface as appropriate), and its firewall must be configured to allow incoming connections on that port (TCP port 3306). This may or may not already be set up when you installed MySQL (see iptables if you’re on *nix).

    You must also account for this in the MySQL permissions as follows.

    Often, when setting up your MySQL permissions, you’ll set user access rights only for @’localhost’. You’ll need to make sure that both the user account and its granted permissions are set for the appropriate hostname or IP address you will be connecting from. For example, you could create a new authorised user with:

    GRANT ALL PRIVILEGES ON somedatabase.* TO someuser@'somehostname' IDENTIFIED BY 'password';
    FLUSH PRIVILEGES;
    

    You have to do all of this before you can connect to that server remotely, using something like this (this example uses PHP):

    mysql_connect('mysqlservername', 'someuser', 'password');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed the MySQL Server on my VPS Server. Then, I want to
I have a VPS Linux webserver with PHP installed. I want to code some
I have a VPS (Debian, Apache, MySQL, PHP) I want to force the encoding
I installed PHP's Mailparse extension (PECL) onto my VPS. Now I want to make
I have a VPS hosted server with Windows Server 2003 on which I installed
I have django+python+apache2+mod_python installed hosted and working on ubuntu server/ linode VPS. php5 is
I have a server (VPS) that hosts numerous PHP / MySQL websites. Most are
I have a VPS with Dreamhost but the mySQL server is shared. I really
I have bought a VPS server with 2GB of RAM and Debian x64. When
I've hired a new VPS and have root access. Now i want to configure

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.