1. sudo apt-get install mysql-server
2. apt-get isntall mysql-client
3. sudo apt-get install libmysqlclient-dev
4.service mysql status 查看安装状态,这样就是ok的
5.service mysql start启动服务
6. mysql -u root -p进入数据库
7.service mysql stop 关闭数据库服务