Solved Azruiom DB connection

Welcome to our Community
Wanting to join the rest of our members? Feel free to sign up today.
Sign up
Status
Not open for further replies.

Xenus

Premium
Premium
Joined
Jun 15, 2024
Messages
62
Reaction score
26
Points
18
Hello to you! I come to you because I would like to connect my database from a VPS (sql server), to another VPS where my website + domains etc. is located, how I could do it, because when I do it it gives me this :
1723901774311.png
Thanks for your replys !
Beacause i wan't to use 2 different VPS for security and for some reason ^^

Odbc already connected to DB, and xampp already installed change made in xampp is for
Hey There!
Please login and(or) register to see this awesome content today.
Etc..
 
Last edited:
Solution
Here's one of your issues not sure if this fully fixes it but yeah:
Hey There!
Please login and(or) register to see this awesome content today.

Should be:
Hey There!
Please login and(or) register to see this awesome content today.

extension=odbc
extension=pdo_odbc

Normal ODBC has to be enabled not just sqlsrv.
Few things to check :

Is the server name correct ?
Is the instance name correct ?
Is the database VPS reachable ? (Resolving correctly through the DNS / Ping return something etc)
Is there a firewall active on the database VPS ? If yes, be sure to allow UDP connection on SQL Server default port (or the port you use)

If none of the above work or if everything is well configured :

Double check on the Services that both SQL Server Agent & SQL Server Browser are running. For that : Start menu -> Admin tools -> Services. Once these services found, right click -> properties and verify if they start automatically or not. If they do not start automatically chose this option and you should be good to go.
 
Is the server name correct ?
Is the instance name correct ?
Is the database VPS reachable ? (Resolving correctly through the DNS / Ping return something etc)
For that yes Im gonna look fore the firewall Thanks for the reply !

Update : All tested things but not working
 
Last edited:
Make sure you have enabled the SQL port and forwarded it on the server the database is on.

This info could possibly help.

To allow remote connections to a Microsoft SQL Server (MSSQL) instance, you need to configure the SQL Server to accept remote connections. This involves several steps:

  1. Enable TCP/IP Protocol:
    • Open the SQL Server Configuration Manager on the SQL Server machine.
    • Navigate to SQL Server Network Configuration.
    • Under Protocols for [Your SQL Server Instance], make sure TCP/IP is enabled. If it's not enabled, right-click it and choose "Enable."
  2. Specify TCP/IP Port (If using a custom port):
    • If your SQL Server instance is configured to use a custom port, you should specify the port number.
    • Under the TCP/IP properties, go to the "IP Addresses" tab, and under "IPAll," enter the desired port number in the "TCP Port" field.
  3. Restart SQL Server Service:
    • After making these changes, restart the SQL Server service to apply the configuration changes.
  4. Configure Firewall Rules:
    • Ensure that your firewall allows incoming connections to the SQL Server. By default, SQL Server uses port 1433 for TCP/IP connections. If you specified a custom port, allow traffic on that port.
    • Create an inbound rule in your firewall settings to allow incoming connections on the chosen port.
  5. Enable Remote Connections:
    • In SQL Server Management Studio, connect to your SQL Server instance.
    • Right-click the server in Object Explorer, and select "Properties."
    • Under the "Connections" tab, check the box that says "Allow remote connections to this server."
  6. Restart SQL Server Service Again:
    • After enabling remote connections, it's a good practice to restart the SQL Server service once more to ensure that the changes take effect.
  7. Check IP Whitelisting or Authentication:
    • Ensure that your SQL Server authentication mode is set to either "Windows Authentication" or "Mixed Mode" (SQL Server and Windows Authentication).
    • If using SQL Server Authentication, make sure the login credentials are correct.
  8. Network Configuration:
    • Verify that your network infrastructure (routers, switches, VPNs) allows traffic between the client machine and the SQL Server machine on the specified port.
  9. Test Remote Connection:
    • Use a client tool or application to test the remote connection. For example, you can use SQL Server Management Studio from a remote computer to connect to the SQL Server instance.
  10. Security Considerations:
    • Be aware of the security implications of allowing remote connections. Ensure that strong authentication and authorization mechanisms are in place.
After completing these steps, your SQL Server instance should be configured to accept remote connections. Remember to follow best practices for security, such as using strong passwords, keeping the server up to date with patches, and applying firewall rules selectively to trusted IP addresses if possible.
 
Hello to you! I come to you because I would like to connect my database from a VPS (sql server), to another VPS where my website + domains etc. is located, how I could do it, because when I do it it gives me this :
View attachment 465
Thanks for your replys !
Beacause i wan't to use 2 different VPS for security and for some reason ^^

Odbc already connected to DB, and xampp already installed change made in xampp is for
Hey There!
Please login and(or) register to see this awesome content today.
Etc..
What xampp are you using? Is it ours, is it from the xampp site or? If so what version from there website?

Can i also see your php.ini?
 
Here's one of your issues not sure if this fully fixes it but yeah:
Hey There!
Please login and(or) register to see this awesome content today.

Should be:
Hey There!
Please login and(or) register to see this awesome content today.

extension=odbc
extension=pdo_odbc

Normal ODBC has to be enabled not just sqlsrv.
 
Solution
Here's one of your issues not sure if this fully fixes it but yeah:
Hey There!
Please login and(or) register to see this awesome content today.

Should be:
Hey There!
Please login and(or) register to see this awesome content today.

extension=odbc
extension=pdo_odbc

Normal ODBC has to be enabled not just sqlsrv.
Ok I will try ! Thx 1723923614626.png
I've made the change who Poreotix say, but have this error

I use the SQl Server auth
 
Last edited:
in ServerName setting in your config, idk the layout of your config file so names might vary. Try using 'IP of server , SQL Port' instead of server name.

$serverName = ' Database IP , SQL Port' ; // Specify both the IP address and port
$username = 'sa' // Replace with your SQL Server username
$password = 'SQL PASS'; // Replace with your SQL Server password
 
You can close this not fixed yet, but gonna try some another thing!

Thanks all for the replys !
 
You can close this not fixed yet, but gonna try some another thing!

Thanks all for the replys !
The thread is closed. Please reach me through PM once you figure it out so I can mark a solution for this issue to help others in the future. 🙏
 
  • Like
Reactions: Xenus
Status
Not open for further replies.