使用 URI 連接字串從命令列客戶端連接到 MySQL/MariaDB?
P粉545218185
P粉545218185 2023-08-30 14:30:55
0
1
476
<p>給定 URI 樣式的資料庫連接字串:</p> <pre class="brush:php;toolbar:false;">mysql://<user>:<pass>@<host>:<port>/<database></pre> <p>有沒有辦法直接在MySQL 命令列用戶端中使用該字串,而無需將其分解為熟悉的<code>mysql -u <user> -h <host> -p ... </code> 格式? < /p> <p>我在這裡找到了一些對此的討論,但建議的選項<code>--uri</code>在我的客戶端(mysql Ver 15.1 Distrib 10.11.2-MariaDB)中不存在。 </p>
P粉545218185
P粉545218185

全部回覆(1)
P粉985686557

您必須使用mysqlsh(mysql shell)而不是mysql

使用--uri=選項。

https://dev.mysql.com /doc/mysql-shell/8.0/en/mysqlsh.html#option_mysqlsh_uri

##
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!