Проблема с MYSQL

Автор Дмитрий, 08 ноября 2011, 22:10:42

« назад - далее »

0 Пользователи и 1 гость просматривают эту тему.

Дмитрий

Приветствую.
У меня следующая ситуация. Требуется настроить веб-сервер на Debian 6. У меня был опыт настройки однажды, и у меня с моими кривыми руками все получилось. А сейчас не получается.
Я установил apache2 php5.
Mysql - устанавливается:


server:~# apt-get install mysql-server mysql-client php5-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libmysqlclient16 mysql-client-5.1 mysql-common
  mysql-server-5.1
Suggested packages:
  libterm-readkey-perl tinyca
The following NEW packages will be installed:
  libdbd-mysql-perl libmysqlclient16 mysql-client mysql-client-5.1
  mysql-common mysql-server mysql-server-5.1 php5-mysql
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/19.1 MB of archives.
After this operation, 47.1 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
  ? If this field is left blank, the password will not be changed.          ?
Selecting previously deselected package mysql-common.
(Reading database ... 23121 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.1.49-3_all.deb) ...
Selecting previously deselected package libmysqlclient16.
Unpacking libmysqlclient16 (from .../libmysqlclient16_5.1.49-3_amd64.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.016-1_amd64.deb) ...
Selecting previously deselected package mysql-client-5.1.
Unpacking mysql-client-5.1 (from .../mysql-client-5.1_5.1.49-3_amd64.deb) ...
Processing triggers for man-db ...
Setting up mysql-common (5.1.49-3) ...
Selecting previously deselected package mysql-server-5.1.
(Reading database ... 23235 files and directories currently installed.)
Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.49-3_amd64.deb) ...
Selecting previously deselected package mysql-client.
Unpacking mysql-client (from .../mysql-client_5.1.49-3_all.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.1.49-3_all.deb) ...
Selecting previously deselected package php5-mysql.
Unpacking php5-mysql (from .../php5-mysql_5.3.3-7+squeeze3_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for libapache2-mod-php5 ...
Reloading web server config: apache2.
Setting up libmysqlclient16 (5.1.49-3) ...
Setting up libdbd-mysql-perl (4.016-1) ...
Setting up mysql-client-5.1 (5.1.49-3) ...
Setting up mysql-server-5.1 (5.1.49-3) ...
Stopping MySQL database server: mysqld.
111108 10:43:21 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Can't create/write to file '/tmp/ibRLGhD7' (Errcode: 13)
111108 10:43:21  InnoDB: Error: unable to create temporary file; errno: 13
111108 10:43:21 [ERROR] Plugin 'InnoDB' init function returned error.
111108 10:43:21 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
Setting up mysql-client (5.1.49-3) ...
Setting up mysql-server (5.1.49-3) ...
Setting up php5-mysql (5.3.3-7+squeeze3) ...



Потом, просит ввести пароль для root пользователя mysql. Я ввожу, но дальше работа с базами не получается.
server:~# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)


server:~# mysql -u root
enter pass: ****
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


Подскажите, где я дурак?
Спасибо!

dolphin8383


roofer

мускуль после обновления начал раз в несколько дней отваливаться.
Помогите разобраться с логами:

Feb 25 05:24:46 ******** mysqld_safe: Number of processes running now: 0
Feb 25 05:24:46 ******** mysqld_safe: mysqld restarted
Feb 25 05:24:54 ******** mysqld: 140225  5:24:54 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
Feb 25 05:24:58 ******** mysqld: 140225  5:24:57 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
Feb 25 05:24:58 ******** mysqld: 140225  5:24:57 [Note] Plugin 'FEDERATED' is disabled.
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 InnoDB: The InnoDB memory heap is disabled
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 InnoDB: Mutexes and rw_locks use GCC atomic builtins
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 InnoDB: Compressed tables use zlib 1.2.7
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 InnoDB: Using Linux native AIO
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 InnoDB: Initializing buffer pool, size = 128.0M
Feb 25 05:24:58 ******** mysqld: InnoDB: mmap(137363456 bytes) failed; errno 12
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 InnoDB: Completed initialization of buffer pool
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 InnoDB: Fatal error: cannot allocate memory for the buffer pool
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 [ERROR] Plugin 'InnoDB' init function returned error.
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 [ERROR] Unknown/unsupported storage engine: InnoDB
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 [ERROR] Aborting
Feb 25 05:24:58 ******** mysqld:
Feb 25 05:24:59 ******** mysqld: 140225  5:24:59 [Note] /usr/sbin/mysqld: Shutdown complete
Feb 25 05:24:59 ******** mysqld:
Feb 25 05:25:00 ******** mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended

Feb 25 10:17:53 ******** mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql

endru

Цитата: roofer от 25 февраля 2014, 14:49:10
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 InnoDB: Initializing buffer pool, size = 128.0M
...
Feb 25 05:24:58 ******** mysqld: 140225  5:24:58 InnoDB: Fatal error: cannot allocate memory for the buffer pool
не может выделить память в 128MB

гулите по запросу "Plugin 'InnoDB' init function returned error" или "InnoDB: Fatal error: cannot allocate memory for the buffer pool"