首页 > 数据库技术 > 详细

centos 6.5 安装mysql

时间:2015-09-24 02:01:20      阅读:262      评论:0      收藏:0      [点我收藏+]

步骤1:

yum -y install mysql-server 

步骤2:

chkconfig mysqld on  

步骤3:

service mysqld start  
mysql -u root 
set password for root@localhost=password(root);  

登录mysql创建新用户:

create user test_user@% identified by test_user;  

.给新用户test_user授权,让他可以从外部登陆和本地登陆
注意:@左边是用户名,右边是域名、IP和%,表示可以访问mysql的域名和IP,%表示外部任何地址都能访问。

grant all privileges on *.* to test_user@localhost identified by test_user;
grant all privileges on *.* to test_user@% identified by test_user;

 

centos 6.5 安装mysql

原文:http://www.cnblogs.com/lvlv/p/4834036.html

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