前提・実現したいこと
dbfluteの学習のためハンズオンを進めていたのですが、MySQLのセットアップでハマっています。
【参考サイト】
http://dbflute.seasar.org/ja/tutorial/handson/section01.html#mysql
MySQLを起動させたいです。
発生している問題・エラーメッセージ
eclipseのターミナルから
localdb/boot-mysql.bat|sh
を実行させると
localdb/boot-mysql.bat: line 1: fg: no job control : No such file or directorye 2: cd: %~p0 : command not foundbat: line 3: localdb/boot-mysql.bat: line 4: start: command not found
と出てきて、何が起きているのか全くわかりません。
特に手がかりもないので、調べようがありません。
経緯
https://github.com/dbflute-session/dbflute-hands-on.git
から、プロジェクトをクローンしました。
localdb配下にmysqlフォルダを作りました。
mysqlをダウンロードして展開した後のファイルを先ほど作成したmysqlフォルダに入れました。
ハンズオンでは、「MySQLの初期化をしろ」ということで
./bin/mysqld --defaults-file=../my.cnf --datadir=./data --basedir=./ --initialize-insecure
を実行しました。
しかし、
bash: ./bin/mysqld: Permission denied
となり、権限の変更を行いました。
chmod 777 ./bin/mysqld
そして再度、初期化を行いました。
./bin/mysqld --defaults-file=../my.cnf --datadir=./data --basedir=./ --initialize-insecure bash: ./bin/mysqld: Permission denied bash-3.2$ chmod 777 ./bin/mysqld bash-3.2$ ./bin/mysqld --defaults-file=../my.cnf --datadir=./data --basedir=./ --initialize-insecure 2020-11-23T06:22:13.538995Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2020-11-23T06:22:13.624510Z 1 [Warning] InnoDB: New log files created, LSN=49311 2020-11-23T06:22:13.638759Z 1 [Warning] InnoDB: Creating foreign key constraint system tables. 2020-11-23T06:22:13.864585Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: xxxxxxxxxxxxxxxxxxxxxxxxxxxx. 2020-11-23T06:22:13.865430Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2020-11-23T06:22:13.866229Z 4 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
上手く行ったみたいなので、次にMySQLの起動を行いました。
localdb/boot-mysql.bat|sh
しかし、またPermission deniedとなり、「localdb」配下のファイルを全てchmod 777しました。
そして再度、上記のコマンドを行った結果、【発生している問題・エラーメッセージ】に記載があるエラーが発生しております。
試したこと
STSで試していたので、Eclipseで試したのですが結果は同じでした。
補足情報(FW/ツールのバージョンなど)
初期化するときに、dataフォルダがmysql配下に作成されるはずなのですが、mysqlフォルダをリフレッシュしないと出現しなかったです。
(おそらく関係ないと思うのですが記載しました)
あなたの回答
tips
プレビュー