您可以在命令提示符处使用 mysql 二进制文件建立 Mysql 数据库。可以通过以下示例来理解 -示例我们可以使用以下语句从命令提示符连接到 mysql 服务器 -[root@host]# mysql -u root -p Enter p
您可以在命令提示符处使用 mysql 二进制文件建立 Mysql 数据库。可以通过以下示例来理解 -
我们可以使用以下语句从命令提示符连接到 mysql 服务器 -
这将为我们提供 mysql> 命令提示符,我们可以在其中执行任何 SQL 命令。以下是上述命令的结果 -
以下代码块显示了上述代码的结果 -
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.20 MySQL CommUnity Server (GPL)
Copyright (c) 2000, 2017, 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.
在上面的示例中,我们使用 root 作为用户,但您也可以使用任何其他用户。任何用户都可以执行该用户允许的所有 SQL 操作。
我们可以随时在 mysql> 提示符下使用 exit 命令断开与 MySQL 数据库的连接。
mysql> exit
Bye
--结束END--
本文标题: 我们如何在命令提示符下使用 MySQL 二进制文件来建立 MySQL 数据库?
本文链接: https://www.lsjlt.com/news/437772.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-14
2024-05-14
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0