Conecting to MySQL
Hello folks, trying to connect to MYSQL it appears the error msg below: InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (111 Connection refused) [image: conexao.png] How can i fix that.? thanks in advance Guilherme Campos Belo Horizonte - MG -- https://mail.python.org/mailman/listinfo/python-list
Re: Parallel(?) programming with python
On Mon, 8 Aug 2022 19:39:27 +0200, Andreas Croci declaimed the following: > >Do you mean queues in the sense of deque (the data structure)? I ask >because I can see the advantage there when I try to pop data from the >front of it, but I don't see the sense of the following statement ("than Most likely this was a reference to the Queue module -- which is used to pass data from one thread to another. Your "fetch" thread would package up the "new" data to be processed by the FFT thread. The FFT thread is blocked waiting for data to appear on the queue -- when it appears, the FFT thread reads the entire packet of data and proceeds to process it. Note that in this scheme, the FFT thread is NOT on a timer -- the fetch thread controls the timing by when it puts data into the queue. cf: https://docs.python.org/3/library/threading.html https://docs.python.org/3/library/queue.html > >That would obviusly save some coding (but would introduce the need to >code the interaction with the database), but I'm not sure it would speed >up the thing. Would the RDBMS allow to read a table while something else >is writing to it? I doubt it and I'm not sure it doesn't flush the cache >before letting you read, which would include a normally slow disk access. > Depends upon the RDBMs. Some are "multi-version concurrency" -- they snapshot the data at the time of the read, while letting new writes proceed. But if one is doing read/modify/write, this can cause a problem as the RDBM will detect that a record was modified by someone else and prevent you from changing it -- you have to reselect the data to get the current version. You will want to treat each of your network fetches as a transaction -- and close the transaction fast. Your FFT process would need to select all data in the range to be processed, and load it into memory so you can free that transaction https://www.sqlite.org/lockingv3.html See section 3.0 and section 5.0 -- Wulfraed Dennis Lee Bieber AF6VN wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/ -- https://mail.python.org/mailman/listinfo/python-list
Re: Conecting to MySQL
Hi, On Tue, Aug 9, 2022 at 9:07 AM Guilherme Campos wrote: > > Hello folks, > > trying to connect to MYSQL it appears the error msg below: > InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' > (111 Connection refused) > [image: conexao.png] > How can i fix that.? What do you use for connection? Does the firewall interfere with the connection? Thank you. > > thanks in advance > > Guilherme Campos > Belo Horizonte - MG > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: Conecting to MySQL
Igor, firewall was disable... Em ter., 9 de ago. de 2022 às 11:18, Igor Korot escreveu: > Hi, > > On Tue, Aug 9, 2022 at 9:07 AM Guilherme Campos > wrote: > > > > Hello folks, > > > > trying to connect to MYSQL it appears the error msg below: > > InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' > > (111 Connection refused) > > [image: conexao.png] > > How can i fix that.? > > What do you use for connection? > Does the firewall interfere with the connection? > > Thank you. > > > > > thanks in advance > > > > Guilherme Campos > > Belo Horizonte - MG > > -- > > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Re: Conecting to MySQL
trying to connect to MYSQL it appears the error msg below: InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (111 Connection refused) [image: conexao.png] How can i fix that.? What do you use for connection? Does the firewall interfere with the connection? Firewall usually causes connection to hang and timeout with no response. But in this case connection looks immediately refused which means either port number is wrong or mysql is not listening on 127.0.0.1. Axy -- https://mail.python.org/mailman/listinfo/python-list
Re: Conecting to MySQL
Hi, @OP, Can you try to connect with mysql-workbench? Also - you didn't answer my first question. Are you using an ODBC wrapper or python module? Thank you. On Tue, Aug 9, 2022 at 10:27 AM Axy wrote: > > > >> trying to connect to MYSQL it appears the error msg below: > >> InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' > >> (111 Connection refused) > >> [image: conexao.png] > >> How can i fix that.? > > What do you use for connection? > > Does the firewall interfere with the connection? > > Firewall usually causes connection to hang and timeout with no response. > > But in this case connection looks immediately refused which means either > port number is wrong or mysql is not listening on 127.0.0.1. > > > Axy > -- https://mail.python.org/mailman/listinfo/python-list
Re: Conecting to MySQL
Hi Igor, Accessing mysql-workbench it appeared new error messages when I clicked Server Status. I created my database on MySQL Workbench . Is that your question? [image: image.png] [image: image.png] Em ter., 9 de ago. de 2022 às 12:36, Igor Korot escreveu: > Hi, > @OP, > Can you try to connect with mysql-workbench? > Also - you didn't answer my first question. > > Are you using an ODBC wrapper or python module? > > Thank you. > > > On Tue, Aug 9, 2022 at 10:27 AM Axy wrote: > > > > > > >> trying to connect to MYSQL it appears the error msg below: > > >> InterfaceError: 2003: Can't connect to MySQL server on > 'localhost:3306' > > >> (111 Connection refused) > > >> [image: conexao.png] > > >> How can i fix that.? > > > What do you use for connection? > > > Does the firewall interfere with the connection? > > > > Firewall usually causes connection to hang and timeout with no response. > > > > But in this case connection looks immediately refused which means either > > port number is wrong or mysql is not listening on 127.0.0.1. > > > > > > Axy > > > -- https://mail.python.org/mailman/listinfo/python-list
RE: Parallel(?) programming with python
Why would this application *require* parallel programming? This could be done in one, single thread program. Call time to get time and save it as start_time. Keep a count of the number of 6 hour intervals, initialize it to 0. Once a second read data an append to list. At 6 hours after start time, call a function that does an FFT (see comment about scipy below) and increment the count of 6 hour intervals. Call time and save new start time. Continue execution. After 28 six hour intervals, save the list and then slice the list to shorten it as you want. Reset the count of 6 hour intervals to zero. The FFT might take a second, even if you use scipy, depending on how long the list is (If you don’t know about numpy and scipy, look them up! You need them. Your list can be an array in numpy). Saving and slicing the list should take less than a second. This single thread approach avoids thinking about multiprocessing, locking and unlocking data structures, all that stuff that does not contribute to the goal of the program. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Andreas Croci Sent: Monday, August 8, 2022 6:47 AM To: python-list@python.org Subject: Parallel(?) programming with python tI would like to write a program, that reads from the network a fixed amount of bytes and appends them to a list. This should happen once a second. Another part of the program should take the list, as it has been filled so far, every 6 hours or so, and do some computations on the data (a FFT). Every so often (say once a week) the list should be saved to a file, shorthened in the front by so many items, and filled further with the data coming fom the network. After the first saving of the whole list, only the new part (the data that have come since the last saving) should be appended to the file. A timestamp is in the data, so it's easy to say what is new and what was already there. I'm not sure how to do this properly: can I write a part of a program that keeps doing its job (appending data to the list once every second) while another part computes something on the data of the same list, ignoring the new data being written? Basically the question boils down to wether it is possible to have parts of a program (could be functions) that keep doing their job while other parts do something else on the same data, and what is the best way to do this. -- https://mail.python.org/mailman/listinfo/python-list
Re: Conecting to MySQL
Yes, exactly that .. I replied from different account and my email was rejected. Just make sure that your mysql is actually running. Depending on your OS, run netstat -an | grep 3306 and this will tell you whether socket is actually in listening mode or not. If it's not, your mysql is either not running or you have a problem with the configuration. On Tue, Aug 09, 2022 at 08:27:16AM -0700, Axy via Python-list wrote: trying to connect to MYSQL it appears the error msg below: InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (111 Connection refused) [image: conexao.png] How can i fix that.? What do you use for connection? Does the firewall interfere with the connection? Firewall usually causes connection to hang and timeout with no response. But in this case connection looks immediately refused which means either port number is wrong or mysql is not listening on 127.0.0.1. Axy -- https://mail.python.org/mailman/listinfo/python-list -- Daniel Ciprus .:|:.:|:. [ curl -L http://git.io/unix ] signature.asc Description: PGP signature -- https://mail.python.org/mailman/listinfo/python-list
Re: Conecting to MySQL
I'm not sure about this but this mailing list does not allow attachments ... On Tue, Aug 09, 2022 at 12:45:33PM -0300, Guilherme Campos wrote: Hi Igor, Accessing mysql-workbench it appeared new error messages when I clicked Server Status. I created my database on MySQL Workbench . Is that your question? [image: image.png] [image: image.png] Em ter., 9 de ago. de 2022 às 12:36, Igor Korot escreveu: Hi, @OP, Can you try to connect with mysql-workbench? Also - you didn't answer my first question. Are you using an ODBC wrapper or python module? Thank you. On Tue, Aug 9, 2022 at 10:27 AM Axy wrote: > > > >> trying to connect to MYSQL it appears the error msg below: > >> InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' > >> (111 Connection refused) > >> [image: conexao.png] > >> How can i fix that.? > > What do you use for connection? > > Does the firewall interfere with the connection? > > Firewall usually causes connection to hang and timeout with no response. > > But in this case connection looks immediately refused which means either > port number is wrong or mysql is not listening on 127.0.0.1. > > > Axy > -- https://mail.python.org/mailman/listinfo/python-list -- Daniel Ciprus .:|:.:|:. CONSULTING ENGINEER.CUSTOMER DELIVERY Cisco Systems Inc. dcip...@cisco.com tel: +1-703-484-0205 mob: +1-540-223-7098 [ curl -L http://git.io/unix ] signature.asc Description: PGP signature -- https://mail.python.org/mailman/listinfo/python-list