Results 1 to 25 of 30
Thread: GameCP connection problems
-
12-10-2013, 02:46 PM #1Junior Guru
- Join Date
- Nov 2013
- Posts
- 182
GameCP connection problems
So installed GameCP. During installation, used localhost and a SQL user / database that I had setup. Now I've added a machine to game CP and and it asks me to copypasta a command into SSH.
I get this back
(ctrl+c to cancel)Access denied for user 'X_cpuser'@'localhost' (using password: YES)
If I use the root SQL username and password it accepts that, but then under GameCP I get a "unable to connect to the remote" error.
Any ideas what I'm doing wrong? GameCP is installed on the machine so it and the remote should be using the same public IP.Last edited by A Goat; 12-10-2013 at 02:50 PM.
-
12-10-2013, 04:45 PM #2Temporarily Suspended
- Join Date
- Nov 2013
- Posts
- 97
Hi,
did you created the permissions for the user X-cpuser into the database? Also you have to have the permissions set for the correct source ip or use '%' for any.
-
12-10-2013, 06:02 PM #3Junior Guru
- Join Date
- Apr 2006
- Location
- Charleston, SC
- Posts
- 178
Best way to get help for this is to go over and talk to William on his IRC server, he can probably help you out.
-
12-11-2013, 05:01 AM #4Junior Guru
- Join Date
- Nov 2013
- Posts
- 182
The GameCP instructions aren't clear. I created the database and added the user with full permissions under MySQL® Database Wizard in cPanel. I assume something different needs to be done in SSH but like I said it doesn't tell you where or how to setup this unlike TCAdmin.
-
12-11-2013, 05:04 AM #5Temporarily Suspended
- Join Date
- Nov 2013
- Posts
- 97
Try running the following command on mysql
GRANT ALL ON database_name.* TO 'X_cpuser'@'your_app_ip' IDENTIFIED BY 'some_password';
then
FLUSH PRIVILEGES;
and then try to connect to the mysql from your app host via console if possible.
-
12-11-2013, 06:22 AM #6Junior Guru
- Join Date
- Nov 2013
- Posts
- 182
Still nope.
Access denied for user 'firehost_userpg'@'server.mydomain.com' (using password: YES)
-
12-11-2013, 06:31 AM #7Temporarily Suspended
- Join Date
- Nov 2013
- Posts
- 97
can you do cli access to your mysql server? Did you run the grant command? Have you used ip or domain name in that command?
-
12-11-2013, 06:38 AM #8Junior Guru
- Join Date
- Nov 2013
- Posts
- 182
Okay so,
Under GameCP Settings:
Database Name: X_sqlcpg
Remote IP: 1XX.XX.XXX.XXX
Remote Password: XXXXXXXXXXX
Database User: X_userpg
Under GameCP Machine Management:
Address: Same as above.
From nano /usr/local/gcp/gamecp.ini
mysql_host=1XX.XX.XXX.XXX
mysql_user=X_userpg
mysql_pass=XXXXXXXXXXX
mysql_database=X_sqlcpg
serverid=3
passphrase=xxxxxxxxx
debug=off
listenport=240
user_group=default
So then did in SSH under root shell login:
mysql
GRANT ALL ON X_sqlcpg.* TO 'X_userpg'@'1XX.XX.XXX.XXX' IDENTIFIED BY 'XXXXXXXXXXX';
FLUSH PRIVILEGES;
exit
Then I did:
service gameCP restart
Which gave me:
Access denied for user 'X_userpg'@'server.mydomain.com' (using password: YES)Last edited by A Goat; 12-11-2013 at 06:48 AM.
-
12-11-2013, 07:29 AM #9Temporarily Suspended
- Join Date
- Nov 2013
- Posts
- 97
is the database on the same server as the application?
-
12-11-2013, 07:30 AM #10Junior Guru
- Join Date
- Nov 2013
- Posts
- 182
yes it is indeed
-
12-11-2013, 07:31 AM #11Temporarily Suspended
- Join Date
- Nov 2013
- Posts
- 97
when you do GRANT ALL ON X_sqlcpg.* TO 'X_userpg'@'1XX.XX.XXX.XXX' IDENTIFIED BY 'XXXXXXXXXXX';
FLUSH PRIVILEGES; the 1XX.XX.XXX.XXX has to be the client IP address.
-
12-11-2013, 07:32 AM #12Junior Guru
- Join Date
- Nov 2013
- Posts
- 182
I don't understand.
-
12-11-2013, 07:33 AM #13Temporarily Suspended
- Join Date
- Nov 2013
- Posts
- 97
why don't you try connecting via localhost and modify the grant command to look like this:
GRANT ALL ON X_sqlcpg.* TO 'X_userpg'@'127.0.0.1' IDENTIFIED BY 'XXXXXXXXXXX';
and also change the GameCP database setting so that the ip look at 127.0.0.1
-
12-11-2013, 07:36 AM #14Temporarily Suspended
- Join Date
- Nov 2013
- Posts
- 97
this would be in the case where the database would be a remote one which is not your case.
for example you have a database on 10.0.0.XX and you are connecting from 10.0.0.yy then your grant command should look like this:
GRANT ALL ON X_sqlcpg.* TO 'X_userpg'@'10.0.0.yy' IDENTIFIED BY 'XXXXXXXXXXX';
that is because you have to give access to the client which does come from 10.0.0.yy ip.
-
12-11-2013, 07:39 AM #15Temporarily Suspended
- Join Date
- Nov 2013
- Posts
- 97
Also try connecting via ssh and run the following command:
# mysql -u X_cpuser -h localhost -p'your_password' X_sqlcpg
this is to see if you can connect to the database from the localhost using that user.
-
12-11-2013, 07:44 AM #16Junior Guru
- Join Date
- Nov 2013
- Posts
- 182
-
12-11-2013, 07:52 AM #17Junior Guru
- Join Date
- Nov 2013
- Posts
- 182
-
12-11-2013, 08:00 AM #18Temporarily Suspended
- Join Date
- Nov 2013
- Posts
- 97
try this:
Under GameCP Settings:
Database Name: X_sqlcpg
Remote IP: localhost
Remote Password: XXXXXXXXXXX
Database User: X_userpg
-
12-11-2013, 08:03 AM #19Junior Guru
- Join Date
- Nov 2013
- Posts
- 182
Nope. Still doesn't work.
-
12-11-2013, 08:05 AM #20Temporarily Suspended
- Join Date
- Nov 2013
- Posts
- 97
Your problem is with the application because using that credentials and settings from CLI does work fine. You need to put your app on debug mode and analyse carefully your logs.
-
12-11-2013, 08:28 AM #21Temporarily Suspended
- Join Date
- Nov 2013
- Posts
- 97
you might want to try to take a network trace on the mysql connection and might be able to get what is wrong from there.
-
12-11-2013, 08:29 AM #22Junior Guru
- Join Date
- Nov 2013
- Posts
- 182
That is way too complicated for me.
-
12-11-2013, 08:31 AM #23Temporarily Suspended
- Join Date
- Nov 2013
- Posts
- 97
Is it a vps or just a hosted app? Are you able to install software on it? I can give you the command.
-
12-11-2013, 08:32 AM #24Junior Guru
- Join Date
- Nov 2013
- Posts
- 182
It's a full dedicated server! I have root and KVM over IP.
-
12-11-2013, 10:10 AM #25/home/xenos
- Join Date
- Jun 2002
- Posts
- 1,172
Try creating the mysql user with the commands below and use the actual ip address in the ini file rather than localhost.
CREATE USER '$user'@'%' IDENTIFIED BY '$pass';
GRANT USAGE ON *.* TO '$user'@'%';
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER ON $db.* TO '$user'@'%';
FLUSH PRIVILEGES;
Similar Threads
-
PC-TV Connection Problems
By JDrago1926 in forum Computers and PeripheralsReplies: 2Last Post: 08-21-2009, 01:20 AM -
UK - US connection problems?
By Liam - OxyUK in forum Providers and Network Outages and UpdatesReplies: 10Last Post: 07-21-2006, 04:12 PM -
what possible explanations for connection problems
By chuckt101 in forum Hosting Security and TechnologyReplies: 1Last Post: 01-08-2005, 11:46 PM -
connection problems
By Aron in forum Hosting Security and TechnologyReplies: 2Last Post: 12-18-2002, 08:46 AM -
User Connection Problems
By EZWebhostingOne in forum Reseller HostingReplies: 0Last Post: 03-15-2002, 10:28 AM