首页 > 数据库技术 > 详细

CentOS 6.5 安装MySQL数据库

时间:2016-09-07 17:40:13      阅读:251      评论:0      收藏:0      [点我收藏+]

CentOS 6.5 安装MySQL数据库

[root@seeker~]#  yum -y install mysql-server  //安装命令
[root@seeker~]#  service mysqld start           //连接之前先启动服务
[root@seeker~]#  chkconfig mysqld on           //开机启动设置,也可以手动开启
[root@seeker~]#  mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
......
//安装成功之后密码为空,需要自己重新设置。
mysql> set password for root@localhost=password(root);
mysql> exit
//用新密码登陆
[root@seeker~]#  mysql -u root -p

//测试
show databases;         //查看系统已存在的数据库
use test;                    //选择需要使用的数据库
exit                     //退出数据库的连接

其他命令:
rpm -qa|grep mysql    //显示已安装的mysql版本

也可以通过下载rpm软件包来安装mysql

 

CentOS 6.5 安装MySQL数据库

原文:http://www.cnblogs.com/liun1994/p/5850121.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!