I have upgraded mysql version from 5.1 to 5.6.

Step[s I have followed :

  • I have uninstalled older version and installed new version.
  • Reset mysql root password
  • Restored DB dump of particular DB

    Now I need to create new user and give all permission in the server. But while creating user I'm getting error.

    mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';

    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)
        Can't connect to the server

I also getting same error in PhpMyadmin.

I have currently modified these settings as suggested by others

innodb_force_recovery = 1

wait_timeout = 28800

connect_timeout = 28800

Error log :

    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.

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

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

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): ''; port: 3306
2015-07-03 18:24:25 30722 [Note]   - '' resolves to '';
2015-07-03 18:24:25 30722 [Note] Server socket created on IP: ''.
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)
  • innodb_force_recovery = 1 absolutely useless, do not copy paste any crap from the internet, especially into your database config.. lol – ADM Jul 4 '15 at 9:01

You seem to have hit the bug "Any statement of the form CREATE USER x IDENTIFIED BY 'x'crashes mysqld". The reason described is missing "password_expired" column in the mysql database restored or reused from older MySQL version. The solution described is run mysql_upgrade.


You should not set innodb force recovery. First you have to identify the root cause of MySQL crash. You should review your MySQL error log. Generally it should be present is the Mysql data directory but it may be at different location depending on your installation.

Also, make sure that there is no invalid or incompatible entry in your my.cnf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.