實時疫情的新聞爬取及熱詞雲展示
阿新 • • 發佈:2020-12-03
首先要安裝服務端和客服端
sudo apt-get install mysql-server //服務端 sudo apt-get install mysql-client //客戶端
sudo netstat -tap | grep mysql
會顯示mysql服務的埠號和pid
mysql -u root -p
如果忘了密碼就查詢預設密碼:
進入到etc/mysql 目錄下,檢視debian.cnf檔案
debian.cnf # Automatically generated for Debian scripts. DO NOT TOUCH! [client] host= localhost user = debian-sys-maint password = pASsYAUR2aRiaprZX socket = /var/run/mysqld/mysqld.sock [mysql_upgrade] host = localhost user = debian-sys-maint password = pASsYAUR2aRiaprZX socket = /var/run/mysqld/mysqld.sock
預設使用者登入 mysql -u debian-sys-maint -p 修改root密碼 mysql> use mysql; mysql> update user set authentication_string=password('1234qwer') where user='root' and Host ='localhost'; mysql> update user set plugin="mysql_native_password"; mysql> flush privileges; mysql> quit;
登入密碼
mysql -uroot -p1234qwer
就可以正常登入資料庫了
參考文件
https://www.cnblogs.com/csig/p/12077928.html
https://www.cnblogs.com/lfri/p/10437694.html