2. 下載 JDBC Driver,並加入 Project 的 Build Path 中 : https://dev.mysql.com/downloads/connector/j/
3. 設定 XAMPP 安全權限
注意: 下列一定要設成 no,否則以 DriverManager.getConnection(url) 時,資料庫無法連接成功 XAMPP: MySQL is accessable via network. XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] no ElvisdeMacBook-Pro:~ root# whoami root ElvisdeMacBook-Pro:~ root# /Applications/XAMPP/xamppfiles/xampp security XAMPP: Quick security check... XAMPP: Your XAMPP pages are NOT secured by a password. XAMPP: Do you want to set a password? [yes] XAMPP: Password: XAMPP: Password (again): XAMPP: Password protection active. Please use 'xampp' as user name! XAMPP: MySQL is accessable via network. XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] no XAMPP: The MySQL/phpMyAdmin user pma has no password set!!! XAMPP: Do you want to set a password? [yes] XAMPP: Password: XAMPP: Password (again): XAMPP: Setting new MySQL pma password. XAMPP: Setting phpMyAdmin's pma password to the new one. XAMPP: MySQL has no root passwort set!!! XAMPP: Do you want to set a password? [yes] XAMPP: Write the password somewhere down to make sure you won't forget it!!! XAMPP: Password: XAMPP: Password (again): XAMPP: Setting new MySQL root password.
沒有留言:
張貼留言