检测本机是否有安装mysql
sudo netstat -tap | grep mysql
执行上面的命令之后,看到 mysq 的socket 处于监听状态,说明有安装成功。
安装mysql
sudo apt-get install mysql-server mysql-client libmysqlclient-dev
安装过程中会提示输入数据库管理员密码(自己设定的),,如图
设置完成之后等待安装完成即可。
mysql 的登陆与退出
$ mysql -u root -pEnter password: Welcome ; or \g.Your MySQL connection Server (Ubuntu)Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.mysql> quit;Bye
这几年大多是昆明空运来的,