drkostas / Youtube-FirstCommentBot

A bot that post the first comment on every new video of specified channels.
MIT License
206 stars 29 forks source link

Mysql tries to connect to port 3306 no matter what changes i make #9

Open PuscasuRobert opened 1 year ago

PuscasuRobert commented 1 year ago

I followed your instructions except the part where you set up a amazon database. I used Xampp instead. It uses a MySql database. I entered the bash command into the python console, i entered the "conda activate youbot" command and then i entered your run command "python youbot/run.py -c confs/commenter.yml -l logs/commenter.log -m commenter" and i got the following error. I tried to change the port in the python files, i tired to change the port in the Xampp ini file, i tried to change the port the the commenter.yml file but the error didnt change. The app tries to connect to port 3306 ALWAYS.

This is the full error that i get( it looks like i copied the error twice but no, once the text color is white and the other time is yellow):

2023-01-31 21:25:24 FancyLogger INFO Logger is set. Log file path: /mnt/c/Youtube-FirstCommentBot-master/logs/commenter.log Configuration file loaded successfully from path: /mnt/c/Youtube-FirstCommentBot-master/confs/commenter.yml Configuration Tag: commenter {'config': {'hostname': '127.0.0.1', 'username': 'root', 'password': 1234, 'db_name': 'dizybooth', 'port': 3308}, 'type': 'mysql'} 2023-01-31 21:25:24 [commenter] Main ERROR 2003: Can't connect to MySQL server on '127.0.0.1:3306' (111 Connection refused) Traceback (most recent call last): File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/mysql/connector/network.py", line 600, in open_connection self.sock.connect(sockaddr) ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "youbot/run.py", line 174, in main() File "youbot/run.py", line 161, in main youtube = YoutubeManager(config=you_conf['config'], File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/youbot-2.0-py3.8.egg/youbot/youtube_utils/youtube_manager.py", line 29, in init self.db = YoutubeMySqlDatastore(config=db_conf['config'], tag=tag) File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/youbot-2.0-py3.8.egg/youbot/yt_mysql.py", line 20, in init super().init(config) File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/high_sql/high_mysql.py", line 25, in init super().init(config) File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/high_sql/abstract_highsql.py", line 16, in init self._connection, self._cursor = self.get_connection(username=config['username'], File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/high_sql/high_mysql.py", line 41, in get_connection connection = mysql_connector.connect( File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/mysql/connector/pooling.py", line 294, in connect return MySQLConnection(*args, kwargs) File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/mysql/connector/connection.py", line 167, in init self.connect(kwargs) File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/mysql/connector/abstracts.py", line 1178, in connect self._open_connection() File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/mysql/connector/connection.py", line 571, in _open_connection self._socket.open_connection() File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/mysql/connector/network.py", line 602, in open_connection raise InterfaceError( mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on '127.0.0.1:3306' (111 Connection refused)

Traceback (most recent call last): File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/mysql/connector/network.py", line 600, in open_connection self.sock.connect(sockaddr) ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "youbot/run.py", line 177, in raise e File "youbot/run.py", line 174, in main() File "youbot/run.py", line 161, in main youtube = YoutubeManager(config=you_conf['config'], File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/youbot-2.0-py3.8.egg/youbot/youtube_utils/youtube_manager.py", line 29, in init self.db = YoutubeMySqlDatastore(config=db_conf['config'], tag=tag) File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/youbot-2.0-py3.8.egg/youbot/yt_mysql.py", line 20, in init super().init(config) File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/high_sql/high_mysql.py", line 25, in init super().init(config) File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/high_sql/abstract_highsql.py", line 16, in init self._connection, self._cursor = self.get_connection(username=config['username'], File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/high_sql/high_mysql.py", line 41, in get_connection connection = mysql_connector.connect( File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/mysql/connector/pooling.py", line 294, in connect return MySQLConnection(*args, kwargs) File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/mysql/connector/connection.py", line 167, in init self.connect(kwargs) File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/mysql/connector/abstracts.py", line 1178, in connect self._open_connection() File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/mysql/connector/connection.py", line 571, in _open_connection self._socket.open_connection() File "/home/andariel97/anaconda3/envs/youbot/lib/python3.8/site-packages/mysql/connector/network.py", line 602, in open_connection raise InterfaceError( mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on '127.0.0.1:3306' (111 Connection refused)