本地服务器两种方式:
mysql -h 127.0.0.1 -u root -p
mysql -h localhost -u root -p
远程服务器:
mysql -h 数据库服务器地址 -u 用户名 -p
Welcome to the MySQL monitor. Commands end with ; or \g. //mysql每次命令后面都要加分号
Your MySQL connection id is 9 //你连接了mysql的次数
Server version: 8.0.16 MySQL Community Server - GPL //mysql的版本号
Copyright (c) 2000, 2019, 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. //帮助命令\h;清除命令\c
登录与退出1. 登录MySQL 命令:本地服务器两种方式: mysql -h 127.0.0.1 -u root -p mysql -h localhost -u root -p远程服务器:mysql -h 数据库服务器地址 -u 用户名 -pWelcome to the MySQL monitor. Commands end with ; or \g. //mysql每次...