最近剛入手了一枚樹莓派,突發奇想打算做一個小型的家用服務器,在家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:
root@raspberrypi:/home/pi# mysql -u root -pEnter passWord:Welcome to the MySQL monitor. Commands end withYour MySQL connection id is 43Server 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 itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.mysql>
可在電腦上面用Navicat for MySQL 等軟件遠程連接樹莓派數據庫。
新聞熱點
疑難解答