Unable to connect to mysql remote
I am struggling to connect MySQL database with my application, I am having the following set up
- 3 Applications running in cluster mode and trying to connect with same DB.
- MySQL database running on cluster mode ( Active / Passive)
I am able to connect to MySQL from the database server itself but when I am trying to connect with DB server from my application, I am getting Access denied
.
Here are few additional details
+--------------------------------+
| UserAccount |
+--------------------------------+
| 'myuser'@'%' | |
| 'root'@'127.0.0.1' |
| 'root'@'::1' |
| |
| 'myuser'@'localhost' | |
| 'root'@'localhost' |
+--------------------------------+
MySQl service is up and running to listening to a specific IP
netstat -nap | grep mysql
tcp 0 0 serverIP:3306 0.0.0.0:* LISTEN 723/mysqld
unix 2 [ ACC ] STREAM LISTENING 603869 723/mysqld /mysql/mysql.sock
For me things are looking good, even telnet to server IP with port 3306 shows me success.
but when I am trying to connect with MySQL from my application or from my local terminal , it is giving me exception
> mysql -u myuser -p db -h remoteIP --skip-secure-auth
ERROR 1045 (28000): Access denied for user 'myuser'@'remoteIP' (using password: YES)
Can anyone help me to understand as where the things are incorrect,
mysql mysql-5.5 mysql-cluster remote
bumped to the homepage by Community♦ 29 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am struggling to connect MySQL database with my application, I am having the following set up
- 3 Applications running in cluster mode and trying to connect with same DB.
- MySQL database running on cluster mode ( Active / Passive)
I am able to connect to MySQL from the database server itself but when I am trying to connect with DB server from my application, I am getting Access denied
.
Here are few additional details
+--------------------------------+
| UserAccount |
+--------------------------------+
| 'myuser'@'%' | |
| 'root'@'127.0.0.1' |
| 'root'@'::1' |
| |
| 'myuser'@'localhost' | |
| 'root'@'localhost' |
+--------------------------------+
MySQl service is up and running to listening to a specific IP
netstat -nap | grep mysql
tcp 0 0 serverIP:3306 0.0.0.0:* LISTEN 723/mysqld
unix 2 [ ACC ] STREAM LISTENING 603869 723/mysqld /mysql/mysql.sock
For me things are looking good, even telnet to server IP with port 3306 shows me success.
but when I am trying to connect with MySQL from my application or from my local terminal , it is giving me exception
> mysql -u myuser -p db -h remoteIP --skip-secure-auth
ERROR 1045 (28000): Access denied for user 'myuser'@'remoteIP' (using password: YES)
Can anyone help me to understand as where the things are incorrect,
mysql mysql-5.5 mysql-cluster remote
bumped to the homepage by Community♦ 29 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Did you run aFLUSH PRIVILEGES
after adding the'myuser'@'%'
grant?
– Philᵀᴹ
Nov 9 '15 at 8:07
it seems some password related issue..Can you set password to some simple one and then try..
– Nawaz Sohail
Nov 9 '15 at 11:59
add a comment |
I am struggling to connect MySQL database with my application, I am having the following set up
- 3 Applications running in cluster mode and trying to connect with same DB.
- MySQL database running on cluster mode ( Active / Passive)
I am able to connect to MySQL from the database server itself but when I am trying to connect with DB server from my application, I am getting Access denied
.
Here are few additional details
+--------------------------------+
| UserAccount |
+--------------------------------+
| 'myuser'@'%' | |
| 'root'@'127.0.0.1' |
| 'root'@'::1' |
| |
| 'myuser'@'localhost' | |
| 'root'@'localhost' |
+--------------------------------+
MySQl service is up and running to listening to a specific IP
netstat -nap | grep mysql
tcp 0 0 serverIP:3306 0.0.0.0:* LISTEN 723/mysqld
unix 2 [ ACC ] STREAM LISTENING 603869 723/mysqld /mysql/mysql.sock
For me things are looking good, even telnet to server IP with port 3306 shows me success.
but when I am trying to connect with MySQL from my application or from my local terminal , it is giving me exception
> mysql -u myuser -p db -h remoteIP --skip-secure-auth
ERROR 1045 (28000): Access denied for user 'myuser'@'remoteIP' (using password: YES)
Can anyone help me to understand as where the things are incorrect,
mysql mysql-5.5 mysql-cluster remote
I am struggling to connect MySQL database with my application, I am having the following set up
- 3 Applications running in cluster mode and trying to connect with same DB.
- MySQL database running on cluster mode ( Active / Passive)
I am able to connect to MySQL from the database server itself but when I am trying to connect with DB server from my application, I am getting Access denied
.
Here are few additional details
+--------------------------------+
| UserAccount |
+--------------------------------+
| 'myuser'@'%' | |
| 'root'@'127.0.0.1' |
| 'root'@'::1' |
| |
| 'myuser'@'localhost' | |
| 'root'@'localhost' |
+--------------------------------+
MySQl service is up and running to listening to a specific IP
netstat -nap | grep mysql
tcp 0 0 serverIP:3306 0.0.0.0:* LISTEN 723/mysqld
unix 2 [ ACC ] STREAM LISTENING 603869 723/mysqld /mysql/mysql.sock
For me things are looking good, even telnet to server IP with port 3306 shows me success.
but when I am trying to connect with MySQL from my application or from my local terminal , it is giving me exception
> mysql -u myuser -p db -h remoteIP --skip-secure-auth
ERROR 1045 (28000): Access denied for user 'myuser'@'remoteIP' (using password: YES)
Can anyone help me to understand as where the things are incorrect,
mysql mysql-5.5 mysql-cluster remote
mysql mysql-5.5 mysql-cluster remote
asked Nov 9 '15 at 0:37
Umesh AwasthiUmesh Awasthi
1012
1012
bumped to the homepage by Community♦ 29 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 29 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Did you run aFLUSH PRIVILEGES
after adding the'myuser'@'%'
grant?
– Philᵀᴹ
Nov 9 '15 at 8:07
it seems some password related issue..Can you set password to some simple one and then try..
– Nawaz Sohail
Nov 9 '15 at 11:59
add a comment |
Did you run aFLUSH PRIVILEGES
after adding the'myuser'@'%'
grant?
– Philᵀᴹ
Nov 9 '15 at 8:07
it seems some password related issue..Can you set password to some simple one and then try..
– Nawaz Sohail
Nov 9 '15 at 11:59
Did you run a
FLUSH PRIVILEGES
after adding the 'myuser'@'%'
grant?– Philᵀᴹ
Nov 9 '15 at 8:07
Did you run a
FLUSH PRIVILEGES
after adding the 'myuser'@'%'
grant?– Philᵀᴹ
Nov 9 '15 at 8:07
it seems some password related issue..Can you set password to some simple one and then try..
– Nawaz Sohail
Nov 9 '15 at 11:59
it seems some password related issue..Can you set password to some simple one and then try..
– Nawaz Sohail
Nov 9 '15 at 11:59
add a comment |
1 Answer
1
active
oldest
votes
Try putting the host information as the first item in your connection string
mysql -hremoteIP -umyuser -p db
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f120447%2funable-to-connect-to-mysql-remote%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try putting the host information as the first item in your connection string
mysql -hremoteIP -umyuser -p db
add a comment |
Try putting the host information as the first item in your connection string
mysql -hremoteIP -umyuser -p db
add a comment |
Try putting the host information as the first item in your connection string
mysql -hremoteIP -umyuser -p db
Try putting the host information as the first item in your connection string
mysql -hremoteIP -umyuser -p db
edited Nov 11 '15 at 15:01
answered Nov 11 '15 at 12:38
Andrew PoodleAndrew Poodle
135
135
add a comment |
add a comment |
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f120447%2funable-to-connect-to-mysql-remote%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you run a
FLUSH PRIVILEGES
after adding the'myuser'@'%'
grant?– Philᵀᴹ
Nov 9 '15 at 8:07
it seems some password related issue..Can you set password to some simple one and then try..
– Nawaz Sohail
Nov 9 '15 at 11:59