標籤:
最近剛入手了一枚樹莓派,突發奇想打算做一個小型的家用伺服器,在家7*24小時一直掛著。
真的是非常小,只有巴掌大,給樹莓派買了一些配件,外殼、小風扇、2片散熱片、32G SD卡、HDMI線,組裝之後的效果。
安裝之前可以先更新下本機軟體
sudo apt-get update
然後就是等待了。等待完之後要準備安裝mysql了,命令直接安裝:
sudo apt-get install mysql-server
然後就是等待,在安裝的過程中會提示你讓你輸入mysql的root密碼,會提示兩次。輸入完成之後就會安裝成功了。
然後輸入如下命令進入mysql:
mysql -u root -p
然後會提示輸入密碼,輸入密碼就可以進入mysql:
[email protected]:/home/pi# mysql -u root -pEnter password:Welcome to the MySQL monitor. Commands end with
Your MySQL connection id is 43
Server version: 5.5.35-0+wheezy1 (Debian)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
mysql>
可在電腦上面用 Navicat for MySQL 等軟體遠端連線樹莓派資料庫。
樹莓派搭建安裝mysql