Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: MySQL - problem z konfoguracją
Forum PHP.pl > Forum > Bazy danych > MySQL
toudunio
Witam,

Jestem zupełnie początkująca. Kupiłam kurs php od podstaw i jedną z pierwszych rzeczy jest konfiguracja wamp/xampp

Najpierw miałam xampp, gdzie po drobnych zmianach w porcie udało mi się uruchomić apache. Niestety problem jest z uruchomieniem Mysql. Niby się uruchamia ale po chwili jest error i usługa jest wyłączana.
Wchodząc w logi mam informację:

Cytat
2015-12-13 13:27:38 420 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2015-12-13 13:27:38 1056 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-12-13 13:27:38 1056 [Note] InnoDB: The InnoDB memory heap is disabled
2015-12-13 13:27:38 1056 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-12-13 13:27:38 1056 [Note] InnoDB: Memory barrier is not used
2015-12-13 13:27:38 1056 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-12-13 13:27:38 1056 [Note] InnoDB: Not using CPU crc32 instructions
2015-12-13 13:27:38 1056 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-12-13 13:27:38 1056 [Note] InnoDB: Completed initialization of buffer pool
2015-12-13 13:27:38 1056 [Note] InnoDB: Restoring page 0 of tablespace 0
2015-12-13 13:27:38 1056 [Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0
2015-12-13 13:27:38 1056 [ERROR] InnoDB: space header page consists of zero bytes in data file C:\xampp\mysql\data\ibdata1
2015-12-13 13:27:38 1056 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2015-12-13 13:27:38 1056 [ERROR] Plugin 'InnoDB' init function returned error.
2015-12-13 13:27:38 1056 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2015-12-13 13:27:38 1056 [Note] Plugin 'FEEDBACK' is disabled.
2015-12-13 13:27:38 1056 [ERROR] Unknown/unsupported storage engine: InnoDB
2015-12-13 13:27:38 1056 [ERROR] Aborting



Próbowałam także z wamp, gdzie wchodziłam do konsoli mysql i zmieniałam hasło:
use mysql

UPDATE user
SET password=PASSWORD('haslo')
WHERE user='root';

a potem
FLUSH PRIVILEGES

Zmieniłam także hasło w pliku config.

Niestety po tym zabiegu nie mogę się zalogować ani do konsoli mysql ani do phpmyadmin
Cytat
#1045 - Access denied for user 'root'@'localhost' (using password: YES)

Szukałam w internecie informacji, próbowałam podmienić plik config na taki z pustym hasłem (https://www.youtube.com/watch?v=iA_UYg5MLZk ale to nie podziałało, dalej nie mogę się zalogować.

Podkreślę, że jestem zupełnie zielona w tych sprawach i nie mogę zupełnie ruszyć dalej. Byłabym bardzo wdzięczna, gdyby komuś udało się jakoś pomóc (najlepiej tłumacząc jak najprostszym językiem).

Pozdrawiam
trueblue
Plik bufora silnika InnoDB jest uszkodzony.

Spróbuj dodać do pliku konfiguracyjnego:
innodb_force_recovery=1
i wystartować jeszcze raz.

A jeśli nie pomoże, to będzie potrzebne usunięcie plików: ibdata i ib_logfile* i ponowny start.
Jeśli nie masz backupu, to mogły się pogubić całe bazy lub tabele w bazach.

http://webdevelopmentscripts.com/23-solved...ero-bytes-xampp
Tomplus
Jaką XAMPP posiadasz? Bo może masz bibliotekę która jest niekompatybilna ze sobą.

Dwa... polecam sprawdzić czy masz uruchomiony MySQL jako proces w systemie który blokuje kolejne uruchomienia - czyli sprawdź czy masz jakieś MySQL w Menadżerze Zadań.
toudunio
@trueblue

Chodziło o dodanie do pliku my.ini?

Również pojawił się error
Cytat
2015-12-13 14:24:03 c40 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2015-12-13 14:24:03 3136 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-12-13 14:24:03 3136 [Note] InnoDB: The InnoDB memory heap is disabled
2015-12-13 14:24:03 3136 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-12-13 14:24:03 3136 [Note] InnoDB: Memory barrier is not used
2015-12-13 14:24:03 3136 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-12-13 14:24:03 3136 [Note] InnoDB: Not using CPU crc32 instructions
2015-12-13 14:24:03 3136 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-12-13 14:24:03 3136 [Note] InnoDB: Completed initialization of buffer pool
2015-12-13 14:24:03 3136 [Note] InnoDB: Highest supported file format is Barracuda.
2015-12-13 14:24:03 3136 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1835427 in the ib_logfiles!
2015-12-13 14:24:03 3136 [Note] InnoDB: Database was not shutdown normally!
2015-12-13 14:24:03 3136 [Note] InnoDB: Starting crash recovery.
2015-12-13 14:24:03 3136 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-12-13 14:24:03 3136 [Note] InnoDB: Restoring possible half-written data pages
2015-12-13 14:24:03 3136 [Note] InnoDB: from the doublewrite buffer...


Po usunięciu podanych przez ciebie plików błąd:
Cytat
2015-12-13 14:24:03 c40 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2015-12-13 14:24:03 3136 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-12-13 14:24:03 3136 [Note] InnoDB: The InnoDB memory heap is disabled
2015-12-13 14:24:03 3136 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-12-13 14:24:03 3136 [Note] InnoDB: Memory barrier is not used
2015-12-13 14:24:03 3136 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-12-13 14:24:03 3136 [Note] InnoDB: Not using CPU crc32 instructions
2015-12-13 14:24:03 3136 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-12-13 14:24:03 3136 [Note] InnoDB: Completed initialization of buffer pool
2015-12-13 14:24:03 3136 [Note] InnoDB: Highest supported file format is Barracuda.
2015-12-13 14:24:03 3136 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1835427 in the ib_logfiles!
2015-12-13 14:24:03 3136 [Note] InnoDB: Database was not shutdown normally!
2015-12-13 14:24:03 3136 [Note] InnoDB: Starting crash recovery.
2015-12-13 14:24:03 3136 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-12-13 14:24:03 3136 [Note] InnoDB: Restoring possible half-written data pages
2015-12-13 14:24:03 3136 [Note] InnoDB: from the doublewrite buffer...
2015-12-13 14:26:36 177c InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2015-12-13 14:26:36 6012 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-12-13 14:26:36 6012 [Note] InnoDB: The InnoDB memory heap is disabled
2015-12-13 14:26:36 6012 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-12-13 14:26:36 6012 [Note] InnoDB: Memory barrier is not used
2015-12-13 14:26:36 6012 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-12-13 14:26:36 6012 [Note] InnoDB: Not using CPU crc32 instructions
2015-12-13 14:26:36 6012 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-12-13 14:26:36 6012 [Note] InnoDB: Completed initialization of buffer pool
2015-12-13 14:26:36 6012 [Note] InnoDB: The first specified data file C:\xampp\mysql\data\ibdata1 did not exist: a new database to be created!
2015-12-13 14:26:36 6012 [Note] InnoDB: Setting file C:\xampp\mysql\data\ibdata1 size to 10 MB
2015-12-13 14:26:36 6012 [Note] InnoDB: Database physically writes the file full: wait...
2015-12-13 14:26:36 6012 [Note] InnoDB: Setting log file C:\xampp\mysql\data\ib_logfile101 size to 5 MB
2015-12-13 14:26:36 6012 [Note] InnoDB: Setting log file C:\xampp\mysql\data\ib_logfile1 size to 5 MB
2015-12-13 14:26:36 6012 [Note] InnoDB: Renaming log file C:\xampp\mysql\data\ib_logfile101 to C:\xampp\mysql\data\ib_logfile0
2015-12-13 14:26:36 6012 [Warning] InnoDB: New log files created, LSN=45883
2015-12-13 14:26:36 6012 [Note] InnoDB: Doublewrite buffer not found: creating new
2015-12-13 14:26:36 6012 [Note] InnoDB: Doublewrite buffer created
2015-12-13 14:26:36 6012 [Note] InnoDB: 1 rollback segment(s) are active.
2015-12-13 14:26:36 6012 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-12-13 14:26:37 6012 [Note] InnoDB: Foreign key constraint system tables created
2015-12-13 14:26:37 6012 [Note] InnoDB: Creating tablespace and datafile system tables.
2015-12-13 14:26:37 6012 [Note] InnoDB: Tablespace and datafile system tables created.
2015-12-13 14:26:37 6012 [Note] InnoDB: Waiting for purge to start
2015-12-13 14:26:37 6012 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 0
2015-12-13 14:26:37 6012 [Note] InnoDB: exclamation.gif! innodb_force_recovery is set to 1 exclamation.gif!
2015-12-13 14:26:37 6092 [Note] InnoDB: Dumping buffer pool(s) not yet started
2015-12-13 14:26:37 6012 [Note] Plugin 'FEEDBACK' is disabled.
2015-12-13 14:26:37 6012 [Note] Recovering after a crash using tc.log
2015-12-13 14:26:37 6012 [ERROR] Bad magic header in tc log
2015-12-13 14:26:37 6012 [ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
2015-12-13 14:26:37 6012 [ERROR] Can't init tc log
2015-12-13 14:26:37 6012 [ERROR] Aborting




@Tomplus
mysql nie jest uruchomiony
XAMPP Version: 5.6.14
Control Panel Version: 3.2.2 [ Compiled: Nov 12th 2015 ]
trueblue
Pozwolę sobie napisać jeszcze raz:
Cytat(trueblue @ 13.12.2015, 14:02:15 ) *
A jeśli nie pomoże, to będzie potrzebne usunięcie plików: ibdata i ib_logfile* i ponowny start.
Jeśli nie masz backupu, to mogły się pogubić całe bazy lub tabele w bazach.

http://webdevelopmentscripts.com/23-solved...ero-bytes-xampp

toudunio
Przepraszam, rzeczywiście popełniłam błąd.

Zrobiłam według instrukcji i mysql ruszył.

Bardzo dziękuję za pomoc.

Mam jeszcze pytanie.

Chyba coś jest jeszcze nie tak z InnoDB

Kiedy próbuję przejść do bazy danych to dostaję taki komunikat.

http://zapodaj.net/38d941802bd5d.png.html
Pyton_000
pokaż my.conf
toudunio
Nie mam my.conf

mam tylko mysql_config.pl
ewentualnie my.ini

Czy to o to chodzi?

+kompletny kod z błędu ze screenu:
Cytat
SELECT tracking_active FROM `phpmyadmin`.`pma__tracking` WHERE db_name = 'mysql' AND table_name = 'columns_priv' ORDER BY version DESC
Pyton_000
no to my.ini
toudunio
Cytat
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# C:/xampp/mysql/bin/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:/xampp/mysql/data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
# password = your_password
port = 3306
socket = "C:/xampp/mysql/mysql.sock"


# Here follows entries for some specific programs

# The MySQL server
[mysqld]
default-storage-engine=MyISAM
port= 3306
socket = "C:/xampp/mysql/mysql.sock"
basedir = "C:/xampp/mysql"
tmpdir = "C:/xampp/tmp"
datadir = "C:/xampp/mysql/data"
pid_file = "mysql.pid"
# enable-named-pipe
key_buffer = 16M
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error = "mysql_error.log"
innodb_flush_method=normal

# Change here for bind listening
# bind-address="127.0.0.1"
# bind-address = ::1 # for ipv6

# Where do all the plugins live
plugin_dir = "C:/xampp/mysql/lib/plugin/"

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
# commented in by lampp security
#skip-networking
#skip-federated

# Replication Master Server (default)
# binary logging is required for replication
# log-bin deactivated by default since XAMPP 1.4.11
#log-bin=mysql-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# where you replace <host>, <user>, <password> by quoted strings and
# <port> by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin


# Point the following paths to different dedicated disks
#tmpdir = "C:/xampp/tmp"
#log-update = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# Comment the following if you are using InnoDB tables
skip-innodb
innodb_data_home_dir = "C:/xampp/mysql/data"
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = "C:/xampp/mysql/data"
#innodb_log_arch_dir = "C:/xampp/mysql/data"
## You can set .._buffer_pool_size up to 50 - 80 %
## of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
## Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

## UTF 8 Settings
#init-connect=\'SET NAMES utf8\'
#collation_server=utf8_unicode_ci
#character_set_server=utf8
#skip-character-set-client-handshake
#character_sets-dir="C:/xampp/mysql/share/charsets"

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
Pyton_000
zakomentuj

skip-innodb

toudunio
zakomentuj, czyli zmień na
# skip-innodb?

Kiedy tak zrobiłam to rozłączało mnie z mysql i nie mogłam się połączyć (logi usuwałam).

Załączam też logi-xampp uruchamia dobrze mysql ale jest problem z innodb

Cytat
2015-12-13 19:30:26 5820 [Note] Plugin 'InnoDB' is disabled.
2015-12-13 19:30:26 5820 [Note] Plugin 'FEEDBACK' is disabled.
2015-12-13 19:30:26 5820 [Note] Server socket created on IP: '::'.
2015-12-13 19:30:26 5820 [Note] Event Scheduler: Loaded 0 events
2015-12-13 19:30:26 1220 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1286: Unknown storage engine 'InnoDB'
2015-12-13 19:30:27 5820 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '10.1.8-MariaDB' socket: '' port: 3306 mariadb.org binary distribution



Znalazłam jeszcze taki fix ale nie wiem jak go zastosować
http://www.chriscalender.com/tag/failed-to...-engine-innodb/
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.