SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 31/07/2017, 10:36 AM   #1
Crystallize
Banned
 
Join Date: Aug 2013
Posts: 1,498
Reputation: 314
Default Access denied MYSQL ?

mysql_log
Code:
[12:21:12] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'hidden'@'IPHIDDEN' (using password: YES)
[12:21:13] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'hidden'@'IPHIDDEN' (using password: YES)
this happens on my localhost when I want to login lol
I have 3 connections done to mysql server.
From FS
From GM
From my UCP (website)

Would that be an issue? my main server isn't affected only localhost.

I unload FS> I can login
I load FS> I can't login
They use different tables.
Crystallize is offline   Reply With Quote
Old 31/07/2017, 10:38 AM   #2
Xeon™
Banned
 
Join Date: Jul 2017
Location: Earth
Posts: 457
Reputation: 96
Default Re: Access denied MYSQL ?

Quote:
Originally Posted by Crystallize View Post
mysql_log
Code:
[12:21:12] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'hidden'@'IPHIDDEN' (using password: YES)
[12:21:13] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'hidden'@'IPHIDDEN' (using password: YES)
this happens on my localhost when I want to login lol
I have 3 connections done to mysql server.
From FS
From GM
From my UCP (website)

Would that be an issue? my main server isn't affected only localhost.
Disable firewall, and check if the connection is allowed to localhost (mysql server allow more than 1 connection), check the user login's
Xeon™ is offline   Reply With Quote
Old 31/07/2017, 10:40 AM   #3
Crystallize
Banned
 
Join Date: Aug 2013
Posts: 1,498
Reputation: 314
Default Re: Access denied MYSQL ?

Quote:
Originally Posted by XeonMaster View Post
Disable firewall, and check if the connection is allowed to localhost (mysql server allow more than 1 connection), check the user login's
I unload FS I can login.
I load FS I can't login.
What the issue could be? The FS is not affiliated with main gm it uses different tables&db
Crystallize is offline   Reply With Quote
Old 31/07/2017, 10:42 AM   #4
Xeon™
Banned
 
Join Date: Jul 2017
Location: Earth
Posts: 457
Reputation: 96
Default Re: Access denied MYSQL ?

Quote:
Originally Posted by Crystallize View Post
I unload FS I can login.
I load FS I can't login.
What the issue could be? The FS is not affiliated with main gm it uses different tables only same database.
it might be the FS and gamemode use same handle, Mysql Handle is an Id (number) not something special
so i guess you need to set it manualy (spell ;-

like that

OnGamemode:

PHP Code:
new MySQL:Database 0
OnFilterScript:

PHP Code:
new MySQL:Handle 1
OnAnythingElse

PHP Code:
new MySQL:Handle = (int anything else ^) 
Xeon™ is offline   Reply With Quote
Old 31/07/2017, 10:50 AM   #5
Crystallize
Banned
 
Join Date: Aug 2013
Posts: 1,498
Reputation: 314
Default Re: Access denied MYSQL ?

my onfsinit

my mysql variable (i set it as you said or maybe I got it wrong?
Code:
new mysql = 1;
Crystallize is offline   Reply With Quote
Old 31/07/2017, 10:56 AM   #6
Xeon™
Banned
 
Join Date: Jul 2017
Location: Earth
Posts: 457
Reputation: 96
Default Re: Access denied MYSQL ?

Quote:
Originally Posted by Crystallize View Post
my onfsinit
Code:
	mysql=mysql_connect(--); //Connecting to mysql database
my mysql variable (i set it as you said or maybe I got it wrong?
Code:
new mysql = 1;
what mysql plugin you are using?

if you use R40+ you should put MySQL: tag to be

Code:
new MySQL:mysql = 1;
Xeon™ is offline   Reply With Quote
Old 31/07/2017, 10:57 AM   #7
Logic_
Banned
 
Join Date: Jun 2015
Posts: 1,506
Reputation: 305
Default Re: Access denied MYSQL ?

Please hide your credentials + (Above poster) He's using R39 and no need to quote his every post.
Logic_ is offline   Reply With Quote
Old 31/07/2017, 10:58 AM   #8
Crystallize
Banned
 
Join Date: Aug 2013
Posts: 1,498
Reputation: 314
Default Re: Access denied MYSQL ?

Quote:
Originally Posted by Logic_ View Post
Please hide your credentials + (Above poster) He's using R39 and no need to quote his every post.
I'm a fucking idiot but I will delete it anyways its a test db wont be useful in next 5 mins.
And yes im using r39 if im not mistaken lol
Crystallize is offline   Reply With Quote
Old 31/07/2017, 11:01 AM   #9
Logic_
Banned
 
Join Date: Jun 2015
Posts: 1,506
Reputation: 305
Default Re: Access denied MYSQL ?

The main question arises why are you using the FS, you can integrate it in your script.
Logic_ is offline   Reply With Quote
Old 31/07/2017, 11:01 AM   #10
Xeon™
Banned
 
Join Date: Jul 2017
Location: Earth
Posts: 457
Reputation: 96
Default Re: Access denied MYSQL ?

Quote:
Originally Posted by Logic_ View Post
Please hide your credentials + (Above poster) He's using R39 and no need to quote his every post.
no, he is using R40 based on mysql_connect that he used
Quote:
password and database parameters swapped in mysql_connect:
Code:
mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_DATABASE, MYSQL_PASSWORD);
becomes
Code:
mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE);
so you should put MySQL: tag on the variable @Crystallize

EDIT: i did saw the Database in last of params on mysql_connect if im not mistaken
Xeon™ 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL - Access denied Gogorakis Server Support 16 23/08/2014 06:11 PM
Mysql Access Denied Why? danish007 Scripting Help 3 30/06/2014 03:13 AM
MySQL can't connect, beacuse of access denied. TheDeath Scripting Help 3 09/12/2013 06:23 PM
MYSQL Access Denied with right user and pass Mattakil Server Support 12 04/12/2013 07:50 PM
MySQL permission issues/access denied V1ceC1ty Scripting Help 7 19/12/2012 02:09 AM


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


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