Software: Mysql Administrator, kann nicht mit mysql verbinden

wingman

Erfahrenes Mitglied
Hallo

Ich will mit dem Programme auf den andere PC in die Datenbank Connecten.

Aber es kommt immer ein Error

Could not connect to host '192.168.*.**'.
MySQL Error Nr. 2003
Can't connect to MySQL server on '192.168.*.**' (111)

Click the 'Ping' button to see if there is a networking problem

Was mache ich faltsch?

Gruss Dave
 
Steht doch da ;)

Als erstes musst du gucken, ob der Rechner per ping erreichbar ist. Wenn ja, scanne den mal auf offene Ports, z.B. per nmap. Wenn der Rechner nun erreichbar ist, gucke ob mySQL läuft (Stichwort: skip-networking in my.cnf), also ob Port 3306 offen ist.
 
Hallo

Das kommt wenn ich das eingebe nmap -sT -PT3306 192.168.1.37

Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2005-02-26 14:03 UTC
WARNING: We could not determine for sure which interface to use, so we are guessing 127.0.0.1 . If this is wrong, use -S <my_IP_address>.
Interesting ports on 192.168.1.37:
(The 1661 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http

Nmap run completed -- 1 IP address (1 host up) scanned in 0.158 seconds


Gruss Dave
 
Zuletzt bearbeitet:
Ich wollte schon schreiben - du musst nmap auch sagen, welchen Rechner es scannen soll.

Dort ist eindeutig zu erkennen, dass mySQL nicht an den Port 3306 gebunden ist. Du musst dazu die Datei my.cnf auf dem Rechner, wo mySQL installiert ist, bearbeiten und vor die Zeile skip-networking eine Raute ( # skip-networking) setzen und danach mySQL neu starten.
 
Hallo

WIe es aussieht ist auf meinen Computer kein Port offfen und auf dem server 2 ( 22,80 )

WIe kann ich Ports öffnen?

Gruss Dave
 
Hallo

Das habe ich auch gemacht!

Es geht immer noch nicht.

Meine my.cnf

Code:
# /etc/mysql/my.cnf: The global mysql configuration file.
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-4.0.14-r1,v 1.2 20$
#
# This file can be simultaneously placed in three places:
# 1. /etc/mysql/my.cnf to set global options.
# 2. /var/lib/mysql/my.cnf to set server-specific options.
# 3. ~/.my.cnf to set user-specific options.
#
# One can use all long options that the program supports.
# Run the program with --help to get a list of them.
#
# The following values assume you have at least 32M RAM!

[client]
#password       = my_password
port            = 3306
socket          = /var/run/mysqld/mysqld.sock

[safe_mysqld]
err-log         = /var/log/mysql/mysql.err

[ mysqld]
skip-innodb
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
log-error       = /var/log/mysql/mysqld.err
# If set, mysql logs all queries(general query log). This will be deprecated in
# 5.0. This logs all queries, even error queries and is slow.
# log          = /var/log/mysql/mysql.log
#
# If you really need logging, use rather binary logging. Especially when doing
# replication. Read
# file:/usr/share/doc/mysql-*/manual.html.gz#Replication
# You can use PURGE MASTER LOGS TO '$hostname-bin.010' to get rid of old logs
# from $hostname-bin.01 up to $hostname-bin.09 while the slave server is
# running.
# Before doing that, check which logfile slave curently uses by running
# mysql> SHOW SLAVE STATUS
# To list logfiles on master do:
# mysql> SHOW MASTER LOGS
# Then use PURGE for those not needed anymore only! Never remove the files
# manually!
#
# Also consult RESET MASTER and RESET SLAVE commands before doing any changes
# mysql> RESET MASTER - Deletes all binary logs listed in the index
#                       file, resetting the binlog index file to be empty.
# mysql> RESET SLAVE - Makes the slave forget its replication position in
#                      the master logs.
# mysql> SET SQL_LOG_BIN=0  - this turns off logging (execute on MASTER only)
# mysql> SET SQL_LOG_BIN=1  - this turns on logging (execute on MASTER only)
#
# log-bin
# set-variable  = binlog-do-db=non_existant
# set-variable  = binlog-ignore-db=database_name
#
# server-id has to unique for each master or slave in your network,
# lets use last number from IP address
# server-id      = 207
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/german
skip-locking
set-variable    = key_buffer=16M
set-variable    = max_allowed_packet=1M
set-variable    = thread_stack=128K
# keep secure by default!
bind-address    = 127.0.0.1
port            = 3306
# this can make it even more secure:
#skip-networking

[mysqldump]
quick
set-variable    = max_allowed_packet=1M

[ mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
set-variable    = key_buffer=16M

Gruss Dave
 
Hallo

Ist jetzt offen!

Ja es sieht jetzt so aus

Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2005-02-26 15:35 UTC
WARNING: We could not determine for sure which interface to use, so we are guessing 127.0.0.1 . If this is wrong, use -S <my_IP_address>.
Interesting ports on 192.168.1.37:
(The 1660 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
3306/tcp open mysql

Nmap run completed -- 1 IP address (1 host up) scanned in 0.162 seconds

Ist offen Very Happy

Komme immer noch nicht rein

Auf meinen PC zeigt es gar keinen einzigen Port an. Wiso?

Gruss Dave
 
wingman hat gesagt.:

# keep secure by default!
bind-address = 127.0.0.1
port = 3306
# this can make it even more secure:
#skip-networking
Bind-address muss deine 192.168.x.x IP-Adresse hin, da 127.0.0.1 nur auf den Rechner zeigt, auf dem mySQL läuft. Ergo: Du hast mit bind-address 127.0.0.1 keine Chance, von außen zuzugreifen.
 
Hallo

Habe es rausgefunden was der fehler war. Es liegt in der Datenbank.

Habe bei root User localhost drin staht die IP Adresse vom Server


Vielen Dank

Gruss Dave
 
Zurück