A
A
Alex Raven2018-03-17 16:52:17
MySQL
Alex Raven, 2018-03-17 16:52:17

Ubuntu on Windows 10 via WSL. Why doesn't mysql import work?

I made myself a debug server on Ubuntu on top of Windows 10 via WSL. Raised apache2, mariadb-server, php 7 on it. Everything started up fine, but until the database dump was imported from the old debug server under Windows. The base itself was created without problems. And when importing phpMyAdmin gives:

SQL query:
CREATE TABLE `product_and_cateid_mapping` (
  `id` int(7) NOT NULL,
  `category_id` int(7) NOT NULL,
  `product_id` int(7) NOT NULL,
  `mode` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=InnoDB

MySQL said:
#27 - Can't sync file './streetlife/' to disk (Errcode: 5)

The same from the console:
[email protected]:/var/www# mysql --user=root --password=mysql streetlife < streetlife.sql
ERROR 27 (HY000) at line 32: Can't sync file './streetlife/' to disk (Errcode: 5)

I transferred the original /var/lib/mysql to /mnt/d/webserver/mysql (that is, it is physically located on the NTFS partition). And I created a symbolic link to it instead of the original /var/lib/mysql (so as not to edit the configs). Maybe mysql doesn't like that the permissions on /var/lib/mysql are 777? On the NTFS partition, they are always 777, it is impossible to change. Or that the owner is root:root (instead of mysql:mysql)? - can't be changed either.
Tried running separately mysqld_safe --skip-grant-tables --skip-networking & and still the same effect.
I will be very grateful for advice. I really want to set up a native debug server on Ubuntu under Windows 10, without VirtualBox and VMWare...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Raven, 2018-03-20
@alexraven

The issue was resolved by completely removing mariadb-*, cleaning up the configs, and installing mysql-server-5.6 instead

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question