LinuxForum.Fans
Тема

Многократный запуск mysqld

Автор: post 25 сообщений 4644 просмотров
#156657

[console]#BEGIN CONFIG INFO
#DESCR: 4GB RAM, InnoDB only, ACID, few connections, heavy queries
#TYPE: SYSTEM
#END CONFIG INFO

#
# This is a MySQL example config file for systems with 4GB of memory
# running mostly MySQL using InnoDB only tables and performing complex
# queries with few connections.[/console]

#156658
drBatty написал:
[quote=Hrafn]каким образом хоть напишите

ну раз у нас тут "крос-дистрибутивные", то в слаке админ выбирает один из
[console]$ ls /etc/my-*
/etc/my-huge.cnf /etc/my-large.cnf /etc/my-medium.cnf /etc/my-small.cnf
[/console]
этих конфигов. В Debian'е там такое симпотное меню. А в CentOS как-то по RH'атовски :)[/quote]
ну, как это делается в Шапке и где лежат - я как раз и написал

#186347

Добрый день, у меня:

Виртуальный сервер на selectel.ru, CentOS 5.3, CPU - 256MHz, RAM - 256Mb, HDD - 25,6Gb

Пытаюсь поставить MySQL 5.5 следующим путем:

text
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
yum --enablerepo=remi install mysql-server
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start

Выдает это:

text
[root@cs5000 usr]# /etc/init.d/mysqld start
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]

В логе пишет это:

text
[root@cs5000 usr]# tail -n 20 /var/lib/mysql/cs5000.selectel.ru.err
110822 23:31:09 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
110822 23:31:09 [Note] Plugin 'FEDERATED' is disabled.
110822 23:31:09 InnoDB: The InnoDB memory heap is disabled
110822 23:31:09 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
110822 23:31:09 InnoDB: Compressed tables use zlib 1.2.3
110822 23:31:09 InnoDB: Using Linux native AIO
110822 23:31:09 InnoDB: Initializing buffer pool, size = 128.0M
110822 23:31:09 InnoDB: Completed initialization of buffer pool
InnoDB: Error: pthread_create returned 12
110822 23:31:09 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
110822 23:34:06 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
110822 23:34:06 [Note] Plugin 'FEDERATED' is disabled.
110822 23:34:06 InnoDB: The InnoDB memory heap is disabled
110822 23:34:06 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
110822 23:34:06 InnoDB: Compressed tables use zlib 1.2.3
110822 23:34:06 InnoDB: Using Linux native AIO
110822 23:34:06 InnoDB: Initializing buffer pool, size = 128.0M
110822 23:34:06 InnoDB: Completed initialization of buffer pool
InnoDB: Error: pthread_create returned 12
110822 23:34:06 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

В my.cnf вставил текст из my-small.cnf (ни стандартный, ни маленький не работают, вот содержимое):

text
# 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.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# 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 = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server [mysqld] port = 3306 socket = /var/lib/mysql/mysql.sock skip-external-locking key_buffer_size = 16K max_allowed_packet = 1M table_open_cache = 4 sort_buffer_size = 64K read_buffer_size = 256K read_rnd_buffer_size = 256K net_buffer_length = 2K thread_stack = 128K

# 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 # (using the "enable-named-pipe" option) will render mysqld useless! # #skip-networking server-id = 1

# Uncomment the following if you want to log updates #log-bin=mysql-bin

# binary logging format - mixed recommended #binlog_format=mixed

# Causes updates to non-transactional engines using statement format to be # written directly to binary log. Before using this option make sure that # there are no dependencies between transactional and non-transactional # tables such as in the statement INSERT INTO t_myisam SELECT * FROM # t_innodb; otherwise, slaves may diverge from the master. #binlog_direct_non_transactional_updates=TRUE

# Uncomment the following if you are using InnoDB tables #innodb_data_home_dir = /var/lib/mysql #innodb_data_file_path = ibdata1:10M:autoextend #innodb_log_group_home_dir = /var/lib/mysql # 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

[mysqldump] quick max_allowed_packet = 16M

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

[myisamchk] key_buffer_size = 8M sort_buffer_size = 8M

[mysqlhotcopy] interactive-timeout

Я весь день пытаюсь установить вебсервер на эту виртуальную машину, никак не получается, помогите пожалуйста, реально замучался.
Осталось только эту базу данных запустить, с остальными прогами думаю проблем не будет... :(

И странно что он ругается на InnoDB если она отключена... :(

Либо такой вариант, log:

text
[root@cs5000 usr]# tail -n 30 /var/lib/mysql/cs5000.selectel.ru.err
110822 23:57:40 InnoDB: Using Linux native AIO
110822 23:57:40 InnoDB: Initializing buffer pool, size = 128.0M
110822 23:57:40 InnoDB: Completed initialization of buffer pool
InnoDB: Error: pthread_create returned 12
110822 23:57:40 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
110822 23:59:08 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
110822 23:59:08 [Note] Plugin 'FEDERATED' is disabled.
110822 23:59:08 InnoDB: The InnoDB memory heap is disabled
110822 23:59:08 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
110822 23:59:08 InnoDB: Compressed tables use zlib 1.2.3
110822 23:59:08 InnoDB: Using Linux native AIO
110822 23:59:08 InnoDB: Initializing buffer pool, size = 70.0M
110822 23:59:08 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
110822 23:59:08  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
110822 23:59:08  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 20 MB
InnoDB: Database physically writes the file full: wait...
110822 23:59:08  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 20 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
InnoDB: Error: pthread_create returned 12
110822 23:59:09 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
[root@cs5000 usr]# /etc/init.d/mysqld start
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]
[root@cs5000 usr]# tail -n 30 /var/lib/mysql/cs5000.selectel.ru.err
InnoDB: Setting log file ./ib_logfile1 size to 20 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
InnoDB: Error: pthread_create returned 12
110822 23:59:09 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
110823 00:01:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
110823  0:01:38 [Note] Plugin 'FEDERATED' is disabled.
110823  0:01:38 InnoDB: The InnoDB memory heap is disabled
110823  0:01:38 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
110823  0:01:38 InnoDB: Compressed tables use zlib 1.2.3
110823  0:01:38 InnoDB: Using Linux native AIO
110823  0:01:38 InnoDB: Initializing buffer pool, size = 70.0M
110823  0:01:38 InnoDB: Completed initialization of buffer pool
110823  0:01:38 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 48941
110823  0:01:38  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 1595675
110823  0:01:38  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 1 2 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
InnoDB: Error: pthread_create returned 12
110823 00:01:38 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
[root@cs5000 usr]#

my.conf:

text
# 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.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# 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 = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server [mysqld] port = 3306 socket = /var/lib/mysql/mysql.sock skip-external-locking key_buffer_size = 16K max_allowed_packet = 1M table_open_cache = 4 sort_buffer_size = 64K read_buffer_size = 256K read_rnd_buffer_size = 256K net_buffer_length = 2K thread_stack = 128K

# 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 # (using the "enable-named-pipe" option) will render mysqld useless! # #skip-networking server-id = 1

# Uncomment the following if you want to log updates #log-bin=mysql-bin

# binary logging format - mixed recommended #binlog_format=mixed

# Causes updates to non-transactional engines using statement format to be # written directly to binary log. Before using this option make sure that # there are no dependencies between transactional and non-transactional # tables such as in the statement INSERT INTO t_myisam SELECT * FROM # t_innodb; otherwise, slaves may diverge from the master. #binlog_direct_non_transactional_updates=TRUE

# Uncomment the following if you are using InnoDB tables #innodb_data_home_dir = /var/lib/mysql innodb_data_file_path = ibdata1:10M:autoextend #innodb_log_group_home_dir = /var/lib/mysql # 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_buffer_pool_size=70M #innodb_additional_mem_pool_size = 2M innodb_additional_mem_pool_size=10M # Set .._log_file_size to 25 % of buffer pool size #innodb_log_file_size = 5M #innodb_log_buffer_size = 8M innodb_log_file_size=20M innodb_log_buffer_size=8M #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50 innodb_flush_log_at_trx_commit=1

[mysqldump] quick max_allowed_packet = 16M

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

[myisamchk] key_buffer_size = 8M sort_buffer_size = 8M

[mysqlhotcopy] interactive-timeout

#skip-innodb

Кстати skip-innodb никогда не помогала

#186359

Вот у меня теперь такая небольшая ошибка, как ее брать?

text
110823 01:03:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
110823  1:03:49 [ERROR] Unknown/unsupported storage engine: InnoDB
110823  1:03:49 [ERROR] Aborting

110823 1:03:49 [Note] /usr/libexec/mysqld: Shutdown complete

110823 01:03:49 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

#186604
nbid написал:
Вот у меня теперь такая небольшая ошибка, как ее брать?

как вы поставили MySQL?
из исходников? какой сейчас конфиг? (только плз без комментариев)

Войдите или зарегистрируйтесь, чтобы ответить.