【报错信息】
【报错原因】连接之前没有开启mysql服务
【解决方案】先执行 service mysqld start ,再执行 mysql -uroot -p ,输入数据库密码
连接成功!
查看数据库: