LoginSignup
2
1

More than 3 years have passed since last update.

【エラー集】AWSデプロイ時MySQLエラーまとめ

Last updated at Posted at 2020-05-16

参考文献

エラー① "cannot open shared object file"

LoadError: libmariadb.so.3: cannot open shared object file: No such file or directory

解決策① 検索パスの設定

$export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64

解決策② 共有ライブラリの依存関係の再設定

$ cat /etc/ld.so.conf
$ echo "/usr/lib64/XXXXX/lib" >/etc/ld.so.conf

解決策③ MySQLのgemを再度インストール

$ bundle exec gem uninstall mysql2
$ bundle install

エラー② "Access denied for user"

ERROR 1045 (28000): Access denied for userとなったときの対応方法

解決策① 特定のDBにのみ全権限有効なユーザを作成する

grant all privileges on 'DB名'.* to 'ユーザ名'@'ホスト名' identified by 'password' with grant option;

解決策② ホスト名がRDSの場合

mysql -u 'RDSユーザ名' -p -h XXXXXXXXXX.ap-northeast-1.rds.amazonaws.com
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1