linux 登录mysql
时间: 2023-10-20 07:07:55 浏览: 106
在Linux上登录MySQL可以通过以下命令实现:
1. 打开终端,输入以下命令以安装MySQL服务: $ sudo apt-get install -y mysql-server
2. 输入以下命令查看MySQL的版本: $ mysql -V
3. 启动MySQL服务: $ sudo service mysql start
4. 使用以下命令登录MySQL: $ mysql -u用户名 -p密码
其中,用户名和密码分别为登录MySQL所使用的用户名和密码。请注意,在输入密码时,密码输入是不可见的。
<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Linux下使用MySQL简单教程](https://blog.csdn.net/SM1555/article/details/121828754)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [通过bash脚本自动部署mysql5.7(yum without file move)](https://download.csdn.net/download/dber_ablewang/88275668)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文