1.数据库重登录相关
每次关闭电脑或者关闭数据库服务器之后,如果想要再次操作数据库就必须开启数据库服务器。
具体过程是先执行【~/$ mysql.server start】指令,得到数据库服务器启动成功提示。
MacBook-Pro:~$ mysql.server start
Starting MySQL
SUCCESS!
然后再执行【~/$ mysql -uroot -p】指令使用管理员身份登录数据库,当然这个时候需要输入管理员账号密码才能下一步。老规矩管理员密码在输入的时候不会显式加载,直接放心输入然后回车就行。
MacBook-Pro:~$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.
Commands end with ; or \g.
Your MySQL connection id is 8 Server version: 8.0.12 Homebrew
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>
如果看到mysql>这个东西的时候,就表示可以继续对数据库进行操作了。
(ps:退出数据库指令是quit,今天听到一位同学告诉我数据库终端没有退出指令,只能关终端来退出数据库...我沉默了好一会)
2.IDE打开go工程相关
我们已经知道创建工程的终端命令【