前提
ディレクトリ配下にtr_support_menu.csv
というCSVファイルを置き、
それをtr_support_menusテーブル
にインポートしようとしています。
Mysqlを使い進めているのですが、エラーにあいうまくインポートすることができないでいます。
該当のソースコード
tarminal
1mysql> load data local 2 -> infile "/Users/********/source/toreka_project/toreka/tr_support_menu.csv" 3 -> into table tr_support_menus 4 -> fields terminated by ','; 5ERROR 2 (HY000): File '/Users/01048656/source/toreka_project/toreka/tr_support_menu.csv' not found (OS errno 2 - No such file or directory) 6mysql> 7
絶対パスも調べまして、合ってるかと思います。
/Users/********/source/toreka_project/toreka/tr_support_menu.csv
どなたかアドバイスいただけますと幸いですm(_ _)m
追記
CA8775:toreka 01048656$ ls -al /Users/01048656 total 504 drwxr-x---+ 41 01048656 191071026 1312 12 22 17:32 . drwxr-xr-x 6 root admin 192 3 2 2022 .. -r-------- 1 01048656 191071026 7 3 2 2022 .CFUserTextEncoding -rw-r--r--@ 1 01048656 191071026 14340 12 22 17:40 .DS_Store drwx------+ 312 01048656 191071026 9984 12 22 17:14 .Trash -rw-r--r-- 1 01048656 191071026 680 12 22 13:43 .anyconnect -rw------- 1 01048656 191071026 8861 12 17 12:35 .bash_history -rw-r--r-- 1 01048656 191071026 129 10 24 18:55 .bash_profile drwx------ 9 01048656 191071026 288 12 19 01:17 .bash_sessions drwxr-xr-x 3 01048656 191071026 96 3 3 2022 .cisco drwxr-xr-x 3 01048656 191071026 96 8 18 11:11 .composer drwx------ 3 01048656 191071026 96 9 5 11:16 .config drwxr-xr-x 14 01048656 191071026 448 12 22 17:37 .docker drwx------ 6 01048656 191071026 192 12 22 17:37 .esets -rw-r--r-- 1 01048656 191071026 431 12 21 14:08 .gitconfig -rw-r--r--@ 1 01048656 191071026 82 12 21 14:08 .gitflow_export -rw-r--r-- 1 01048656 191071026 13 2 7 2022 .gitignore_global -rw-r--r-- 1 01048656 191071026 27 2 7 2022 .hgignore_global -rw------- 1 01048656 191071026 28 11 25 10:54 .lesshst drwxr-xr-x 3 01048656 191071026 96 4 14 2022 .local drwxr-xr-x 10 01048656 191071026 320 12 22 17:37 .nodebrew drwxr-xr-x 6 01048656 191071026 192 12 22 17:37 .npm -rw-r--r-- 1 01048656 191071026 42 7 12 11:18 .profile drwx------ 7 01048656 191071026 224 4 26 2022 .ssh -rw-r--r--@ 1 01048656 191071026 0 7 25 17:18 .stCommitMsg -rw------- 1 01048656 191071026 13444 12 20 08:37 .viminfo drwxr-xr-x 5 01048656 191071026 160 12 22 17:37 .vscode drwx------@ 5 01048656 191071026 160 3 3 2022 Applications drwx------+ 9 01048656 191071026 288 12 22 17:31 Desktop drwx------+ 3 01048656 191071026 96 3 2 2022 Documents drwx------@ 57 01048656 191071026 1824 12 22 17:32 Downloads drwx------@ 79 01048656 191071026 2528 12 22 17:37 Library drwx------ 4 01048656 191071026 128 3 3 2022 Movies drwx------+ 3 01048656 191071026 96 3 2 2022 Music drwx------+ 5 01048656 191071026 160 12 22 17:37 Pictures drwxr-xr-x 3 01048656 191071026 96 7 8 18:08 Postman drwxr-xr-x+ 4 01048656 191071026 128 3 2 2022 Public drwxr-xr-x 3 01048656 191071026 96 7 15 11:57 docker-tutorial -rw-r--r-- 1 01048656 191071026 175041 9 15 09:34 java_error_in_phpstorm_1027.log drwxr-xr-x 7 01048656 191071026 224 10 19 18:03 source drwxr-xr-x 4 01048656 191071026 128 12 22 17:32 tmp CA8775:toreka 01048656$
CA8775:toreka 01048656$ ls -al /Users/01048656/source total 16 drwxr-xr-x 7 01048656 191071026 224 10 19 18:03 . drwxr-x---+ 41 01048656 191071026 1312 12 22 17:32 .. -rw-r--r--@ 1 01048656 191071026 6148 12 22 17:37 .DS_Store drwxr-xr-x 15 01048656 191071026 480 4 26 2022 backend-eng-training drwxr-xr-x 15 01048656 191071026 480 4 26 2022 docker-eng-training drwxr-xr-x 29 01048656 191071026 928 12 22 17:35 nb-manhour drwxr-xr-x 12 01048656 191071026 384 12 22 17:35 toreka_project
CA8775:toreka 01048656$ ls -al /Users/01048656/source/toreka_project total 40 drwxr-xr-x 12 01048656 191071026 384 12 22 17:35 . drwxr-xr-x 7 01048656 191071026 224 10 19 18:03 .. -rw-r--r--@ 1 01048656 191071026 6148 12 22 17:37 .DS_Store -rw-r--r-- 1 01048656 191071026 495 10 19 18:14 .env drwxr-xr-x 2 01048656 191071026 64 10 19 18:30 app drwxr-xr-x 4 01048656 191071026 128 10 19 18:30 data -rw-r--r-- 1 01048656 191071026 1301 10 19 18:17 docker-compose.yml -rw-r--r-- 1 01048656 191071026 495 10 19 18:13 env-example drwxr-xr-x 5 01048656 191071026 160 10 19 18:12 mysql drwxr-xr-x 5 01048656 191071026 160 10 19 18:13 nginx drwxr-xr-x 5 01048656 191071026 160 12 22 15:13 php-fpm drwxr-xr-x 35 01048656 191071026 1120 12 22 17:14 toreka
CA8775:toreka 01048656$ ls -al /Users/01048656/source/toreka_project/toreka total 2224 drwxr-xr-x 35 01048656 191071026 1120 12 22 17:14 . drwxr-xr-x 12 01048656 191071026 384 12 22 17:35 .. -rw-r--r-- 1 01048656 191071026 6148 12 22 17:37 .DS_Store -rw-r--r-- 1 01048656 191071026 258 11 25 11:37 .editorconfig -rw-r--r-- 1 01048656 191071026 969 10 19 18:52 .env -rw-r--r-- 1 01048656 191071026 969 11 25 11:37 .env.example drwxr-xr-x 14 01048656 191071026 448 12 22 10:42 .git -rw-r--r-- 1 01048656 191071026 152 11 25 11:37 .gitattributes -rw-r--r-- 1 01048656 191071026 179 11 25 11:37 .gitignore -rw-r--r-- 1 01048656 191071026 6309 10 19 18:52 .phpunit.result.cache -rw-r--r-- 1 01048656 191071026 175 11 25 11:37 .styleci.yml -rw-r--r-- 1 01048656 191071026 3958 11 25 11:37 README.md drwxr-xr-x 10 01048656 191071026 320 12 20 08:42 app -rwxr-xr-x 1 01048656 191071026 1686 11 25 11:37 artisan drwxr-xr-x 4 01048656 191071026 128 11 25 11:37 bootstrap -rw-r--r-- 1 01048656 191071026 1768 11 25 12:06 composer.json -rw-r--r-- 1 01048656 191071026 300038 11 25 12:06 composer.lock drwxr-xr-x 18 01048656 191071026 576 12 21 17:54 config drwxr-xr-x 6 01048656 191071026 192 11 25 11:37 database drwxr-xr-x 5 01048656 191071026 160 10 19 18:52 docker -rw-r--r-- 1 01048656 191071026 772 11 25 11:37 docker-compose.yml drwxr-xr-x 4 01048656 191071026 128 11 25 11:37 lang drwxr-xr-x 502 01048656 191071026 16064 12 22 17:35 node_modules -rw-r--r-- 1 01048656 191071026 716812 11 25 11:37 package-lock.json -rw-r--r-- 1 01048656 191071026 643 11 25 11:37 package.json -rw-r--r-- 1 01048656 191071026 1175 11 25 11:37 phpunit.xml drwxr-xr-x 10 01048656 191071026 320 11 25 11:37 public drwxr-xr-x 7 01048656 191071026 224 12 20 08:42 resources drwxr-xr-x 6 01048656 191071026 192 12 20 08:43 routes drwxr-xr-x 5 01048656 191071026 160 10 19 18:52 storage -rw-r--r-- 1 01048656 191071026 27086 11 25 11:37 test.drawio drwxr-xr-x 6 01048656 191071026 192 11 25 11:37 tests -r--r--r-- 1 01048656 191071026 14605 12 22 17:14 tr_support_menu.csv drwxr-xr-x 45 01048656 191071026 1440 12 22 17:35 vendor -rw-r--r-- 1 01048656 191071026 556 11 25 11:37 webpack.mix.js
CA8775:toreka 01048656$ ls -al /Users/01048656/source/toreka_project/toreka/tr_support_menu.csv -r--r--r-- 1 01048656 191071026 14605 12 22 17:14 /Users/01048656/source/toreka_project/toreka/tr_support_menu.csv

回答3件
あなたの回答
tips
プレビュー