Address
304 North Cardinal
St. Dorchester Center, MA 02124
Work Hours
Monday to Friday: 7AM - 7PM
Weekend: 10AM - 5PM
Address
304 North Cardinal
St. Dorchester Center, MA 02124
Work Hours
Monday to Friday: 7AM - 7PM
Weekend: 10AM - 5PM
今天在Ubuntu安裝系統,依照這四個網頁的教學分別設定apach, mysql, php, phpmyadmin
1. apach:https://ui-code.com/archives/179
2. mysql:https://ui-code.com/archives/293
3. php:https://ui-code.com/archives/286
4. phpmyadmin:https://ui-code.com/archives/297
在2.安裝Mysql後,要啟動密碼設定結果失敗,錯誤訊息是:
“MySQL Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication method used doesn’t store authentication data in the MySQL server. Please consider using ALTER USER”
搜尋一下文章後,這樣做即可
最後要記得把phpmyadmin的對外功能關閉,修改/etc/phpmyadmin/apache.conf
在</IfModule>下方輸入以下文字即可
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
<IfModule mod_php5.c>
......
</IfModule>
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
phpmyadmin如果錯誤,可能是沒有指定
Not Found The requested URL was not found on this server.
這時候輸入 sudo nano /etc/apache2/conf-available/phpmyadmin.conf
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options SymLinksIfOwnerMatch
DirectoryIndex index.php
Require all granted
</Directory>
phpmyadmin對mysql的密碼可利用以下指令建立
sudo mysql
CREATE USER '帳號'@'localhost' IDENTIFIED BY '一組你自己設定的強密碼';
GRANT ALL PRIVILEGES ON *.* TO '帳號'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;