Access denied sql error 1045

[expired user #5879]'s profile image [expired user #5879] posted 13 years ago in Creating a connection Permalink
I try to connect with my mysql server via ssh tunnel, but I get always the sql error 1045.

My phpmyadmin connection works.
My putty mysql monitor connection works. (mysql -h localhost -u username -p database)

I set the same parameter in my heidisql:

Settings mysql
Network Typ: SSH Tunnel
Hostname/IP: localhost
Username: my_mysql_username
Password: my_mysql_password
Port: 3307
Compressed client/server protocol: false
Databases: blank
Startup script: blank

Settings ssh tunnel
plink exe locations: C:\Programme\PuTTY\plink.exe
SSH Host + Port: myhost port:22
Username: my_ssh_username
Password: my_ssh_password
Private key file: no
Local port: blank or 0



ansgar's profile image ansgar posted 13 years ago Permalink
> Local port: blank or 0

Sounds wrong - please try 3307 for the SSH local port, and 3306 on the first tab.
[expired user #5879]'s profile image [expired user #5879] posted 13 years ago Permalink
Yes I have do this before but then I get the following error:

SQL Error 2003 Can't connect to MYSQL Server on localhost (10061)

I think there must be something wrong with heidisql because when I set so crazy thinks like:

SSH Host + Port: fksdfjksdfklsdkl

then he said not that I can't connect but show me the sql error 1045 Access denied..

I think that cannot be right.
[expired user #5886]'s profile image [expired user #5886] posted 13 years ago Permalink
Have the same issue.

I'm using plink version 0.61.9264.0

I successfully connect to host using putty but get the error 1045 in both settings

Settings ssh tunnel
plink exe locations: C:\Programme\PuTTY\plink.exe
SSH Host + Port: myhost port:22
Username: my_ssh_username
Password: my_ssh_password
Private key file: no
Local port: 3306

and

Settings ssh tunnel
plink exe locations: C:\Programme\PuTTY\plink.exe
SSH Host + Port: myhost port:22
Username: my_ssh_username
Password: blank
Private key file: no
Local port: 3306

settings for mysql is next

Settings mysql
Network Typ: SSH Tunnel
Hostname/IP: localhost
Username: my_mysql_username
Password: my_mysql_password
Port: 3307
Compressed client/server protocol: false
Databases: blank
Startup script: blank
[expired user #5879]'s profile image [expired user #5879] posted 13 years ago Permalink
yes but i have no error when I connect to my mysql monitor:

#root mysql -uUSERNAME -p DATABASE

I work with debian.
[expired user #5886]'s profile image [expired user #5886] posted 13 years ago Permalink
I fixed this issue. I find out that I'm running MySQL server on my local machine that use the 3306 port. And the romote MySQL server used this port too. So I restarted my local MySQL server with setting of port is 3307. And it works perfectly! Probably you have the same issue!
[expired user #5879]'s profile image [expired user #5879] posted 13 years ago Permalink
Excellent, that was it. Thanks
[expired user #5879]'s profile image [expired user #5879] posted 13 years ago Permalink
One question:

In the settings for Local Port I set now 3307

I hope that is right because 3306 works, too.
[expired user #5879]'s profile image [expired user #5879] posted 13 years ago Permalink
Ah ok I think wrong.

I must set it to a free port or to 3306 and then I can start both sessions.

Please login to leave a reply, or register at first.