Raised This Month: $ Target: $400
 0% 

SQL Admin Setup


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kooch
Junior Member
Join Date: May 2008
Old 06-06-2008 , 08:21   SQL Admin Setup
Reply With Quote #1

I'm trying to get SQL Admin setup with SourceMod 1.02 and cant get it to connect to my MySql DB on a remote server.

My Databases.cfg is as follows:

"Databases"
{
"driver_default" "mysql"

"default"
{
"driver" "default"
"host" "localhost"
"database" "sourcemod"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}


"Admins"
{
"driver" "mysql"
"host" "1.1.1.1"
"database" "admindb"
"user" "user"
"pass" "password"
//"timeout" "0"
"port" "3306"
}


"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}
}

I substitute the appropriate username, password, and ip for the remote server where necessary. But when I run sm_create_adm_tables from HLSW I get "Could not connect to database: [2002]: Cant connect to local MySql server through socket '/tmp/mysql.sock' (2)" On the remote host I granted my gameserver IP as a host to the DB to ensure it could communicate without issue, and granted the user All Privileges to the DB. Any help is appreciated.
kooch is offline
MoggieX
Veteran Member
Join Date: Aug 2007
Location: n00bville
Old 06-07-2008 , 10:49   Re: SQL Admin Setup
Reply With Quote #2

Try changing

PHP Code:
"driver_default" "mysql" 
To

PHP Code:
"driver_default" "Admins" 
And try again.

Matt
__________________
MoggieX is offline
Send a message via Skype™ to MoggieX
kooch
Junior Member
Join Date: May 2008
Old 06-07-2008 , 17:54   Re: SQL Admin Setup
Reply With Quote #3

Nope. Still can't connect.
kooch is offline
MoggieX
Veteran Member
Join Date: Aug 2007
Location: n00bville
Old 06-08-2008 , 04:56   Re: SQL Admin Setup
Reply With Quote #4

Quote:
Originally Posted by kooch View Post
Nope. Still can't connect.
Hmmm... what I quoted before was a load of *****ks.

This is what I would do..

Ask the provider to allow the database user to accept connections from any IP (%) for a short while, then use an application such as NaviCat (see Lite version http://www.navicat.com/download.html here ) and confirm the details work (new connection in the top menu, enter details and press Test).

Once happy that they are valid, scrap the "Admins" section and stick wit the default connection data and try again.

If you have phpMyAdmin access, run the .sql script through that, if not use the NaviCat application.

Once you have done this, add/change to a different config as required and try again.

Then once happy, let your provider know and try again with the restricted IP access to the database.

Also take a few minutes to read this:
http://wiki.alliedmods.net/SQL_Admin...ceMod%29#MySQL

SQL Admins works, we use it as we have so many members and would not be able to cope without it!

Matt
__________________
MoggieX is offline
Send a message via Skype™ to MoggieX
Reply



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

Forum Jump


All times are GMT -4. The time now is 15:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode