MySQL SQLyog: Host 'localhost' is not allowed to connect to this MySQL server

hpkh

Grünschnabel
Hallo an Alle im Forum,

habe mein XP System neu aufgesetzt und mein Java Programm als auch My SQL und SQL yog neu installiert, die vorher problemlos funktionierten.

Nach der Neuinstallation bekomme ich die Fehlermeldung Host 'localhost' is not allowed to connect to this MySQL server .

Sowohl MySQL als auch SQLyog nutzen Port 3306. In SQLyog kann ich mich mit MySQL Server verbinden und habe Zugang zu der Datenbank.

Die Firewall habe ich mit Ausnahme für SQLyog, Java und mein Softwareprogramm versehen.

Ping mit 127.0.0.1 funktioniert.

Ob ich in SQLyog localhost oder 127.0.0.1 verwende macht keinen Unterschied, in in SQLyog habe ich Zugang, aber MySQL nicht.

Nachstehend ist der Log für den Start des Java Programms mit Fehlermeldung und die Tests die ich mit der MySQL Konsole manuell vorgenommen habe.

Bin weder Programmierer noch firm in Java oder SQL, daher bitte ich um Erklärungen auf Laienebene um die Lösungen umsetzen zu können.

Für jegliche Vorschläge bin ich sehr dankbar.

Viele Grüsse
Harald

2009-05-22 13:21:43,156 INFO 0 [main] com.ss.stockmarket.data.ConnectionFactory - [StartUp] Stockwatcher is connecting to database
2009-05-22 13:21:44,531 ERROR 1375 [main] com.ss.stockmarket.data.ConnectionFactory - com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused: connect
STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused: connect

at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:283)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2541)
at com.mysql.jdbc.Connection.<init>(Connection.java:1474)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:264)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.ss.stockmarket.data.ConnectionFactory.getConnection(ConnectionFactory.java:53)
at com.ss.stockmarket.managers.QueryManager.<init>(QueryManager.java:37)
at com.ss.stockmarket.managers.DataManager.<clinit>(DataManager.java:50)
at com.ss.stockmarket.gui.StockWatcher.open(StockWatcher.java:162)
at com.ss.stockmarket.gui.StockWatcher.main(StockWatcher.java:149)

** END NESTED EXCEPTION **

Last packet sent to the server was 16 ms ago.
2009-05-22 13:21:44,546 ERROR 1390 [main] com.ss.stockmarket.gui.StockWatcher -
java.lang.NullPointerException
java.lang.NullPointerException
at com.ss.stockmarket.managers.QueryManager.executeQuery(QueryManager.java:52)
at com.ss.stockmarket.managers.DataManager.getSettings(DataManager.java:300)
at com.ss.stockmarket.gui.StockWatcher.open(StockWatcher.java:162)
at com.ss.stockmarket.gui.StockWatcher.main(StockWatcher.java:149)
C:\StockWatcher2>cd..

C:\>netstat -a

Aktive Verbindungen

Proto Lokale Adresse Remoteadresse Status
TCP Harald:epmap Harald:0 ABHÖREN
TCP Harald:microsoft-ds Harald:0 ABHÖREN
TCP Harald:3306 Harald:0 ABHÖREN
TCP Harald:1029 Harald:0 ABHÖREN
TCP Harald:1037 localhost:10080 SCHLIESSEN_WARTEN
TCP Harald:1039 Harald:0 ABHÖREN
TCP Harald:1039 localhost:1040 HERGESTELLT
TCP Harald:1040 localhost:1039 HERGESTELLT
TCP Harald:1193 localhost:10080 SCHLIESSEN_WARTEN
TCP Harald:1550 localhost:3306 HERGESTELLT
TCP Harald:1553 localhost:3306 HERGESTELLT
TCP Harald:1661 localhost:5152 WARTEND
TCP Harald:1716 localhost:10080 HERGESTELLT
TCP Harald:1718 localhost:5152 FIN_WARTEN_2
TCP Harald:1722 localhost:10080 HERGESTELLT
TCP Harald:1726 localhost:10080 HERGESTELLT
TCP Harald:1730 localhost:10080 HERGESTELLT
TCP Harald:1731 localhost:10080 HERGESTELLT
TCP Harald:1732 localhost:10080 HERGESTELLT
TCP Harald:1736 localhost:10080 HERGESTELLT
TCP Harald:1738 localhost:10080 HERGESTELLT
TCP Harald:1740 localhost:10080 HERGESTELLT
TCP Harald:1742 localhost:10080 HERGESTELLT
TCP Harald:3306 localhost:1550 HERGESTELLT
TCP Harald:3306 localhost:1553 HERGESTELLT
TCP Harald:5152 Harald:0 ABHÖREN
TCP Harald:5152 localhost:1718 SCHLIESSEN_WARTEN
TCP Harald:10080 Harald:0 ABHÖREN
TCP Harald:10080 localhost:1716 HERGESTELLT
TCP Harald:10080 localhost:1720 WARTEND
TCP Harald:10080 localhost:1722 HERGESTELLT
TCP Harald:10080 localhost:1726 HERGESTELLT
TCP Harald:10080 localhost:1728 WARTEND
TCP Harald:10080 localhost:1730 HERGESTELLT
TCP Harald:10080 localhost:1731 HERGESTELLT
TCP Harald:10080 localhost:1732 HERGESTELLT
TCP Harald:10080 localhost:1736 HERGESTELLT
TCP Harald:10080 localhost:1738 HERGESTELLT
TCP Harald:10080 localhost:1740 HERGESTELLT
TCP Harald:10080 localhost:1742 HERGESTELLT
TCP Harald:10080 localhost:1744 WARTEND
TCP Harald:10110 Harald:0 ABHÖREN
TCP Harald:13128 Harald:0 ABHÖREN
TCP Harald:18080 Harald:0 ABHÖREN
TCP Harald:netbios-ssn Harald:0 ABHÖREN
TCP Harald:1035 by2msg1063017.phx.gbl:1863 HERGESTELLT
TCP Harald:1701 77.67.40.75:http WARTEND
TCP Harald:1706 77.67.40.75:http WARTEND
TCP Harald:1711 77.67.40.27:http WARTEND
TCP Harald:1713 77.67.40.27:http WARTEND
TCP Harald:1717 fx-in-f103.google.com:http HERGESTELLT
TCP Harald:pptp ev1s-209-62-15-210.theplanet.com:http HERGESTELLT
TCP Harald:1725 ev1s-209-62-15-210.theplanet.com:http WARTEND
TCP Harald:1727 ev1s-209-62-15-210.theplanet.com:http HERGESTELLT
TCP Harald:1733 ev1s-209-62-15-210.theplanet.com:http HERGESTELLT
TCP Harald:1734 ev1s-209-62-15-210.theplanet.com:http HERGESTELLT
TCP Harald:1735 ev1s-209-62-15-210.theplanet.com:http HERGESTELLT
TCP Harald:1737 213-248-125-49.customer.teliacarrier.com:http HERGESTELLT
TCP Harald:1739 fx-in-f157.google.com:http HERGESTELLT
TCP Harald:1741 fx-in-f157.google.com:http HERGESTELLT
TCP Harald:1743 213-248-125-18.customer.teliacarrier.com:http HERGESTELLT
UDP Harald:microsoft-ds *:*
UDP Harald:isakmp *:*
UDP Harald:1031 *:*
UDP Harald:1085 *:*
UDP Harald:1140 *:*
UDP Harald:4500 *:*
UDP Harald:ntp *:*
UDP Harald:1032 *:*
UDP Harald:1052 *:*
UDP Harald:1564 *:*
UDP Harald:1570 *:*
UDP Harald:1719 *:*
UDP Harald:1900 *:*
UDP Harald:discard *:*
UDP Harald:ntp *:*
UDP Harald:netbios-ns *:*
UDP Harald:netbios-dgm *:*
UDP Harald:1900 *:*

C:\>ping 127.0.0.1

Ping wird ausgeführt für 127.0.0.1 mit 32 Bytes Daten:

Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128

Ping-Statistik für 127.0.0.1:
Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0 (0% Verlust),
Ca. Zeitangaben in Millisek.:
Minimum = 0ms, Maximum = 0ms, Mittelwert = 0ms

C:\>



- - - - - - - - - - - - - - - - - - - -- - -- - - - - - - - - - -



Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.0.41-community-nt MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> help

For information about MySQL products and services, visit: http://www.mysql.com/
For developer information, including the MySQL Reference Manual, visit: http://dev.mysql.com/
To buy MySQL Network Support, training, or other products, visit: https://shop.mysql.com/

List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
? (\?) Synonym for `help'.
clear (\c) Clear command.
connect (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as new delimiter.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
go (\g) Send command to mysql server.
help (\h) Display this help.
notee (\t) Don't write into outfile.
print (\p) Print current command.
prompt (\R) Change your mysql prompt.
quit (\q) Quit mysql.
rehash (\#) Rebuild completion hash.
source (\.) Execute an SQL script file. Takes a file name as an argument.
status (\s) Get status information from the server.
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
use (\u) Use another database. Takes database name as argument.
charset (\C) Switch to another charset. Might be needed for processing binlog
with multi-byte charsets.
warnings (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.

For server side help, type 'help contents'

mysql> \r;
ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server

mysql> \r db;
ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server
mysql>
mysql> UPDATE mysql.user SET Password=PASSWORD('newpwd')
-> UPDATE mysql.user SET Password=PASSWORD('newpwd')WHERE User='root';
No connection. Trying to reconnect...
ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server
ERROR:
Can't connect to the server
 

Neue Beiträge

Zurück