前提・実現したいこと
**実現したいこと:**XAMPPを使用してWordpressの環境をローカルに構築
発生している問題・エラーメッセージ
発生している問題
config.inc.phpにてDBで設定したパスワードを入力し、保存を試みると以下のようなエラーメッセージがVSCodeから通告されます。
vscode
1'config.inc.php' の保存に失敗しました: アクセス権限が不十分です。[Sudo 権限で再試行] を選択してスーパーユーザーとして再試行してください。
「Sudo権限で再試行」を選択すると次のようなエラーメッセージが表示されます。
vscode
1'config.inc.php' の保存に失敗しました: Command failed: "/private/var/folders/hv/9nhdd8tj7n76vf9xpqmgyqkm0000gn/T/AppTranslocation/BCC74AFF-2CF4-49DA-AF2F-E8953385EBF8/d/Visual Studio Code.app/Contents/Resources/app/bin/code" --file-write "/var/folders/hv/9nhdd8tj7n76vf9xpqmgyqkm0000gn/T/code-elevated-uxyuck" "/Users/yoshizawatakamasa/.bitnami/stackman/machines/xampp/volumes/root/phpmyadmin/config.inc.php" Error using --file-write: EACCES: permission denied, open '/Users/yoshizawatakamasa/.bitnami/stackman/machines/xampp/volumes/root/phpmyadmin/config.inc.php'
該当のソースコード
以下のファイルの
$cfg['Servers'][$i]['password'] = '';
の部分にDBで設定したパスワードを入力し、保存を試みると先出のエラーメッセージが表示されます。
xampp/phpmyadmin/config.inc.php
php
1<?php 2/* vim: set expandtab sw=4 ts=4 sts=4: */ 3/** 4 * phpMyAdmin sample configuration, you can use it as base for 5 * manual configuration. For easier setup you can use setup/ 6 * 7 * All directives are explained in documentation in the doc/ folder 8 * or at <https://docs.phpmyadmin.net/>. 9 * 10 * @package PhpMyAdmin 11 */ 12declare(strict_types=1); 13 14/** 15 * This is needed for cookie based authentication to encrypt password in 16 * cookie. Needs to be 32 chars long. 17 */ 18$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */ 19 20/** 21 * Servers configuration 22 */ 23$i = 0; 24 25/** 26 * First server 27 */ 28$i++; 29/* Authentication type */ 30$cfg['Servers'][$i]['auth_type'] = 'config'; 31$cfg['Servers'][$i]['user'] = 'root'; 32$cfg['Servers'][$i]['password'] = ''; 33/* Server parameters */ 34//$cfg['Servers'][$i]['host'] = 'localhost'; 35$cfg['Servers'][$i]['compress'] = false; 36$cfg['Servers'][$i]['AllowNoPassword'] = true; 37 38/** 39 * phpMyAdmin configuration storage settings. 40 */ 41 42/* User used to manipulate with storage */ 43// $cfg['Servers'][$i]['controlhost'] = ''; 44// $cfg['Servers'][$i]['controlport'] = ''; 45$cfg['Servers'][$i]['controluser'] = 'pma'; 46$cfg['Servers'][$i]['controlpass'] = ''; 47 48/* Storage database and tables */ 49$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; 50$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; 51$cfg['Servers'][$i]['relation'] = 'pma__relation'; 52$cfg['Servers'][$i]['table_info'] = 'pma__table_info'; 53$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; 54$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; 55$cfg['Servers'][$i]['column_info'] = 'pma__column_info'; 56$cfg['Servers'][$i]['history'] = 'pma__history'; 57$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; 58$cfg['Servers'][$i]['tracking'] = 'pma__tracking'; 59$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; 60$cfg['Servers'][$i]['recent'] = 'pma__recent'; 61$cfg['Servers'][$i]['users'] = 'pma__users'; 62$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; 63$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; 64$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; 65$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; 66$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords'; 67$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; 68$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; 69$cfg['Servers'][$i]['favorite'] = 'pma__favorite'; 70// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; 71// $cfg['Servers'][$i]['users'] = 'pma__users'; 72// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; 73// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; 74// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; 75// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; 76// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; 77// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; 78 79/** 80 * End of servers configuration 81 */ 82 83/** 84 * Directories for saving/loading files from server 85 */ 86$cfg['UploadDir'] = ''; 87$cfg['SaveDir'] = ''; 88 89/** 90 * Whether to display icons or text or both icons and text in table row 91 * action segment. Value can be either of 'icons', 'text' or 'both'. 92 * default = 'both' 93 */ 94//$cfg['RowActionType'] = 'icons'; 95 96/** 97 * Defines whether a user should be displayed a "show all (records)" 98 * button in browse mode or not. 99 * default = false 100 */ 101//$cfg['ShowAll'] = true; 102 103/** 104 * Number of rows displayed when browsing a result set. If the result 105 * set contains more rows, "Previous" and "Next". 106 * Possible values: 25, 50, 100, 250, 500 107 * default = 25 108 */ 109//$cfg['MaxRows'] = 50; 110 111/** 112 * Disallow editing of binary fields 113 * valid values are: 114 * false allow editing 115 * 'blob' allow editing except for BLOB fields 116 * 'noblob' disallow editing except for BLOB fields 117 * 'all' disallow editing 118 * default = 'blob' 119 */ 120//$cfg['ProtectBinary'] = false; 121 122/** 123 * Default language to use, if not browser-defined or user-defined 124 * (you find all languages in the locale folder) 125 * uncomment the desired line: 126 * default = 'en' 127 */ 128//$cfg['DefaultLang'] = 'en'; 129//$cfg['DefaultLang'] = 'de'; 130 131/** 132 * How many columns should be used for table display of a database? 133 * (a value larger than 1 results in some information being hidden) 134 * default = 1 135 */ 136//$cfg['PropertiesNumColumns'] = 2; 137 138/** 139 * Set to true if you want DB-based query history.If false, this utilizes 140 * JS-routines to display query history (lost by window close) 141 * 142 * This requires configuration storage enabled, see above. 143 * default = false 144 */ 145//$cfg['QueryHistoryDB'] = true; 146 147/** 148 * When using DB-based query history, how many entries should be kept? 149 * default = 25 150 */ 151//$cfg['QueryHistoryMax'] = 100; 152 153/** 154 * Whether or not to query the user before sending the error report to 155 * the phpMyAdmin team when a JavaScript error occurs 156 * 157 * Available options 158 * ('ask' | 'always' | 'never') 159 * default = 'ask' 160 */ 161//$cfg['SendErrorReports'] = 'always'; 162 163/** 164 * You can find more configuration options in the documentation 165 * in the doc/ folder or at <https://docs.phpmyadmin.net/>. 166 */ 167
試したこと
試したこと1
参考ページ1
参考ページ2
上記のページを参考にphpmyadminのアクセス権に自分のアカウントの追加を試しました。
しかし、必要なアクセス権がないため、操作は完了できません。
と表示されました。
試したこと2
参考ページ1
参考ページ2
上記のページを参考に
sudo chmod -R 777 /Users/yoshizawatakamasa/.bitnami/stackman/machines/xampp/volumes/root/phpmyadmin/config.inc.php
とコマンド入力をしました。
至らぬ点は多々あるかとは思いますが、お力添えいただければ幸いです。
よろしくお願いいたします。
補足情報(FW/ツールのバージョンなど)
php 7.4.6
mysql Ver8.0.19
macos 10.15.6
回答2件
あなたの回答
tips
プレビュー