instalacja serwera mysql

Konfiguracja serwerów, usług, itp.
dan-j2
Beginner
Posty: 127
Rejestracja: 17 maja 2007, 13:31

instalacja serwera mysql

Post autor: dan-j2 »

Witam.
Próbowałem zainstalować z pomocą apt-get mysql ale nie startuje po instalacji. Potem próbowałem instalować mysql ze źródeł ale wyskakuje mi taki błąd:

Kod: Zaznacz cały

debian:/usr/local/src/mysql# ./configure --prefix=/usr/local/mysqld
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you.  If you run into any trouble, please
consult the MySQL manual, that you can find in the Docs directory.

Installing MySQL system tables...
ERROR: 1582  Duplicate entry '%-test-' for key 'PRIMARY'
070621 22:35:41 [ERROR] Aborting

070621 22:35:41 [Note] ./bin/mysqld: Shutdown complete

Installation of system tables failed!

Examine the logs in ./data for more information.
You can try to start the mysqld daemon with:
./bin/mysqld --skip-grant &
and use the command line tool
./bin/mysql to connect to the mysql
database and look at the grant tables:

shell> ./bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in ./data that may be helpful.

The latest information about MySQL is available on the web at
[url]http://www.mysql.com[/url]
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the ./bin/mysqlbug script!
debian:/usr/local/src/mysql# ./configure --prefix=/usr/local/mysql --with-charset=latin2
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you.  If you run into any trouble, please
consult the MySQL manual, that you can find in the Docs directory.

Installing MySQL system tables...
ERROR: 1582  Duplicate entry '%-test-' for key 'PRIMARY'
070621 22:37:09 [ERROR] Aborting

070621 22:37:09 [Note] ./bin/mysqld: Shutdown complete

Installation of system tables failed!

Examine the logs in ./data for more information.
You can try to start the mysqld daemon with:
./bin/mysqld --skip-grant &
and use the command line tool
./bin/mysql to connect to the mysql
database and look at the grant tables:

shell> ./bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in ./data that may be helpful.

The latest information about MySQL is available on the web at
[url]http://www.mysql.com[/url]
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the ./bin/mysqlbug script!
O co w tym może chodzić? Próbuję zainstalować mysql ale nie daję rady.
chyl-o
Junior Member
Posty: 621
Rejestracja: 24 maja 2006, 21:06
Lokalizacja: Lublin

Post autor: chyl-o »

A powiedz co wywalal mysql z paczek że nie chciał wstać ?
dan-j2
Beginner
Posty: 127
Rejestracja: 17 maja 2007, 13:31

Post autor: dan-j2 »

wywala cos takiego przy probie odpalenia

Kod: Zaznacz cały

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
chyl-o
Junior Member
Posty: 621
Rejestracja: 24 maja 2006, 21:06
Lokalizacja: Lublin

Post autor: chyl-o »

pokaz

Kod: Zaznacz cały

/etc/mysql/my.cnf | grep -v '#'

Kod: Zaznacz cały

netstat -lnp | grep mysql
i sprawdz prawa zapisu w /var/run w katalogu mysqld

pozdr.
wojtekz_
Beginner
Posty: 337
Rejestracja: 13 marca 2007, 16:50
Lokalizacja: Warszawa

Re: problem z instalacja serwera mysql

Post autor: wojtekz_ »

dan-j2 pisze:(...)

Kod: Zaznacz cały

debian:/usr/local/src/mysql# ./configure --prefix=/usr/local/mysqld
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you.  If you run into any trouble, please
consult the MySQL manual, that you can find in the Docs directory.

Installing MySQL system tables...
ERROR: 1582  Duplicate entry '%-test-' for key 'PRIMARY'
070621 22:35:41 [ERROR] Aborting
(...)
o co z tym moze chodzic proboje zrobic tego mysql ale niedaje rade :/
Ten błąd wskazuje, że to nie problem instalacji jako takiej, tylko bazy danych. Polecenie, które wywołujesz próbuje utworzyć bazę danych i ją odpalić. Ponieważ baza już jest, więc się to nie udaje ze względu na duplikacje unikalnych indeksów. Prawdopodobnie trzeba usunąć już istniejącą bazę danych.

Pozdrawiam
dan-j2
Beginner
Posty: 127
Rejestracja: 17 maja 2007, 13:31

Post autor: dan-j2 »

Wczoraj robilem aktualizacje systemu oczywiscie jak zwykle zawsze cos sie narypalo po aktualizacji tym razem wywalilo mi procesy z pliku rc ktore ma podnosic przy starcie to mysql niby w procesach widnieje

Kod: Zaznacz cały

root      2447  0.0  0.1   2428  1276 ?        S    11:38   0:00 /bin/sh /usr/bin/mysqld_safe
mysql    18001  0.0  1.6  77948 17108 ?        S    11:38   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/my
root     27052  0.0  0.0   1384   480 ?        S    11:38   0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
mysql    13636  0.0  1.6  77948 17108 ?        S    11:38   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/my
mysql     4476  0.0  1.6  77948 17108 ?        S    11:38   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/my
mysql     4880  0.0  1.6  77948 17108 ?        S    11:38   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/my
mysql     7218  0.0  1.6  77948 17108 ?        S    11:38   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/my
mysql    22585  0.0  1.6  77948 17108 ?        S    11:38   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/my
mysql     4861  0.0  1.6  77948 17108 ?        S    11:38   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/my
mysql    31869  0.0  1.6  77948 17108 ?        S    11:38   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/my
mysql    23371  0.0  1.6  77948 17108 ?        S    11:38   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/my
mysql     9645  0.0  1.6  77948 17108 ?        S    11:38   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/my
mysql    28993  0.0  1.6  77948 17108 ?        S    11:38   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/my
ale przez phpmyadmin laczyc mi sie nie chce i lms z tamtych komend co mi podales wywala takie cos

Kod: Zaznacz cały

debian:~# /etc/mysql/my.cnf | grep -v '#'
-bash: /etc/mysql/my.cnf: Brak dostępu

Kod: Zaznacz cały

debian:~# netstat -lnp | grep mysql
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     1                                                                             8001/mysqld
unix  2      [ ACC ]     STREAM     LISTENING     3127     18001/mysqld        /
chyl-o
Junior Member
Posty: 621
Rejestracja: 24 maja 2006, 21:06
Lokalizacja: Lublin

Post autor: chyl-o »

Kod: Zaznacz cały

/etc/mysql/my.cnf | grep -v '#'
nie tak tylko

Kod: Zaznacz cały

cat /etc/mysql/my.cnf | grep -v '#'
A jak z zapisem do katalogu z socketem?
dan-j2
Beginner
Posty: 127
Rejestracja: 17 maja 2007, 13:31

Post autor: dan-j2 »

podaje wynik:

Kod: Zaznacz cały

debian:~# cat /etc/mysql/my.cnf | grep -v '#'

[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock


[mysqld_safe]
socket          = /var/run/mysqld/mysqld.sock
nice            = 0

[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
skip-external-locking
bind-address            = 127.0.0.1
key_buffer              = 16M
max_allowed_packet      = 16M
thread_stack            = 128K
thread_cache_size       = 8
query_cache_limit       = 1M
query_cache_size        = 16M
log_bin                 = /var/log/mysql/mysql-bin.log
expire_logs_days        = 10
max_binlog_size         = 100M
skip-bdb



[mysqldump]
quick
quote-names
max_allowed_packet      = 16M

[mysql]

[isamchk]
key_buffer              = 16M



!includedir /etc/mysql/conf.d/
chyl-o
Junior Member
Posty: 621
Rejestracja: 24 maja 2006, 21:06
Lokalizacja: Lublin

Post autor: chyl-o »

jak z zapisem w katalogu z socketem?

na firewallu nie masz zablokowanego portu 3306 na lo?
dan-j2
Beginner
Posty: 127
Rejestracja: 17 maja 2007, 13:31

Post autor: dan-j2 »

na firewallu napewno nie ma blokady tego portu jedynie jest 135-139 i 445 a jezeli chodzi o plik mysql.sock w katalogu '/var/lib/mysql/' to nie wiem dlaczego ale nie ma wogle tego pliku
ODPOWIEDZ