Я обновил версию mysql с 5.1 до 5.6.
Шаг [я выполнил:
Восстановлен дамп конкретной БД
Теперь мне нужно создать нового пользователя и дать все разрешения на сервере. Но при создании пользователя я получаю ошибку.
mysql> СОЗДАТЬ ПОЛЬЗОВАТЕЛЯ 'newuser' @ 'localhost', ОПРЕДЕЛЕННЫЙ 'паролем';
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
ERROR:
Can't connect to the server
Я также получаю такую же ошибку в PhpMyadmin.
В настоящее время я изменил эти настройки, как было предложено другими
innodb_force_recovery = 1
wait_timeout = 28800
connect_timeout = 28800
Журнал ошибок :
12:54:24 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 61073 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x7f8182657500
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f8152cb5e40 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x2c)[0x7f81817481cc]
/usr/sbin/mysqld(handle_fatal_signal+0x3d2)[0x7f81814a8572]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x7f81801bd340]
/usr/sbin/mysqld(+0x47f0b4)[0x7f81814d10b4]
/usr/sbin/mysqld(_Z17mysql_create_userP3THDR4ListI11st_lex_userE+0x371)[0x7f81814d6e91]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x211d)[0x7f8181531b8d]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x3c8)[0x7f8181536308]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x2363)[0x7f8181538d03]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x1f5)[0x7f81814fe715]
/usr/sbin/mysqld(handle_one_connection+0x40)[0x7f81814fe770]
/usr/sbin/mysqld(pfs_spawn_thread+0x140)[0x7f818178a370]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8182)[0x7f81801b5182]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f817f8d847d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f8138005030): is an invalid pointer
Connection ID (thread ID): 5
Status: NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
2015-07-03 18:24:25 30722 [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.
2015-07-03 18:24:25 30722 [Note] Plugin 'FEDERATED' is disabled.
2015-07-03 18:24:25 30722 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-07-03 18:24:25 30722 [Note] InnoDB: The InnoDB memory heap is disabled
2015-07-03 18:24:25 30722 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-07-03 18:24:25 30722 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-07-03 18:24:25 30722 [Note] InnoDB: Using Linux native AIO
2015-07-03 18:24:25 30722 [Note] InnoDB: Using CPU crc32 instructions
2015-07-03 18:24:25 30722 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-07-03 18:24:25 30722 [Note] InnoDB: Completed initialization of buffer pool
2015-07-03 18:24:25 30722 [Note] InnoDB: Highest supported file format is Barracuda.
2015-07-03 18:24:25 30722 [Note] InnoDB: The log sequence numbers 38271843239 and 38271843239 in ibdata files do not match the log sequence number 38271843249 in the ib_logfiles!
2015-07-03 18:24:25 30722 [Note] InnoDB: Database was not shutdown normally!
2015-07-03 18:24:25 30722 [Note] InnoDB: Starting crash recovery.
2015-07-03 18:24:25 30722 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-07-03 18:24:25 30722 [Note] InnoDB: Restoring possible half-written data pages
2015-07-03 18:24:25 30722 [Note] InnoDB: from the doublewrite buffer...
2015-07-03 18:24:25 30722 [Note] InnoDB: 128 rollback segment(s) are active.
2015-07-03 18:24:25 30722 [Note] InnoDB: Waiting for purge to start
2015-07-03 18:24:25 30722 [Note] InnoDB: 5.6.19 started; log sequence number 38271843249
2015-07-03 18:24:25 30722 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2015-07-03 18:24:25 30722 [Note] - '127.0.0.1' resolves to '127.0.0.1';
2015-07-03 18:24:25 30722 [Note] Server socket created on IP: '127.0.0.1'.
2015-07-03 18:24:25 30722 [Note] Event Scheduler: Loaded 0 events
2015-07-03 18:24:25 30722 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.19-0ubuntu0.14.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
Кажется, ты ударил ошибка "Любая инструкция формы CREATE USER x IDENTIFIED BY 'x'
вылетает mysqld ". По описанной причине отсутствует столбец "срок действия_пароля" в mysql
база данных восстановлена или повторно использована из более старой версии MySQL. Описанное решение запущено mysql_upgrade
.
Вы не должны устанавливать innodb force recovery. Сначала вы должны определить основную причину сбоя MySQL. Вам следует просмотреть журнал ошибок MySQL. Обычно он должен присутствовать в каталоге данных Mysql, но он может находиться в другом месте в зависимости от вашей установки.
Также убедитесь, что в вашем my.cnf нет недопустимой или несовместимой записи.