PiggyArchive / PiggyAuth

Safe & feature-rich auth plugin. Project has been discontinued
Apache License 2.0
33 stars 8 forks source link

Error when trying to connect to MySQL (Error in your code!!!) #54

Closed PluginBOXone closed 7 years ago

PluginBOXone commented 7 years ago

DO NOT REMOVE THIS

Please make sure your issue complies with these guidelines:

General

I am using MySQL as Database! And PiggyAuth cant connet because of this: Warning: mysqli::__construct(): (HY000/1130): Host '(MyIpbutIdontSayItxD)' is not allowed to connect to this MySQL server in /-----/-------/plugins/PiggyAuth-master/src/PiggyAuth/Databases/MySQL.php on line 19

Warning: mysqli::query(): Couldn't fetch mysqli in /-----/------/plugins/PiggyAuth-master/src/PiggyAuth/Databases/MySQL.php on line 23

Server Software:

Tesseract, PMMP

Version of PiggyAuth:

PiggyAuth version 3.0.0.07

Data Provider:

Steps to Reproduce the Issue

I get this error in the console when I am starting the Server! But the server isn't crashing 1.

Extra Information

Nope

PluginBOXone commented 7 years ago

And this error is coming too!

CRITICAL> Error: "Call to a member function fetch_assoc() on null" (EXCEPTION) in "/plugins/PiggyAuth-master/src/PiggyAuth/Databases/MySQL" at line 24

SleepSpace9 commented 7 years ago

The message is saying the reason, doesn't it?

...Host '(MyIpbutIdontSayItxD)' is not allowed to connect to this MySQL server...

Check your database permissions, I guess your MySQL server is not hosted on the same machine.

PluginBOXone commented 7 years ago

Yeah.. mySQL is not hosted on the vServer where i host the MCPE Server... so what shuold I do?

SleepSpace9 commented 7 years ago

Grant privileges to your MySQL user with access from your MCPE server. I don't know if you can fully manage your MySQL server by yourself. If yes a mysql command to allow everything for your database user from every remote host (not recommended for production) would be...

GRANT ALL PRIVILEGES ON \<YourDatabaseName>. TO '\<YourDatabaseUser>'@'%' IDENTIFIED BY '\<YourDatabasePassword>*';

PluginBOXone commented 7 years ago

The problem is... every other Plugin CAN connect to the MySQL Database and only PiggyAuth not :( And i filled in the same things ...

PluginBOXone commented 7 years ago

Oh man.... I'm a dump ***.... wrote in the false IP xD

PluginBOXone commented 7 years ago

Now PiggyAuth can connect but this is happening (When i am joining the Server I have to register.... when i am rejoining i have to register again .. and again.... Console Output:

CRITICAL> Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/PiggyAuth-master/src/PiggyAuth/Databases/MySQL" at line 24

DaPigGuy commented 7 years ago

This bug was caused by the fact that the table was empty.