• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[gelöst]MySql und phpmyadmin probleme

bassmasta

Member
Hallo,
Ich bin neuling und möchte den umgang mit datenbaken, webservern und co. lernen.
Ich habe mir dazu einen alten pc zum server umfunktioniert und auf dem ein suse 10.3 ohne grafische oberfläche laufen. (400mhz und 512mb ram reichen da einfach nicht)
Nun habe ich den apache, php5, mysql und phpmyadmin installiert.
Der apache läuft schon recht gut, php funktioniert und er ist schon online, nur mit der datebnk und deren verwaltung wills noch nicht so recht :D
Links zu allemeinen infos für webserver und dem administrien von MySql wären nich schlecht, ich weis nichtmal wie ich einen beutzer anlege, geschweige denn wie ich alles halbwegs sicher einrichte^^.
Ich bin kein anfänger unter linux aber ich werde schon einige hilfe brauchen.

Erste ernstahfte probleme sind volgende:

Beim aufrufen von phpmyadmin kommt volgende meldung:
Code:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
Als lösung wird das ausführen eines config scriptes beschrieben aber dieses ist garnicht vorhanden?
Code:
Eine mögliche Ursache wäre, dass sie noch keine Konfigurationsdatei angelegt haben. Verwenden Sie in diesem Fall doch das Setup-Skript, um eine solche zu erstellen.

Das script soll unter
Code:
phpMyAdmin/scripts/setup.php
liegen aber es existrt nichmal der scripts ordner:
Code:
server1:/srv/www/htdocs/phpMyAdmin # l
insgesamt 1224
drwxr-xr-x  6 root root   4096 27. Sep 19:16 ./
drwxrwxrwx  5 root root   4096 27. Sep 19:15 ../
-rw-r--r--  1 root root  10850 10. Mär 2008  browse_foreigners.php
-rw-r--r--  1 root root    758 10. Mär 2008  calendar.php
-rw-r--r--  1 root root   3459 10. Mär 2008  changelog.php
-rw-r--r--  1 root root    460 10. Mär 2008  chk_rel.php
-rw-r--r--  1 root root   1752 10. Mär 2008  config.sample.inc.php
-rw-r--r--  1 root root   1428 10. Mär 2008  db_create.php
-rw-r--r--  1 root root  10667 10. Mär 2008  db_datadict.php
-rw-r--r--  1 root root   2475 10. Mär 2008  db_export.php
-rw-r--r--  1 root root    471 10. Mär 2008  db_import.php
-rw-r--r--  1 root root  18376 10. Mär 2008  db_operations.php
-rw-r--r--  1 root root   7404 10. Mär 2008  db_printview.php
-rw-r--r--  1 root root  34733 10. Mär 2008  db_qbe.php
-rw-r--r--  1 root root  13672 10. Mär 2008  db_search.php
-rw-r--r--  1 root root    852 10. Mär 2008  db_sql.php
-rw-r--r--  1 root root  22299 10. Mär 2008  db_structure.php
-rw-r--r--  1 root root   4583 10. Mär 2008  docs.css
-rw-r--r--  1 root root 220822 10. Mär 2008  Documentation.html
-rw-r--r--  1 root root   2167 10. Mär 2008  error.php
-rw-r--r--  1 root root  24151 10. Mär 2008  export.php
-rw-r--r--  1 root root  13934 10. Mär 2008  import.php
-rw-r--r--  1 root root   6037 10. Mär 2008  index.php
drwxr-xr-x  2 root root   4096 27. Sep 19:15 js/
drwxr-xr-x  2 root root  12288 27. Sep 19:15 lang/
drwxr-xr-x 10 root root   4096 27. Sep 19:16 libraries/
-rw-r--r--  1 root root    411 10. Mär 2008  license.php
-rw-r--r--  1 root root  15709 10. Mär 2008  main.php
-rw-r--r--  1 root root  24632 10. Mär 2008  navigation.php
-rw-r--r--  1 root root  27182 10. Mär 2008  pdf_pages.php
-rw-r--r--  1 root root  52735 10. Mär 2008  pdf_schema.php
-rw-r--r--  1 root root    360 10. Mär 2008  phpinfo.php
-rw-r--r--  1 root root  16369 10. Mär 2008  phpmyadmin.css.php
-rw-r--r--  1 root root  11227 10. Mär 2008  pmd_common.php
-rw-r--r--  1 root root   1917 10. Mär 2008  pmd_display_field.php
-rw-r--r--  1 root root  18486 10. Mär 2008  pmd_general.php
-rw-r--r--  1 root root    880 10. Mär 2008  pmd_help.php
-rw-r--r--  1 root root   3398 10. Mär 2008  pmd_pdf.php
-rw-r--r--  1 root root   3935 10. Mär 2008  pmd_relation_new.php
-rw-r--r--  1 root root   1879 10. Mär 2008  pmd_relation_upd.php
-rw-r--r--  1 root root   2248 10. Mär 2008  pmd_save_pos.php
-rw-r--r--  1 root root   9624 10. Mär 2008  querywindow.php
-rw-r--r--  1 root root    403 10. Mär 2008  readme.php
-rw-r--r--  1 root root   7653 10. Mär 2008  server_binlog.php
-rw-r--r--  1 root root   2784 10. Mär 2008  server_collations.php
-rw-r--r--  1 root root  13284 10. Mär 2008  server_databases.php
-rw-r--r--  1 root root   4917 10. Mär 2008  server_engines.php
-rw-r--r--  1 root root   1639 10. Mär 2008  server_export.php
-rw-r--r--  1 root root    486 10. Mär 2008  server_import.php
-rw-r--r--  1 root root 110617 10. Mär 2008  server_privileges.php
-rw-r--r--  1 root root   2869 10. Mär 2008  server_processlist.php
-rw-r--r--  1 root root    581 10. Mär 2008  server_sql.php
-rw-r--r--  1 root root  21173 10. Mär 2008  server_status.php
-rw-r--r--  1 root root   2462 10. Mär 2008  server_variables.php
-rw-r--r--  1 root root    317 10. Mär 2008  show_config_errors.php
-rw-r--r--  1 root root  29694 10. Mär 2008  sql.php
-rw-r--r--  1 root root   9097 10. Mär 2008  tbl_addfield.php
-rw-r--r--  1 root root   9463 10. Mär 2008  tbl_alter.php
-rw-r--r--  1 root root  46125 10. Mär 2008  tbl_change.php
-rw-r--r--  1 root root   9261 10. Mär 2008  tbl_create.php
-rw-r--r--  1 root root   3864 10. Mär 2008  tbl_export.php
-rw-r--r--  1 root root    635 10. Mär 2008  tbl_import.php
-rw-r--r--  1 root root  15997 10. Mär 2008  tbl_indexes.php
-rw-r--r--  1 root root   2016 10. Mär 2008  tbl_move_copy.php
-rw-r--r--  1 root root  19274 10. Mär 2008  tbl_operations.php
-rw-r--r--  1 root root  18218 10. Mär 2008  tbl_printview.php
-rw-r--r--  1 root root  24309 10. Mär 2008  tbl_relation.php
-rw-r--r--  1 root root  12657 10. Mär 2008  tbl_replace.php
-rw-r--r--  1 root root   4423 10. Mär 2008  tbl_row_action.php
-rw-r--r--  1 root root  17905 10. Mär 2008  tbl_select.php
-rw-r--r--  1 root root    833 10. Mär 2008  tbl_sql.php
-rw-r--r--  1 root root  33845 10. Mär 2008  tbl_structure.php
drwxr-xr-x  4 root root   4096 27. Sep 19:16 themes/
-rw-r--r--  1 root root   1096 10. Mär 2008  themes.php
-rw-r--r--  1 root root   1752 10. Mär 2008  transformation_overview.php
-rw-r--r--  1 root root   4068 10. Mär 2008  transformation_wrapper.php
-rw-r--r--  1 root root   8213 10. Mär 2008  translators.html
-rw-r--r--  1 root root   3573 10. Mär 2008  user_password.php
-rw-r--r--  1 root root   4192 10. Mär 2008  view_create.php

Bitte schnelle hilfe wenn phpmyadmin für mich ideal ist!
 

spoensche

Moderator
Teammitglied
Du musst das Passwort für den MySQL Benutzer in der Datei config.inc.php eintragen. Falls du noch kein Passwort für den Datenbankbenutzer root eingegeben hast musst du das vorher mit dem Konsolen Tool mysqladmin machen.


http://wiki.linux-club.de/opensuse/Mysql
 
OP
bassmasta

bassmasta

Member
Erst habe ich dieses versucht:
Code:
mysqladmin -u root password "geheim"
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
Ein fehler :p

Dann mit mysqladmin:
Code:
mysqladmin --user=root --password=<NO> password <geheim>
-bash: syntax error near unexpected token `newline'
Wieder fehler... kann jemad das schritt für schritt erklären?
 

tisu

Hacker
Hi,

ich habe mal einwenig gegoogelt und dabei das gefunden...

http://noebis.pi-noe.ac.at/mysql/MySQL-Reid/mysql02.htm
 
OP
bassmasta

bassmasta

Member
Bin jetzt durch diese seite etwas weitergekommen: http://www.linux-fuer-blinde.de/97-0-vergessenes-root-kennwort-neu-festlegen.html
Nun muss ich die datenkank aber noch etwas bequemer verwalten :D
Gibt es keine alternativen zum phpmyadmin?
Was wäre das beste, schnellste und sicherste?

EDIT
: Habe immer noch kein root passwort :schockiert:
Helft mir! ^^

Ich komme aber mit:
Code:
mysql -u user_root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.0.67 SUSE MySQL RPM

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

mysql>
Rein nur wenn ich dan das passwort änderen möchte wieder dies:
Code:
mysql> update user set Password=password('neues_passwort') where user='root';
ERROR 1046 (3D000): No database selected
 

spoensche

Moderator
Teammitglied
Statt
bassmasta schrieb:
Code:
mysql> update user set Password=password('neues_passwort') where user='root';
ERROR 1046 (3D000): No database selected

musst du folgendes für die Passwortänderung verwenden:

Code:
SET PASSWORD FOR root@localhost=PASSWORD('new_password');
FLUSH PRIVILEGES
 
OP
bassmasta

bassmasta

Member
Code:
mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.67 SUSE MySQL RPM

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

mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
mysql> FLUSH PRIVILEGES

? warum das? Wie mede ich mich denn am anfang an?

PS: Phpmyadmin geht :D Ich will nur noch das root passwort der datenbank änderen!
 

spoensche

Moderator
Teammitglied
Dein Server wird mit der Option --skip-grant-tables gestartet, wieso auch immer.
Beende den MySQL- Server mal mit
Code:
/etc/init.d/mysql stop
und starte ihn anschließend manuell mit
Code:
mysqld_safe
. Dann änderst du das root Passwort, beendest den manuell gestarteten Server und startest ihn anschlißend mit
Code:
/etc/init.d/mysql start
neu.
 
Oben