Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to make database connection

Status
Not open for further replies.

jab99407

Member
I have one doubt that needs to clear

Assume I have two window computer's A and B, both are connected in same network. MSSQL database is installed on computer A. I know the creadentional of database

Can I store the data in the database of computer A from computer B?

I think It is possible and I need to install driver on computer B

Do you have any idea, How to make connection and do the simple test for verification using python ?
 
I've only ever done it using MYSQL, PHP and a webserver, so essentially accessing it as if it was a remote Internet database - and in fact while I used to set up a home computer just to do that, I now just do it on my external webspace which includes PHP etc.

But a simple google search instantly clears your query:

 
I've only ever done it using MYSQL, PHP and a webserver, so essentially accessing it as if it was a remote Internet database - and in fact while I used to set up a home computer just to do that, I now just do it on my external webspace which includes PHP etc.

But a simple google search instantly clears your query:


Thank you

Python:
import mysql.connector

mydb = mysql.connector.connect(
  host="192.168.45.5",
  user="simple",
  password="Samy@123",
  database = "test"
)

print(mydb)

I tried to connect but I get error and I thinks it's problem of privilage

I gone through following links

https://stackoverflow.com/questions/14779104/mysql-how-to-allow-remote-connection-to-mysql

I don't find file my.ini in mysql 8
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top