Jump to content
  • 0

pomoc Prison Sector 47 - MySQL připojení


Troy

Dotaz

Zdravím, potřebuji pomoct s připojením k MySQL databázi v módu Prison Sector 47.
Když napíšu (pravděpodobně) správné údaje do mysql_connect tak po startu serveru mi to vyhodí error:

[MySQL] Error (0): Failed to connect. Access denied for user 'testps'@'localhost' (using password: YES).
[MySQL] Error (0): Failed to connect. Access denied for user 'testps2'@'localhost' (using password: YES).
Nemožno sa pripojiť ku MySQL databáze, server sa vypína...
Number of vehicle models: 3
--- Server Shutting Down.
[MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'testps'@'localhost' (using password: YES).
[MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'testps2'@'localhost' (using password: YES).

Předem díky za odpověď, která mi pomůže.
//EDIT: píšu to podle vzoru:
mysql_connect("127.0.0.1","root","mydatabase","mypass");
a v PWN to mám takto:

    if(mysql_connect("localhost", "testps", "ps47test", "testovaci1") == 0)
    {
   if(mysql_connect("localhost", "testps2", "ps47test2", "testovaci2") == 0)
   {
       print("Nemožno sa pripojiť ku MySQL databáze, server sa vypína...");
       return SendRconCommand("exit");
Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...