我能改变mysql shell的名称吗?

huangapple go评论47阅读模式
英文:

Can I change the name of the mysql shell?

问题

This isn't exactly an issue, but more of a check to make sure I'm not making a mistake.
我这并不是一个问题,只是为了确保我没有犯错而进行的检查。

I recently started with mysql, and I couldn't access the shell.
最近我开始使用mysql,但无法访问shell。

I looked through my path variables and found out mysql shell is actually called mysqlsh. I made a copy of the shell and called it mysql instead. But I'm worried it might cause an error if I do so.
我查看了我的路径变量,发现mysql的shell实际上叫做mysqlsh。我复制了这个shell并将其命名为mysql。但我担心这样做可能会导致错误。

Therefore, I wanted to ask a question to make sure that this isn't gonna bite in the ass later, it is okay to change the name of mysql, right?
因此,我想提出一个问题,以确保这样做不会在以后引发问题,更改mysql的名称是可以的,对吗?

英文:

This isn't exactly an issue, but more of a check to make sure I'm not making a mistake.
I recently started with mysql, and I couldn't access the shell.

I looked through my path variables and found out mysql shell is actually called mysqlsh. i made a copy of the shell and called it mysql instead. but I'm waried it might cause an error if I do so.

Therfore, I wanted to ask a question to make sure that this isn't gonna bite in the ass later, it is okay to change the name of mysql, right?

答案1

得分: 1

The MySQL product still includes the traditional command-line interface, mysql.

MySQL Shell is a different client with different features (at least it's installed separately in MySQL 8.0, perhaps this will change in the future).

https://dev.mysql.com/doc/refman/8.0/en/mysql-shell-userguide.html:

MySQL Shell is a component that you can install separately.

So it could cause confusion if you rename the executable mysqlsh to mysql. Then if you install both on the same computer, which one would it run? It would depend on which one it finds first as it searches your Bash PATH.

I would suggest you do not rename the executable. If you want it to run the MySQL Shell when you type mysql in the Bash shell, I would recommend defining an alias in your .bashrc.

alias mysql=mysqlsh

英文:

The MySQL product still includes the traditional command-line interface, mysql.

MySQL Shell is a different client with different features (at least it's installed separately in MySQL 8.0, perhaps this will change in the future).

https://dev.mysql.com/doc/refman/8.0/en/mysql-shell-userguide.html:

> MySQL Shell is a component that you can install separately.

So it could cause confusion if you rename the executable mysqlsh to mysql. Then if you install both on the same computer, which one would it run? It would depend on which one it finds first as it searches your Bash PATH.

I would suggest you do not rename the executable. If you want it to run the MySQL Shell when you type mysql in the Bash shell, I would recommend defining an alias in your .bashrc.

alias mysql=mysqlsh

huangapple
  • 本文由 发表于 2023年3月31日 20:29:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/75898537.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定