やっていること
- 今日の目標を投稿してデータベースに格納するサイトを作成し、AWSのEC2を使って公開しようと設定しています。現在、localで大まかな機能を実装したため、公開に向けてDBとの連携ができるかを確認しているところです。
現在の問題
上記の添付の通り、phpMyAdminにログインすることができません
インスタンス立ち上げ後に行ったこと
1
php.iniにて mysql.default_socket = /var/lib/mysql/mysql.sock mysqli.default_socket = /var/lib/mysql/mysql.sock
2
/etc/httpd/conf.d/phpMyAdmin.conf にて Alias /phpmyadmin /usr/share/phpMyAdmin >> Alias /itona /usr/share/phpMyAdmin
3
/etc/phpMyAdmin/config.inc.php にて $cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address $cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port $cfg['Servers'][$i]['socket'] = '/var/lib/mysql/mysql.sock'; // Path to the socket - leave blank for default socket $cfg['Servers'][$i]['connect_type'] = 'socket'; // How to connect to MySQL server ('tcp' or 'socket') $cfg['Servers'][$i]['extension'] = 'mysqli'; // The php MySQL extension to use ('mysql' or 'mysqli') $cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection // (requires PHP >= 4.3.0) $cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings // (this user must have read-only $cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user" // and "mysql/db" tables). // The controluser is also // used for all relational // features (pmadb) $cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method (config, http or cookie based)? $cfg['Servers'][$i]['user'] = ''; // MySQL user $cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed // with 'config' auth_type) ------------------------------- cfg['Servers'][$i]['AllowNoPassword'] // Allow logins without a password. Do not change the FALSE = TRUE; // default unless you're running a passwordless MySQL server
不足があるかもしれませんが、phpMyAdmin関係で行ったことは上記の3つです
補足
お金の関係でインスタンスを2つ作成したくなかったため、同サーバにDBとwebサーバが入っています
自分でサーバを立ち上げてwebサイトを公開するのは初めてなので、わかりにくい説明かもしれませんが、協力よろしくお願いします
あなたの回答
tips
プレビュー