MySQL

09/05/2011 15:54 Seele™#1
Hallo ich wollte MySQL installieren und habe alles nach : [Only registered and activated users can see links. Click Here To Register...] gemacht aber immer wenn ich zu MySQL mit Navicat connecten will kommt dieser Fehler : 1130 - Host 'p5B07AD2B.dop.t.dialin.net' is not allowed to connect to this MySQL server



mfg. seele
09/05/2011 15:57 .Yacki#2
Uh, auch ein T-Online Nutzer ;P
-
Firewall aus?

Btw. kannst du auch der Anleitung für die 7.2 Systeme verwenden.
09/05/2011 15:59 Howaner#3
Gib ein:
Code:
mysql -p
Jetzt fragt er nach pw
nix eingeben und enter drücken
Jetzt gib ein:
Code:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
IDENTIFIED BY '123456' WITH GRANT OPTION;
exit;
Jetzt kannste verbinden mit passwort 123456
09/05/2011 16:00 Seele™#4
Ja firewall ist aus...


sobald ich mysql -p eingebe und bei pw enter mache kommt ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
09/05/2011 16:05 .Yacki#5
Ah, sorry. Du musst den MySQLD Prozess ausführen um dann deine Passwörter zu ändern.

Quote:
/usr/local/etc/rc.d/mysql-server stop
Quote:
mysqld_safe --skip-grant-tables
Ein neues PuTTy Fenster öffnen und erneut per SSH auf deinen Server verbinden...

Quote:
mysql -u root mysql
Quote:
update user set Password=PASSWORD('dein_neues_pw') where user='root';
Quote:
exit
Quote:
/usr/local/etc/rc.d/mysql-server start
09/05/2011 20:30 Seele™#6
Hab immernoch keine Lösung kann ich es einfach deinstallieren und dann MySQL50 installieren bzw. auch dadurch einen neuen User erstellen durch einen normalen ablauf..?
09/05/2011 20:35 Howaner#7
du musst bei pw dann dein neues pw eingeben wenn er dich fragt
09/05/2011 21:04 Seele™#8
Quote:
Originally Posted by .Howan View Post
du musst bei pw dann dein neues pw eingeben wenn er dich fragt
Klappt alles nicht...

es kommt dann immer : ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
09/05/2011 21:12 Raingun#9
Brauchen immer noch hilfe !
09/05/2011 21:21 ~Sentox#10
Root resseten
09/05/2011 21:30 IgorGlock#11
Quote:
Originally Posted by ~Sentox View Post
Root resseten
^ auch eine Möglichkeit.

Nur dumm, wenn er's tun würde.


Lösung:
Code:
/usr/local/etc/rc.d/mysql-server stop
/usr/local/bin/mysql_install_db
/usr/local/bin/mysqld_safe –user=mysql &
/usr/local/bin/mysqladmin -u root password newpassword
mysql -p
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
IDENTIFIED BY 'newpassword' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'mt2'@'localhost'
IDENTIFIED BY 'mt2!@#' WITH GRANT OPTION;
quit
reboot
newpassword ist nun dein neues "root" PW.
09/06/2011 12:24 Seele™#12
Quote:
Originally Posted by IgorGlock View Post
^ auch eine Möglichkeit.

Nur dumm, wenn er's tun würde.


Lösung:
Code:
/usr/local/etc/rc.d/mysql-server stop
/usr/local/bin/mysql_install_db
/usr/local/bin/mysqld_safe –user=mysql &
/usr/local/bin/mysqladmin -u root password newpassword
mysql -p
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
IDENTIFIED BY 'newpassword' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'mt2'@'localhost'
IDENTIFIED BY 'mt2!@#' WITH GRANT OPTION;
quit
reboot
newpassword ist nun dein neues "root" PW.
Fehler Codes :




j049# /usr/local/etc/rc.d/mysql-server stop
Stopping mysql.
Waiting for PIDS: 18306.
j049# /usr/local/bin/mysql_install_db

FATAL ERROR: Could not find ./bin/my_print_defaults

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

j049# /usr/local/bin/mysqld_safe .user=mysql &
[1] 18329
j049# 101105 12:24:44 mysqld_safe Logging to '/var/db/mysql/j049.err'.
101105 12:24:44 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
101105 12:24:45 mysqld_safe mysqld from pid file /var/db/mysql/j049.pid ended

[1] Done /usr/local/bin/mysqld_safe .user=mysql
j049# /usr/local/bin/mysqladmin -u root password newpassword
/usr/local/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
j049# mysql -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
j049# GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
GRANT: No match.
j049# IDENTIFIED BY 'newpassword' WITH GRANT OPTION;
IDENTIFIED: Command not found.
j049# GRANT ALL PRIVILEGES ON *.* TO 'mt2'@'localhost'
GRANT: No match.
j049# IDENTIFIED BY 'mt2!@#' WITH GRANT OPTION;
@: Event not found.
j049# quit
quit: Command not found.
j049#
09/06/2011 12:51 IgorGlock#13
Ok, dein Server hat gleich mehrere Defekte.
Lade erstmal dir paar Ordner i-wo auf dein PC über FTP herunter.
In /var/db/mysql
Alle Ordner außer "test" und "mysql".

Code:
/usr/local/etc/rc.d/mysql-server stop
cd /usr/ports/databases/mysql50-server/
make deinstall
make install WITH_XCHARSET=all clean
/usr/local/bin/mysql_install_db
#### [B]Hier lädst du die oben heruntergeladene Ordner wieder hoch[/B] ####
chown -R mysql /var/db/mysql/
chgrp -R mysql /var/db/mysql/
/usr/local/bin/mysqld_safe –user=mysql & ### beachte, dass dieser Befehl per Hand [B]kontrollier[/B]t werden muss!!!
/usr/local/bin/mysqladmin -u root password newpassword
mysql -p
newpassword
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
IDENTIFIED BY 'newpassword' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'mt2'@'localhost'
IDENTIFIED BY 'mt2!@#' WITH GRANT OPTION;
quit
09/06/2011 14:19 Seele™#14
Quote:
Originally Posted by IgorGlock View Post
Ok, dein Server hat gleich mehrere Defekte.
Lade erstmal dir paar Ordner i-wo auf dein PC über FTP herunter.
In /var/db/mysql
Alle Ordner außer "test" und "mysql".

Code:
/usr/local/etc/rc.d/mysql-server stop
cd /usr/ports/databases/mysql50-server/
make deinstall
make install WITH_XCHARSET=all clean
/usr/local/bin/mysql_install_db
#### [B]Hier lädst du die oben heruntergeladene Ordner wieder hoch[/B] ####
chown -R mysql /var/db/mysql/
chgrp -R mysql /var/db/mysql/
/usr/local/bin/mysqld_safe –user=mysql & ### beachte, dass dieser Befehl per Hand [B]kontrollier[/B]t werden muss!!!
/usr/local/bin/mysqladmin -u root password newpassword
mysql -p
newpassword
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
IDENTIFIED BY 'newpassword' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'mt2'@'localhost'
IDENTIFIED BY 'mt2!@#' WITH GRANT OPTION;
quit

Also immer wennn ich Mysql50 installieren will kommt nach der "installation"



rm: libtoolT: No such file or directory
config.status: executing default commands
=== configuring in innobase (/usr/ports/databases/mysql50-server/work/mysql-5.0.92/innobase)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local' '--localstatedir=/var/db/mysql' '--without-debug' '--without-readline' '--without-libedit' '--without-bench' '--without-extra-tools' '--with-libwrap' '--with-low-memory' '--with-comment=FreeBSD port: mysql-server-5.0.92' '--enable-thread-safe-client' '--with-extra-charsets=all' '--enable-assembler' '--with-berkeley-db' '--with-named-thread-libs=-pthread' '--with-embedded-server' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd8.1' 'build_alias=i386-portbld-freebsd8.1' 'CC=cc' 'CFLAGS=-O2 -pipe -fPIC -fno-strict-aliasing' 'CPPFLAGS=' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -fPIC -fno-strict-aliasing -O2 -pipe -fPIC -fno-strict-aliasing -felide-constructors -fno-rtti -fno-exceptions' 'CPP=cpp' 'CFLAGS= -DDBUG_OFF -O2 -pipe -fPIC -fno-strict-aliasing ' 'CXXFLAGS= -DDBUG_OFF -O2 -pipe -fPIC -fno-strict-aliasing -O2 -pipe -fPIC -fno-strict-aliasing -felide-constructors -fno-rtti -fno-exceptions -fno-implicit-templates -fno-exceptions -fno-rtti -DMYSQLD_NET_RETRY_COUNT=1000000' --cache-file=/dev/null --srcdir=.
checking build system type... i386-portbld-freebsd8.1
checking host system type... i386-portbld-freebsd8.1
checking target system type... i386-portbld-freebsd8.1
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... configure: error: newly created file is older than distributed files!
Check your system clock
configure: error: ./configure failed for innobase
===> Script "configure" failed unexpectedly.
Please report the problem to [Only registered and activated users can see links. Click Here To Register...] [maintainer] and attach the
"/usr/ports/databases/mysql50-server/work/mysql-5.0.92/config.log" including
the output of the failure of your make command. Also, it might be a good idea
to provide an overview of all packages installed on your system (e.g. an `ls
/var/db/pkg`).
*** Error code 1

Stop in /usr/ports/databases/mysql50-server.



Deswegen habe ich ja MySQL55 installiert und diese ganzen Probleme..



Hoffe ihr habt eine Lösung.


Danke im Voraus!
09/06/2011 15:37 Mashkin#15
@ Seele: Das selbe Problem hatte ich vor zwei Tagen auch auf meinem Test-System, allerdings sollte man sich als root auf localhost noch anmelden können...

Nachdem jetzt schon so viel versucht wurde, solltest du erstmal eine neue Datenbank aufsetzen, um vorher geschehene Fehler auszuschließen.

Am sichersten (sicher in dem Fall, das wirklich alles zurückgesetzt wird):

MySQL-Server stoppen: /usr/local/etc/rc.d/mysql-server stop
Alle (!) Tabellen löschen: rm -R /var/db/mysql
MySQL-Server neu starten: /usr/local/etc/rc.d/mysql-server start

Nun sollte dein MySQL-Server wieder genau so funktionieren, wie direkt nach der Installation.

Nun versuche mal, dich mit
Code:
mysql -u root -h localhost mysql
anzumelden.

Wenn danach nach einem Passwort gefragt wird, versuch das Passwort, was du auch für den Login über SSH (mit PuTTY) verwendest.