Problem z uruchomieniem serwera MySQL

Serwery i sieci oparte na Slackware, wszelkiego rodzaju usługi, troubleshooting.

Moderatorzy: Moderatorzy, Administratorzy

Smigielpl
Użytkownik
Posty: 12
Rejestracja: 2009-01-23, 12:26

Re: Problem z uruchomieniem serwera MySQL

Post autor: Smigielpl »

Dzięki za pomoc, a moglibyście jeszcze pomóc mi z uruchomieniem serwera mysql?

Kod: Zaznacz cały

bash-3.1# mysqld_safe
nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/lib/mysql/host.pid
090310 21:58:31  mysqld ended
Plik host.err

Kod: Zaznacz cały

090310 21:58:30  mysqld started
nohup: ignoring input
090310 21:58:30 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090310 21:58:30 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
InnoDB: Log scan progressed past the checkpoint lsn 0 36808
090310 21:58:30  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
090310 21:58:30  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
090310 21:58:31  InnoDB: Started; log sequence number 0 43655
090310 21:58:31 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
090310 21:58:31 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
090310 21:58:31 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
090310 21:58:31  mysqld ended
Próbowałem już mysql_install_db, ale nie pomogło.
Awatar użytkownika
dienet
Moderator
Posty: 2105
Rejestracja: 2007-07-24, 18:58
Lokalizacja: Racibórz/Rybnik

Re: Problem z uruchomieniem serwera MySQL

Post autor: dienet »

Kod: Zaznacz cały

bash-3.1# mysqld_safe 
nohup: ignoring input and redirecting stderr to stdout 
Starting mysqld daemon with databases from /var/lib/mysql 
STOPPING server from pid file /var/lib/mysql/host.pid 
090310 21:58:31  mysqld ended
Tak sie nie odpala mysql. Zobacz: /etc/rc.d/
Pozdr0
dienet
[img]http://i164.photobucket.com/albums/u19/slawek15/kotekeo0lq3.jpg[/img]
Smigielpl
Użytkownik
Posty: 12
Rejestracja: 2009-01-23, 12:26

Re: Problem z uruchomieniem serwera MySQL

Post autor: Smigielpl »

Dzieki za odp, ale dalej to samo :(

Kod: Zaznacz cały

bash-3.1# nohup: redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysql/mysql.pid
090310 22:27:19  mysqld ended
Awatar użytkownika
dienet
Moderator
Posty: 2105
Rejestracja: 2007-07-24, 18:58
Lokalizacja: Racibórz/Rybnik

Re: Problem z uruchomieniem serwera MySQL

Post autor: dienet »

# To start MySQL automatically at boot, be sure this script is executable:
# chmod 755 /etc/rc.d/rc.mysqld

# Before you can run MySQL, you must have a database. To install an initial
# database, do this as root:
#
# mysql_install_db --user=mysql
#
# Note that the mysql user must exist in /etc/passwd, and the created files
# will be owned by this dedicated user. This is important, or else mysql
# (which runs as user "mysql") will not be able to write to the database
# later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').
#
# To increase system security, consider using "mysql_secure_installation"
# as well. For more information on this tool, please read:
# man mysql_secure_installation
Zrobiles to?
Pozdr0
dienet
[img]http://i164.photobucket.com/albums/u19/slawek15/kotekeo0lq3.jpg[/img]
Smigielpl
Użytkownik
Posty: 12
Rejestracja: 2009-01-23, 12:26

Re: Problem z uruchomieniem serwera MySQL

Post autor: Smigielpl »

bash-3.1# mysql_secure_installation

(...)

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
Wygląda na to, że mysql_secure_installation trzeba odpalić już po uruchomieniu rc.mysqld chociaż tak naprawde to nie wiem o co chodzi.
night
Użytkownik
Posty: 2
Rejestracja: 2009-03-12, 10:34

Re: Problem z uruchomieniem serwera MySQL

Post autor: night »

Awatar użytkownika
dienet
Moderator
Posty: 2105
Rejestracja: 2007-07-24, 18:58
Lokalizacja: Racibórz/Rybnik

Re: Problem z uruchomieniem serwera MySQL

Post autor: dienet »

# Before you can run MySQL, you must have a database. To install an initial
# database, do this as root:
#
# mysql_install_db --user=mysql
Albo mi sie wydaje albo to przeoczyles?
Pozdr0
dienet
[img]http://i164.photobucket.com/albums/u19/slawek15/kotekeo0lq3.jpg[/img]
Smigielpl
Użytkownik
Posty: 12
Rejestracja: 2009-01-23, 12:26

Re: Problem z uruchomieniem serwera MySQL

Post autor: Smigielpl »

Rzeczywiście zapomniałem, ale polecenie i tak kończy się błędem:
Password:
bash-3.1# mysql_install_db --user=mysql
Installing MySQL system tables...
090312 11:45:17 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090312 11:45:17 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
ERROR: 1347 'mysql.db' is not BASE TABLE
090312 11:45:17 [ERROR] Aborting
(...)
@Edit
night,
przeczytałem ten twój temat i rzeczywiście, zadziałało

Kod: Zaznacz cały

bash-3.1# mysqld_safe --skip-grant-tables
nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
Niestety /etc/rc.d/rc.mysql dalej nie chce się uruchomić...
Ostatnio zmieniony 2009-03-12, 12:00 przez Smigielpl, łącznie zmieniany 1 raz.
night
Użytkownik
Posty: 2
Rejestracja: 2009-03-12, 10:34

Re: Problem z uruchomieniem serwera MySQL

Post autor: night »

a w /etc masz plik my.cnf ? (jak nie to musisz mieć) :)
wydaj komendę:

Kod: Zaznacz cały

mysql_install_db
Ostatnio zmieniony 2009-03-12, 12:15 przez night, łącznie zmieniany 1 raz.
magnusek
Użytkownik
Posty: 46
Rejestracja: 2004-10-05, 16:08

Re: Problem z uruchomieniem serwera MySQL

Post autor: magnusek »

było wiele razy...
po instalacji mysql z paczuszki wykonać:

1. mysql_install_db --user=mysql
2./etc/rc.d/rc.mysqld start
3. mysql_secure_installation

odpowiedziec na pytania i cieszyc sie baza :)
Smigielpl
Użytkownik
Posty: 12
Rejestracja: 2009-01-23, 12:26

Re: Problem z uruchomieniem serwera MySQL

Post autor: Smigielpl »

@Up
No tak, ale jak już pisałem mysql_install_db nie chce działać:

Kod: Zaznacz cały

bash-3.1# mysql_install_db --user=mysql
WARNING: The host 'host' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
090312 12:44:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090312 12:44:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
ERROR: 1347  'mysql.db' is not BASE TABLE
090312 12:44:14 [ERROR] Aborting

090312 12:44:14 [Note] /usr/libexec/mysqld: Shutdown complete

Installation of system tables failed!
Jeszcze raz zaznaczę, że mysqld_safe niewiedzieć czemu działa prawidłowo.
Ostatnio zmieniony 2009-03-12, 12:46 przez Smigielpl, łącznie zmieniany 1 raz.
miszmaniac
Moderator
Posty: 1510
Rejestracja: 2006-03-19, 12:00
Lokalizacja: Gdynia
Kontakt:

Re: Problem z uruchomieniem serwera MySQL

Post autor: miszmaniac »

Rozdzielam temat, bo to już nie ma nic wspólnego z tematem.
Pamiętaj,
Jeśli Twój problem został rozwiązany dopisz [b] [Rozw.] [/b]w tytule.
Projektowanie stron WWW: [url=http://www.miszewski.net.pl]www.miszewski.net.pl[/url]
magnusek
Użytkownik
Posty: 46
Rejestracja: 2004-10-05, 16:08

Re: Problem z uruchomieniem serwera MySQL

Post autor: magnusek »

WARNING: The host 'host' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !


Przetlumacz....masz pelna odpowiedz

mysql_install_db nie dziala...

Proponuje odinstalowac paczke mysql, nastepnie wykonac polecenie

Kod: Zaznacz cały

rm -rf /var/lib/mysql
i zainstalowac na nowo
czytajac za zrozumieniem to co wyswietla ;)
Ostatnio zmieniony 2009-03-12, 16:20 przez magnusek, łącznie zmieniany 1 raz.
Smigielpl
Użytkownik
Posty: 12
Rejestracja: 2009-01-23, 12:26

Re: Problem z uruchomieniem serwera MySQL

Post autor: Smigielpl »

Dobra poradziłem sobie.
Kiedy komputer nazywał się localhost wyświetlał się jakiś error związany z konfliktem nazw, nie wiem dokładnie o co chodzi ale gdzieś przeczytałem, że trzeba zmienić nazwę hosta z localhost na inną poleceniem hostname.
Zrobiłem właśnie tak, ale wtedy pojawiał się ten błąd:
bash-3.1# mysql_install_db --user=mysql
WARNING: The host 'host' could not be looked up with resolveip.
Wystarczyło nową nazwę hosta (w moim przypadku 'host') dodać do /etc/hosts i skojarzyć z 127.0.0.1.
Dzięki wszystkim za pomoc.

Mam jeszcze jedno pytanie, przy tym ostrzeżeniu wyświetla się taka wskazówka:
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges
Mógłby mi ktoś powiedzieć co zrobić, żeby tak jak kazali mysql używał adresów IP zamiast nazw hostów?
Bo wole żeby nazwa komputera została localhost...
Ostatnio zmieniony 2009-03-12, 17:17 przez Smigielpl, łącznie zmieniany 1 raz.
magnusek
Użytkownik
Posty: 46
Rejestracja: 2004-10-05, 16:08

Re: Problem z uruchomieniem serwera MySQL

Post autor: magnusek »

Smigielpl pisze: ...
Mam jeszcze jedno pytanie, przy tym ostrzeżeniu wyświetla się taka wskazówka:
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges
Mógłby mi ktoś powiedzieć co zrobić, żeby tak jak kazali mysql używał adresów IP zamiast nazw hostów?
Bo wole żeby nazwa komputera została localhost...
Wg informacji, sugeruje Ci zebys uzywal adresow IP a nie nazw hostow kiedy ustawiasz uprawnienia dostepu, np dodajesz uzytkownika ktory moze logowac sie do bazy danych z jakiegos komputera.
W ustawienie konta uzytkownika powinienes podac adres IP a nie np host.niebo.pl
ODPOWIEDZ