混水摸魚

[ Mysql ] – cli 登入 mysql

phpmyadmin 用太久都忘了怎麼用 cli 登入 mysql , 特此筆記一下。

指令: mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 119
Server version: 5.7.27-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2019, 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>

如果是要連遠端資料庫的話
指令: mysql -h 192.168.1.22 -u root -p

Leave a Comment

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *