Python connect to remote MySQL server

preview_player
Показать описание
I'm very sorry for the audio! I don't know what happened and how did it happen!

This is a tutorial to connect to a remote MySQL server from a python script.

What you need to do:
1. install the package using either

“pip install pymysql”
or
“conda install pymysql”

port=3306,
user='user',
password='password',
db='db_name',
charset='utf8mb4',

This is tested using python 3.7 and Bluehost MySQL database but should work for any other hosted MySQL databases.

Thank you for watching!

Please consider subscribing!
Рекомендации по теме
Комментарии
Автор

THANK YOU, THANK YOU SO MUCH. You really helped me get back on track. with my project. I spent 3 days trying to achieve this. Asked questions on Stack Overflow, still didn't get an answer that solved my problem. Checked the documentation so many times, and downloaded so many softwares because someone on stack overflow suggested to do so. NOTHING WORKED. I didn't expect anything from youtube when I didn't get any answer from stack overflow itself. I finally came to youtube as a last resort. I saw ur video and tried it. With some modifications, it worked. I CRIED. THANKS SO MUCH FOR THIS TUTORIAL.

veerajaveeraesh
Автор

I’m glad to hear it works for you! 🙌 Is there anything else you might want me to cover?

computinghangout
Автор

I have mysql database on a vm and i tried to login remotely with my pc but this code is not working. Do you have any solution for this

gulshankumar-ljel
Автор

I need to connect to remote SQL SERVER located on windows server 2019 using python.
I tried out pyodbc, paramiko connections. But no luck. could you please help me with this ?

surendarsakthivel
Автор

How would this be done for another computer on the same network

jacquesfrancois
Автор

i have an error 2003 cannot connect to mysql server on 'localhost'([error111] connection refuse)

another question for the host should we put the hostname of the server iam tryig to conected from my windows workbench to my linux python

nariaak
Автор

Hey, i tried that, but i still get this error below
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, "Access denied for user 'user'@'192.168.*.*' (using password: YES)")

What could be the problem?

brucenelm
Автор

I have also tried it but i am getting this error (1130, "Host 'xx.x.98.244' is not allowed to connect to this MariaDB server")

nishanthm
Автор

Can I retrieve and push data to remote database?

JainmiahSk
Автор

This is the error that I'm getting: pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([WinError 10061] No connection could be made because the target machine actively refused it)")

lastbfree
Автор

Hey, My connection was successfully made. But only when host="localhost". My app running on my local machine, But when I'm running my app on different pc, my app doesn't work :\ How I need to configure the connection that my app will be able to connect the sql from any other pc. I really appreciate that you made a video for this topic and I hope you can help me.

lastbfree
Автор

Nice tutorial!! Can I use MySQLdb to connec to remote MySQL database hosted on GoDaddy?

shashwatsharma
join shbcf.ru