MYSQL öffentlich machen

Alles, was MariaDB und MySQL betrifft, kann hier besprochen werden.

MYSQL öffentlich machen

Postby Ticha » 07. May 2006 16:09

Hi

ich würde gerne auf meine SQL Datenbank auch von ausserhlab zugreifen können. Nur leieder weiss ich nicht welche Datei ich in Linux verändern muss, damit das funktioniert :-I

kann mir jmd helfen?

danke :)
1101011010101110100010101010101101
0101011010101110101010101111100010
0011010101111000100101010101010111
1110100011010101001010101102011001

2??? EINE 2??? AHHH ES GIBT KEINE 2!!! ES DARF KEINE 2 GEBEN !!! MEINE WELT GEHT UNTER!!! *umfall TOT*
Ticha
 
Posts: 94
Joined: 18. January 2006 14:23

Postby semtex » 07. May 2006 16:20

das kannste in der my.cnf durch den parameter "skip-networking" erreichen, ich würde aber vorsichtig sein..

weil nicht nur du, sondern auch andere können dann extern auf die datenbank zugreifen, natürlich sofern die db daten vorhanden sind..
semtex
 
Posts: 57
Joined: 12. April 2006 16:41

Postby Ticha » 07. May 2006 16:55

ja gut


nur leider gibt es diese DAtei in der Linux Version nicht.

und wenn ja... wo finde ich die?
1101011010101110100010101010101101
0101011010101110101010101111100010
0011010101111000100101010101010111
1110100011010101001010101102011001

2??? EINE 2??? AHHH ES GIBT KEINE 2!!! ES DARF KEINE 2 GEBEN !!! MEINE WELT GEHT UNTER!!! *umfall TOT*
Ticha
 
Posts: 94
Joined: 18. January 2006 14:23

Postby semtex » 07. May 2006 17:09

die datei gibt es in jeder version, man muss sie nur finden..

etc/lamp/

hier ist der parameter skip-networking auch definiert..

lampp\Share\Mysql\my-innodb-heavy-4G.cnf
lampp\Share\Mysql\my-medium.cnf
lampp\Share\Mysql\My-small.cnf
semtex
 
Posts: 57
Joined: 12. April 2006 16:41

Postby Ticha » 07. May 2006 17:17

ja ok die habe ich gefunden... aber welche davon muss ich verändern


sry. aber in der Hinsicht bin ich ein DAU :oops:
1101011010101110100010101010101101
0101011010101110101010101111100010
0011010101111000100101010101010111
1110100011010101001010101102011001

2??? EINE 2??? AHHH ES GIBT KEINE 2!!! ES DARF KEINE 2 GEBEN !!! MEINE WELT GEHT UNTER!!! *umfall TOT*
Ticha
 
Posts: 94
Joined: 18. January 2006 14:23

Postby Ticha » 07. May 2006 18:58

ok...der Parameter steht in der Datei... also müsste ich die datenbankvon aussen erreichen können. oder?
1101011010101110100010101010101101
0101011010101110101010101111100010
0011010101111000100101010101010111
1110100011010101001010101102011001

2??? EINE 2??? AHHH ES GIBT KEINE 2!!! ES DARF KEINE 2 GEBEN !!! MEINE WELT GEHT UNTER!!! *umfall TOT*
Ticha
 
Posts: 94
Joined: 18. January 2006 14:23

Postby semtex » 07. May 2006 19:02

an die "#" denken und nach änderung neu starten..
semtex
 
Posts: 57
Joined: 12. April 2006 16:41

Postby Ticha » 02. July 2006 22:08

hmm... ich habs jetzt versucht... aber es funktioniert immer noch nicht :-I
1101011010101110100010101010101101
0101011010101110101010101111100010
0011010101111000100101010101010111
1110100011010101001010101102011001

2??? EINE 2??? AHHH ES GIBT KEINE 2!!! ES DARF KEINE 2 GEBEN !!! MEINE WELT GEHT UNTER!!! *umfall TOT*
Ticha
 
Posts: 94
Joined: 18. January 2006 14:23

Postby sari42 » 02. July 2006 23:07

es muß auch einen user geben, der das recht hat, von außen auf mysql zuzugreifen (zb admin@% , %="von irgendwo").
skip networking ist i.d.R. auskommentiert, außer man will den zugriff via tcp/ip explizit ausschließen.
sari42
 
Posts: 800
Joined: 27. November 2005 18:28

Postby Ticha » 03. July 2006 01:08

hmm... im mom hab ich ein noch grösseres Problem. In Php My admin hab ich keine rechte mehr. Ich kann gar nichts mehr confihurieren. Es kommt immer die Meldung "Can't read/write at root/tmp/(irgendeine datei)"

sehr sehr seltsam

ich wollte schon einen user machen der ovn überall darauf zugreifen kann.... aber ohne dieses problem behoben zu ahben kann ich ja auch nichts machen.


hilfe BITTTTTTE *fleh*
1101011010101110100010101010101101
0101011010101110101010101111100010
0011010101111000100101010101010111
1110100011010101001010101102011001

2??? EINE 2??? AHHH ES GIBT KEINE 2!!! ES DARF KEINE 2 GEBEN !!! MEINE WELT GEHT UNTER!!! *umfall TOT*
Ticha
 
Posts: 94
Joined: 18. January 2006 14:23

Postby Ticha » 03. July 2006 01:45

Also ich kann nun von aussen auf meine Db zugreifen. Das ist ja alles gut und schön. Das Problem ist bloss ich kann keine Tabbelle anlegen

dann kommt immer folgender Fehler:


Code: Select all
1 - Can't create/write to file '/root/tmp/#sql_1096_0.MYI"(Errcode:13)


ich weiss da echt keinen rat mehr. bitte um hilfe :oops: :oops: :oops:
1101011010101110100010101010101101
0101011010101110101010101111100010
0011010101111000100101010101010111
1110100011010101001010101102011001

2??? EINE 2??? AHHH ES GIBT KEINE 2!!! ES DARF KEINE 2 GEBEN !!! MEINE WELT GEHT UNTER!!! *umfall TOT*
Ticha
 
Posts: 94
Joined: 18. January 2006 14:23

Postby deepsurfer » 03. July 2006 13:17

<back to the roots>

Ausgehend von einer normalen Installation des XAMPP für Linux.
Wenn man das Security Script ausgeführt hat und dort die Frage nach "Netzwerk erreichbar abschalten" mit "Ja" geantwortet hat, dann die editier Arbeit die semtex hier beschrieben hat durchführen.

In diesem Flash Video wird kurz erklärt wie man einen neuen User mit phpmyadmin einrichtet, und dieser User direkt mit einer zuvor erstellten Datenbank verbunden wird.

Anders als im Video zu sehen, sollte nun statt "localhost" das "Jeder Host" ausgewählt werden, es erscheint dann ein " % " Zeichen im Kriterium.
Kleines Flash Video

Danach ist diese Datenbank mit einem User verknüpft, der User hat für diese Datenbank absolute Adminrechte (kann man ja auch einschränken),
und nun wäre die Datenbank von aussen mittels http://dyndnsnamen:3306 erreichbar. Sofern man auch den Portforward für TCP 3306 eingerichtet hat und auch die Firewall bescheid weiss.

Vorteil an dieser Sache, der Zugang von aussen ist NUR auf diese eine Datenbank beschränkt, somit wäre im Falle des Auspionieren von dritten Personen nicht das ganze MySQL kompromittiert.

Willst du aber absoluten Zugang zu deinem MySQL-Server von aussen haben, so richte NUR einen User ein der alle Rechte bekommt und durch die Eingabe "Jeder Host" ( = % ) dann benutztbar ist.
Kannst auch den "root" User von -localhost- auf -Jeder Host- umstellen, dann hast du den gleichen effekt.
chirio Deep
Wie sagte einst der MCP aus Tron auf dem Bildschirm zu schreiben Pflegte
" ... end of communication ... "
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian

Postby Ticha » 03. July 2006 16:46

gut hab ich gemacht. Allerdings mit Navicat da ich per PhPMyadmin gar nichgts mehr machen kann. Da immer wieder der can't write/read fehler kommt.

Das komische ist nur. Tabbelleneinträge kann ich verändern jedoch kann ich keine Tabbellen Editieren.

wie gesagt es ist immer noch der oben genannnte fehlrt


es ist geal bei welchem nutzer ob root oder anderer.
1101011010101110100010101010101101
0101011010101110101010101111100010
0011010101111000100101010101010111
1110100011010101001010101102011001

2??? EINE 2??? AHHH ES GIBT KEINE 2!!! ES DARF KEINE 2 GEBEN !!! MEINE WELT GEHT UNTER!!! *umfall TOT*
Ticha
 
Posts: 94
Joined: 18. January 2006 14:23

Postby Stefan » 04. July 2006 13:50

Servus,
etc/lamp/

Kann es sein, das bei xampp die richtige Datei eher in /opt/lampp/etc/my.cnf oder /opt/lampp/etc/mysql/my.cnf liegt?

Can't create/write to file '/root/tmp/#sql_1096_0.MYI"

Schau mal in der _richtigen_ my.cnf wo das "datadir" hinzeigt.
sollte irgendwohin im xampp Verzeichnis zeigen vielleicht nach "/opt/lampp/var/lib/mysql/"?.

gut hab ich gemacht. Allerdings mit Navicat da ich per PhPMyadmin gar nichgts mehr machen kann. Da immer wieder der can't write/read fehler kommt.


es ist geal bei welchem nutzer ob root oder anderer.

Weil mysql die Userdaten aus der mysql Tabelle holen will, und die ist nicht in /root/tmp/ vorhanden. Denn im Root's Verzeichnis hat MySQL keine Rechte um Dateien irgenwie zu bearbeiten(Außer läuft unter Root als Benutzer)....
Das komische ist nur. Tabbelleneinträge kann ich verändern jedoch kann ich keine Tabbellen Editieren.

...Deshalb kann ich das fast nicht glauben. Oder es ist mächtig was im Eimer bei Dir.

Poste doch mal die my.cnf die Du bearbeitet hast.
Den Pfad zu ihr im Dateisystem.
Wie Du dann den Server startest.

Ansonsten kannst Du ja von vorne anfangen, die Hinweise vom dpsurfer befolgen und wenns läuft Dein Backup wieder einspielen.

ciao, Stefan
User avatar
Stefan
 
Posts: 475
Joined: 26. December 2002 22:36
Location: Mitten in der sonnigen Südpfalz

Postby Ticha » 10. July 2006 22:14

hier die my.cnf

Code: Select all
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /opt/lampp/var/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password   = your_password
port      = 3306
socket      = /opt/lampp/var/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port      = 3306
socket      = /opt/lampp/var/mysql/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
# log-bin deactivated by default since XAMPP 1.4.11
#log-bin=mysql-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id   = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin


# Point the following paths to different dedicated disks
#tmpdir      = /tmp/      
#log-update    = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# Comment the following if you are using InnoDB tables
skip-innodb
innodb_data_home_dir = /opt/lampp/var/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /opt/lampp/var/mysql/
innodb_log_arch_dir = /opt/lampp/var/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout




der Pfad zu ihr :



Code: Select all
opt/lampp/etc



den server starte ich mit dem befehl:

Code: Select all
opt/lampp/lampp start


genauso wie es auch im Tutorial gesagt wird. Genauso hab ich auch dei Installation gemacht.

Was mich nur wundert. Unter Mandrake hatte ich nie Probleme. Erst seit Mandriva hab ich diese Probleme.
1101011010101110100010101010101101
0101011010101110101010101111100010
0011010101111000100101010101010111
1110100011010101001010101102011001

2??? EINE 2??? AHHH ES GIBT KEINE 2!!! ES DARF KEINE 2 GEBEN !!! MEINE WELT GEHT UNTER!!! *umfall TOT*
Ticha
 
Posts: 94
Joined: 18. January 2006 14:23

Next

Return to MariaDB - MySQL

Who is online

Users browsing this forum: No registered users and 90 guests