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