Jump to content

MySQL connection problem


Khaled Abdullah

Recommended Posts

Posted

Hello,

We have problem in the game when connect to database not accept and appear this error

" ERROR:dbConnect failed; Could not connect [string "return dbConnect ("mysql",dbname=wmisc_W..."]"

we have latest mysql verson on cpanel/whm server

linux 64bit Centos

this is code info

srun dbConnect ( "mysql", "dbname=RDFGR_T;host=127.0.0.1", "RDFGR_TDGWR", "PASSWORD" )

We tried change the host to

host=localhost

and also the real IP to the server and not working

And i test the mysql and same database from php script and working good but in the game not working

Please how can solve this issue ?

Thanks

Posted

Is your game server running on the same server as the MySQL server? Sometimes hosting companies block external MySQL connections (usually always) and it might be the reason for not being able to connect. However, using the runcode-resource for connecting to database is not a good idea, at least that's my own personal opinion. You should create a Lua file and connect to database there. Then make an exported function for returning the database connection so you can use it outside of the resource as well.

Posted

MySQL is already on the same server that has the games:

But I never Broken

Where it work Cęlem when you try to connect from two

But I cant contact through the game

Nor I've tried Halolo a lot and I was not working

 This error appears

ERROR: dbConnect failed; Could not connect [string "return dbConnect (" mysql ", dbname = FER_TR ..."]

  • MTA Team
Posted

MySQL doesn't have networking enabled by default.

I think you have to comment the line skip-networking in my.cnf, like this:

# skip-networking 

Posted
MySQL doesn't have networking enabled by default.

I think you have to comment the line skip-networking in my.cnf, like this:

# skip-networking 

Did not work

I have tried

Do you connect to the database you need certain files

I tried all the methods did not work

  • 1 month later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...