在折腾了两天后,终于开始学习的MySQL这个关系型数据库的基本功能和语句了。
来来来,不要废话直接开始吧!
首先进入数据库:mysql -u root -p回车后输入之前自己设置好的密码即可看见欢迎说明你成功进入数据库!
chujun@chujun:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.24-0ubuntu0.18.10.1 (Ubuntu)
Copyright (c) 2000, 2018, 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.
mysql>
接下来就是看看安装的数据库里有什么表格了:
show databases; 这里需要注意不要漏掉分号哦!<