mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2 - No such file or directory)

Bug #1319362 reported by Angel Guzman Maeso
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.6 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I get this in a fresh install in Ubuntu 14.10 for Mysql server 5.6:

$ sudo mysqld start
2014-05-14 13:54:03 0 [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.
2014-05-14 13:54:03 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-05-14 13:54:03 25912 [Warning] Can't create test file /var/lib/mysql/otorion.lower-test
2014-05-14 13:54:03 25912 [Warning] Can't create test file /var/lib/mysql/otorion.lower-test
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2 - No such file or directory)
2014-05-14 13:54:03 25912 [ERROR] Aborting

2014-05-14 13:54:03 25912 [Note] Binlog end
2014-05-14 13:54:03 25912 [Note] mysqld: Shutdown complete

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: mysql-server-core-5.6 5.6.17-1~exp1
ProcVersionSignature: Ubuntu 3.13.0-24.47-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.2-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Wed May 14 13:55:45 2014
InstallationDate: Installed on 2014-05-08 (6 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
SourcePackage: mysql-5.6
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Angel Guzman Maeso (shakaran) wrote :
Revision history for this message
Angel Guzman Maeso (shakaran) wrote :

Add my.cnf:

explicit_defaults_for_timestamp

Change key_buffer by key_buffer_size

Create folder:
sudo mkdir -p /var/lib/mysql/

Revision history for this message
Angel Guzman Maeso (shakaran) wrote :
Download full text (5.3 KiB)

Then I get:

[ERROR] Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists!

Workaround:

cd /var/lib/mysql
sudo adduser mysql
sudo chown mysql:mysql -R /var/lib/mysql

Then I get:

[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.

After that I give up with next error:

2014-05-14 14:04:53 26794 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Table 'mysql.plugin' doesn't exist
2014-05-14 14:04:53 26794 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2014-05-14 14:04:53 26794 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-05-14 14:04:53 26794 [Note] InnoDB: The InnoDB memory heap is disabled
2014-05-14 14:04:53 26794 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-05-14 14:04:53 26794 [Note] InnoDB: Compressed tables use zlib 1.2.8
2014-05-14 14:04:53 26794 [Note] InnoDB: Using Linux native AIO
2014-05-14 14:04:53 26794 [Note] InnoDB: Using CPU crc32 instructions
2014-05-14 14:04:53 26794 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-05-14 14:04:53 26794 [Note] InnoDB: Completed initialization of buffer pool
2014-05-14 14:04:53 26794 [Note] InnoDB: Highest supported file format is Barracuda.
2014-05-14 14:04:53 26794 [Note] InnoDB: 128 rollback segment(s) are active.
2014-05-14 14:04:53 26794 [Note] InnoDB: Waiting for purge to start
2014-05-14 14:04:53 26794 [Note] InnoDB: 5.6.17 started; log sequence number 1600627
mysqld: Too many arguments (first extra is 'start').
Use --verbose --help to get a list of available options
2014-05-14 14:04:53 26794 [ERROR] Aborting

2014-05-14 14:04:53 26794 [Note] Binlog end
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'partition'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'BLACKHOLE'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_METRICS'
2014-05-14 14:04:53 26794 [Note] Shutting down plugin 'INNODB_BUFFER_...

Read more...

Robie Basak (racb)
Changed in mysql-5.6 (Ubuntu):
assignee: nobody → Robie Basak (racb)
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

I see three separate issues in your report:

1) Deprecation warning about key_buffer. This was fixed in 5.6.25-2 in Debian and the fix is included in the current 5.6.27-2 in Ubuntu.

2) Deprecation warning about timestamp with implicit default value. This is an upstream bug. For clarity I have created Launchpad bug 1516010 to track it.

Let's use other bugs to track the above two issues as required, and keep this bug tracking your final issue:

3) Errors about /var/lib/mysql. It isn't clear to me that this is really a bug as opposed to a local misconfiguration. You can find pointers to get help for this sort of problem here: http://www.ubuntu.com/support/community. Since we use this bug tracker to track bugs in Ubuntu, rather than configuration problems, I'm marking this bug as Invalid. This helps us to focus on fixing bugs in Ubuntu. If you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is a bug in Ubuntu rather than a problem specific to your system, and then change the bug status back to New.

summary: - Update my.cnf keys for avoid shutdown errors
+ mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2 - No such file
+ or directory)
Changed in mysql-5.6 (Ubuntu):
status: New → Incomplete
assignee: Robie Basak (racb) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-5.6 (Ubuntu) because there has been no activity for 60 days.]

Changed in mysql-5.6 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.