ubuntu 下访问windows系统某个路径下的文件
不能以
mysql> source c:\temp\mysqlsampledatabase.sql
这种查找资源的方式会报错
root@Masource d:\temp\mysqlsampledatabase.sql
ERROR: to the MySQL monitor. Commands end with ; or \g.
Failed to open file 'd:\temp\mysqlsampledatabase.sql', error: 2
必须以相对路径来进行访问
root@Maglet:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 251909116 179338608 72570508 72% /
none 251909116 179338608 72570508 72% /dev
none 251909116 179338608 72570508 72% /run
none 251909116 179338608 72570508 72% /run/lock
none 251909116 179338608 72570508 72% /run/shm
none 251909116 179338608 72570508 72% /run/user
tmpfs 251909116 179338608 72570508 72% /sys/fs/cgroup
C:\ 251909116 179338608 72570508 72% /mnt/c
D:\ 161793020 132183692 29609328 82% /mnt/d
E:\ 64617468 27952120 36665348 44% /mnt/e
F:\ 20478972 19118732 1360240 94% /mnt/f
root@Maglet:~# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 23
Server version: 8.0.22-0ubuntu0.20.04.3 (Ubuntu)
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> source /mnt/d/temp/mysqlsampledatabase.sql