Connect to MySQL/MariaDB from command line client using URI connection string?
P粉545218185
P粉545218185 2023-08-30 14:30:55
0
1
443

A database connection string given the URI pattern:

mysql://:@:/

Is there a way to use this string directly in the MySQL command line client without breaking it into the familiar mysql -u -h -p ... Format? < /p>

I found some discussion about this here, but the suggested option --uri does not exist in my client (mysql Ver 15.1 Distrib 10.11.2-MariaDB).

P粉545218185
P粉545218185

reply all (1)
P粉985686557

You must usemysqlsh(mysql shell) instead ofmysql.

Use the--uri=option.

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

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!