SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 01/11/2019, 09:12 AM   #1
Jeroan
Little Clucker
 
Join Date: Jun 2019
Location: Indonesia.
Posts: 8
Reputation: 0
Default Help me:((

[15:11:47] [SQL] Connection to "127.0.0.1" failed! Please check the connection settings...
[15:11:47] South Central Roleplay

Anyone can help me to fix it?
Jeroan is offline   Reply With Quote
Old 01/11/2019, 12:04 PM   #2
Jstylezzz
High-roller
 
Jstylezzz's Avatar
 
Join Date: Sep 2011
Location: Netherlands
Posts: 1,859
Reputation: 1571
Default Re: Help me:((

Few things to consider:

* Is the MySQL server on this machine running? If yes, are the credentials you are using in your game mode correct?
* If the MySQL server is not located on this machine, are you sure you've filled in the correct SQL host (since it's currently trying to connect to the SQL server on the local machine).
Jstylezzz is offline   Reply With Quote
Old 01/11/2019, 12:11 PM   #3
Fuzzy
Big Clucker
 
Join Date: May 2019
Posts: 84
Reputation: 0
Default Re: Help me:((

You need to fix the MySQL info inside the script.
#define SQL_HOSTNAME "127.0.0.1" // Depends on your host!
#define SQL_USERNAME "(Your SQL username)"
#define SQL_DATABASE "(Your SQL Database name)"
#define SQL_PASSWORD "(Your SQL password)"
__________________
My Releases:
Tutorial:
Gamemode:
Fuzzy is offline   Reply With Quote
Old 01/11/2019, 12:24 PM   #4
Proxus
Huge Clucker
 
Proxus's Avatar
 
Join Date: May 2018
Location: United Kingdom
Posts: 353
Reputation: 13
Default Re: Help me:((

Quote:
Originally Posted by Fuzzy View Post
You need to fix the MySQL info inside the script.
#define SQL_HOSTNAME "127.0.0.1" // Depends on your host!
#define SQL_USERNAME "(Your SQL username)"
#define SQL_DATABASE "(Your SQL Database name)"
#define SQL_PASSWORD "(Your SQL password)"
This ^. Also, if you're using MySQL and you're hosting it locally, I recommend XAMPP. This allows you to run MySQL on 127.0.0.1 (as well as other things in your htdocs).

Relevant sources:
https://forum.sa-mp.com/showthread.php?t=644891 - connecting MySQL to SAMP
https://forum.sa-mp.com/showthread.php?t=38561 - using XAMPP
__________________
Developer @ Trucknation
Administrator & Developer @ Lost Legacy
"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity"


IMPORTANT LINKS
Proxus is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 09:40 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.