Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PuscasuRobert opened this issue Jan 31, 2023 · 0 comments
Open

Comments

@PuscasuRobert
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant