Howt o findy our server ip nwn9/21/2023 ![]() ![]() On youre local windwos machine, where 123.123.123.123 is the IP Adress of your DigitalOcean Server. To check if you can access your remote sql server try If you're local host is not granted you get error 1130.(2003, "Can't connect to MySQL server on 'my_hostname' (61)") If you connect to an address that does not exist or the mysql/mariadb instance is not running you get errorcode 2003.'.Your local IP should be a static IP, otherwise you have allways change ip or use a dynDNS like Service. It's good practice not to grant all privileges for remote users (scripts) GRANT SELECT,DELETE,INSERT,UPDATE ON tablename.* TO FLUSH PRIVILEGES Have you granted your client in the Database? Digital Ocean HowTo for this Can you connect from your local OS to your remote Database?.Similar question have already been asked here. The ip address 00.000.000.000 is Starbucks ip address where I am working on this project right now.I got a message like this: Query OK, 0 rows affected, 1 warning (0.03 sec)Īfter that I tried to connect in python on my local window python.And it didn't work and got this python error: OperationalError: (2003, "Can't connect to MySQL server on '000.000.000.0' (10061)") rows = c.fetchall()įor Granting I used following code: GRANT ALL ON nwn.* TO IDENTIFIED BY 'new_password' Here I just want to see what's in the "practice" table that I have made in the database. "password" is the password for the server as well as for the mysql.Īnd then the name of the database I want to connect to. "000.000.000.0" is the server that I rent and it is a linux server. ![]() I tried to connect to my linux server by using this MySQLdb in python, but it could not connect to the server.įor granting other ip addresses from which I am connect to the mysql server, should I do it whenever my ip address changes? for example, when I work at home I need to grant my home internet ip, and when I work other places do I need to grant that ip addresses?Īnyway, I tried granting to the ip address where I am connecting to the internet, but even after the granting I cannot access to the mysql server.4Ĭonn = nnect("000.000.000.0", "root", "password", "name of database") I know I need to use MySQLdb library in python to do this. ![]() So in the coding, I need to connect to my linux server in order to feed/get the data to/from the linux MySQL server. Problem is that I am coding not in the linux server environment but in my local computer python(personal Windows 10(not a server)). I have a linux ubuntu server that I rent from DigitalOcean for storing streaming real time data in MySQL by coding with python. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |