//=============================
MySQL 效能監測工具
> sudo apt-get install mytop
> mytop -u root -p
//=============================
> sudo nano /etc/mysql/debian.cnf
[client]
user = debian-sys-maint
password = EyCgb3wHDcOwaCH4
> mysql -u debian-sys-maint -p
輸入上面debian.cnf中的那一組password密碼
進入 mysql指令後 依序 輸入下面指令
mysql> update mysql.user set authentication_string=password('新的root密碼') where user='root' and Host ='localhost';
mysql> update mysql.user set plugin="mysql_native_password";
mysql> flush privileges;
mysql> quit;
> sudo service mysql restart進入 mysql指令後 依序 輸入下面指令
mysql> update mysql.user set authentication_string=password('新的root密碼') where user='root' and Host ='localhost';
mysql> update mysql.user set plugin="mysql_native_password";
mysql> flush privileges;
mysql> quit;
> mysql -u root -p
輸入上面已更新後的密碼
//=============================
mysql 5.7設定 提供外部連線(remote connect)
> sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
#bind-address = 127.0.0.1
> mysql -u root -p
輸資料庫mysql 的密碼mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root密碼' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> exit
啟用和停用防火牆
> sudo ufw enable
> sudo ufw disable
> sudo ufw allow in 3306
> sudo ufw allow out 3306
> sudo ufw status
> sudo ufw statusverbose
> sudo ufw delete 3306
BUG: ubuntu 18.04 ufw 開機自動啟動會失效
//=============================
安裝完成後可以嘗試使用MySQL Workbench或Navicat Premium進行連線測試
下載工具軟體 MySQL Workbench 8.0.17
下載工具軟體 Navicat Premium
https://www.navicat.com/en/download/navicat-premium
Linux download navicat121_premium_en_x64.tar.gz
> tar xvf navicat121_premium_en_x64.tar.gz
> cd navicat121_premium_en_x64
> bash start_navicat
- 選擇 install
- 退出 navicat
- 安裝 Wine
參考 https://magiclen.org/wine/
> sudo dpkg --add-architecture i386 && wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add - && sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu/ $(cat /etc/os-release | grep UBUNTU_CODENAME | cut -d '=' -f 2) main" && sudo apt update && sudo apt install --install-recommends winehq-stable
> wine uninstaller
- 點選wine 畫面右上角 安裝
- 選擇 Navicat-keygen.exe (這是12.1.20版本的中所含的)
參考 downloadly.ir
或 DoubleLabyrinth
- 選擇 \home\xxx\download\navicat121_premium_en_x64\Navicat\Navicat.exe
- 選擇 patch
Windows版本教學 在這邊
沒有留言:
張貼留言