Strona 1 z 1

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-10, 22:00
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.

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-10, 22:13
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/

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-10, 22:27
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

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-11, 09:39
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?

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-11, 18:37
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.

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-12, 10:37
autor: night

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-12, 11:04
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?

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-12, 11:54
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ć...

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-12, 12:15
autor: night
a w /etc masz plik my.cnf ? (jak nie to musisz mieć) :)
wydaj komendę:

Kod: Zaznacz cały

mysql_install_db

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-12, 12:39
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 :)

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-12, 12:45
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.

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-12, 14:47
autor: miszmaniac
Rozdzielam temat, bo to już nie ma nic wspólnego z tematem.

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-12, 14:59
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 ;)

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-12, 17:14
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...

Re: Problem z uruchomieniem serwera MySQL

: 2009-03-12, 17:26
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