[SOLVED] ERROR [default][pyplanet.core.instance] (1045, "Access denied for user 'pyplanet'@'localhost'

Python 3 Server Controller for Trackmania and Shootmania for script-only modes.

Moderators: TheM, toffe, NADEO

Post Reply
User avatar
o0Julia0o
Posts: 44
Joined: 11 Jul 2020, 15:20

[SOLVED] ERROR [default][pyplanet.core.instance] (1045, "Access denied for user 'pyplanet'@'localhost'

Post by o0Julia0o »

i am using thits turorial https://pypla.net/en/latest/intro/insta ... ndows.html

1. I have set up a mysql-server (no tables in it until yet - i think the pyplanet will do it for me - right!?):



2. I have set up a dedicated server which is working (users can join):

3. I have a problem to start pyplanet and getting this error:

Code: Select all

INFO     [Main][pyplanet.core.management.commands.start] Initiated configuration and environment...
INFO     [Main][pyplanet.core.management.commands.start] -------------------------------[  PyPlanet v0.9.2  ]-------------------------------
INFO     [MainThread][pyplanet.god.process] Starting pool process for 'default'...
ERROR    [default][pyplanet.core.instance] (1045, "Access denied for user 'pyplanet'@'localhost' (using password: YES)")
Traceback (most recent call last):
  File "D:\PyPlanet\env\lib\site-packages\peewee.py", line 3768, in _create_connection
    return self._connect(self.database, **self.connect_kwargs)
  File "D:\PyPlanet\env\lib\site-packages\peewee.py", line 4318, in _connect
    return mysql.connect(db=database, **conn_kwargs)
  File "D:\PyPlanet\env\lib\site-packages\pymysql\__init__.py", line 94, in Connect
    return Connection(*args, **kwargs)
  File "D:\PyPlanet\env\lib\site-packages\pymysql\connections.py", line 327, in __init__
    self.connect()
  File "D:\PyPlanet\env\lib\site-packages\pymysql\connections.py", line 598, in connect
    self._request_authentication()
  File "D:\PyPlanet\env\lib\site-packages\pymysql\connections.py", line 862, in _request_authentication
    auth_packet = self._process_auth(plugin_name, auth_packet)
  File "D:\PyPlanet\env\lib\site-packages\pymysql\connections.py", line 933, in _process_auth
    pkt = self._read_packet()
  File "D:\PyPlanet\env\lib\site-packages\pymysql\connections.py", line 683, in _read_packet
    packet.check_error()
  File "D:\PyPlanet\env\lib\site-packages\pymysql\protocol.py", line 220, in check_error
    err.raise_mysql_exception(self._data)
  File "D:\PyPlanet\env\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, "Access denied for user 'pyplanet'@'localhost' (using password: YES)")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\PyPlanet\env\lib\site-packages\pyplanet\core\instance.py", line 108, in start
    self.loop.run_until_complete(self._start())
  File "d:\system\python\lib\asyncio\base_events.py", line 616, in run_until_complete
    return future.result()
  File "D:\PyPlanet\env\lib\site-packages\pyplanet\core\instance.py", line 162, in _start
    await self.db.connect()                             # Connect and initial state.
  File "D:\PyPlanet\env\lib\site-packages\pyplanet\core\db\database.py", line 82, in connect
    self.engine.connect()
  File "D:\PyPlanet\env\lib\site-packages\peewee.py", line 3738, in connect
    self._local.conn = self._create_connection()
  File "D:\PyPlanet\env\lib\site-packages\peewee.py", line 3768, in _create_connection
    return self._connect(self.database, **self.connect_kwargs)
  File "D:\PyPlanet\env\lib\site-packages\peewee.py", line 3656, in __exit__
    reraise(new_type, new_type(*exc_args), traceback)
  File "D:\PyPlanet\env\lib\site-packages\peewee.py", line 135, in reraise
    raise value.with_traceback(tb)
  File "D:\PyPlanet\env\lib\site-packages\peewee.py", line 3768, in _create_connection
    return self._connect(self.database, **self.connect_kwargs)
  File "D:\PyPlanet\env\lib\site-packages\peewee.py", line 4318, in _connect
    return mysql.connect(db=database, **conn_kwargs)
  File "D:\PyPlanet\env\lib\site-packages\pymysql\__init__.py", line 94, in Connect
    return Connection(*args, **kwargs)
  File "D:\PyPlanet\env\lib\site-packages\pymysql\connections.py", line 327, in __init__
    self.connect()
  File "D:\PyPlanet\env\lib\site-packages\pymysql\connections.py", line 598, in connect
    self._request_authentication()
  File "D:\PyPlanet\env\lib\site-packages\pymysql\connections.py", line 862, in _request_authentication
    auth_packet = self._process_auth(plugin_name, auth_packet)
  File "D:\PyPlanet\env\lib\site-packages\pymysql\connections.py", line 933, in _process_auth
    pkt = self._read_packet()
  File "D:\PyPlanet\env\lib\site-packages\pymysql\connections.py", line 683, in _read_packet
    packet.check_error()
  File "D:\PyPlanet\env\lib\site-packages\pymysql\protocol.py", line 220, in check_error
    err.raise_mysql_exception(self._data)
  File "D:\PyPlanet\env\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)
peewee.OperationalError: (1045, "Access denied for user 'pyplanet'@'localhost' (using password: YES)")
INFO     [default][root] Apps successfully stopped!
CRITICAL [Main][pyplanet.god.pool] The instance 'default' just died. We will not restart!
CRITICAL [Main][pyplanet.god.pool] All instances died. Quitting now...

(env) D:\PyPlanet\Project1>
This is my base.py:


Firewall is deactivated, pc is in dmz(all ports open). What´s the problem here?
Last edited by o0Julia0o on 14 Jul 2020, 22:34, edited 1 time in total.
User avatar
w1lla
Posts: 2287
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: ERROR [default][pyplanet.core.instance] (1045, "Access denied for user 'pyplanet'@'localhost' (using password: YE

Post by w1lla »

Did you make a mysql user or not if you didn't try to mysqladmin or phpmyadmin and create a user.

https://webmasters.stackexchange.com/qu ... -databases
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
User avatar
o0Julia0o
Posts: 44
Joined: 11 Jul 2020, 15:20

Re: ERROR [default][pyplanet.core.instance] (1045, "Access denied for user 'pyplanet'@'localhost' (using password: YE

Post by o0Julia0o »

Thx - no, i didn´t. But i did now:

CREATE USER 'pyplanet'@'localhost' IDENTIFIED VIA mysql_native_password USING '***';GRANT ALL PRIVILEGES ON *.* TO 'pyplanet'@'localhost' REQUIRE NONE WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;GRANT ALL PRIVILEGES ON `pyplanet`.* TO 'pyplanet'@'localhost';

The pw is: YES (as shown in the error from pyplanet, pyplanet seems to await a pw: YES).





I even had created 2 users - one %(all hosts) and one with localhost. But still getting the same error from pyplanet:
User avatar
w1lla
Posts: 2287
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: ERROR [default][pyplanet.core.instance] (1045, "Access denied for user 'pyplanet'@'localhost' (using password: YE

Post by w1lla »

Could you show the User Rights in tabel pyplanet?

otherwise try to edit the password if you changed it in phpmyadmin you also need to change it pyplanet/settings/base.py
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
User avatar
o0Julia0o
Posts: 44
Joined: 11 Jul 2020, 15:20

Re: ERROR [default][pyplanet.core.instance] (1045, "Access denied for user 'pyplanet'@'localhost' (using password: YE

Post by o0Julia0o »

Ah thx! That´s the problem. The password isnd: "YES" as shown in the cmd-field from pyplanet. The password is: "pyplanet".

Now it´s working :)
Post Reply

Return to “PyPlanet”

Who is online

Users browsing this forum: No registered users and 1 guest