centos6.5下安装mysql

前端之家收集整理的这篇文章主要介绍了centos6.5下安装mysql前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  1. [root@bogon~]#yum-yinstall@R_502_198@-server

2.设置开机启动

[html]view plaincopy

在CODE上查看<a href=代码片" height="12" src="http://img.jb51.cc/vcimg/000/000/004/064_75a_b83.png" width="12" style="padding:0px;margin:0px;border:none;">

派生到我的<a href=代码片" height="12" src="http://img.jb51.cc/vcimg/000/000/004/065_737_1b7.svg" width="12" style="padding:0px;margin:0px;border:none;">

  1. [root@bogon~]#chkconfig@R_502_198@don

3.启动@R_502_198@服务

[html]view plaincopy

在CODE上查看<a href=代码片" height="12" src="http://img.jb51.cc/vcimg/000/000/004/064_75a_b83.png" width="12" style="padding:0px;margin:0px;border:none;">

派生到我的<a href=代码片" height="12" src="http://img.jb51.cc/vcimg/000/000/004/065_737_1b7.svg" width="12" style="padding:0px;margin:0px;border:none;">

  1. [root@bogon~]#service@R_502_198@dstart

4.设置@R_502_198@的root用户设置密码

[html]view plaincopy

在CODE上查看<a href=代码片" height="12" src="http://img.jb51.cc/vcimg/000/000/004/064_75a_b83.png" width="12" style="padding:0px;margin:0px;border:none;">

派生到我的<a href=代码片" height="12" src="http://img.jb51.cc/vcimg/000/000/004/065_737_1b7.svg" width="12" style="padding:0px;margin:0px;border:none;">

  1. [root@bogon~]#@R_502_198@-uroot

  2. @R_502_198@>selectuser,host,passwordfrom@R_502_198@.user;

  3. +------+-----------+----------+

  4. |user|host|password|

  5. +------+-----------+----------+

  6. |root|localhost||

  7. |root|bogon||

  8. |root|127.0.0.1||

  9. ||localhost||

  10. ||bogon||

  11. +------+-----------+----------+

  12. 5rowsinset(0.01sec)

查询用户的密码,都为空,用下面的命令设置root的密码为root

[html]view plaincopy

在CODE上查看<a href=代码片" height="12" src="http://img.jb51.cc/vcimg/000/000/004/064_75a_b83.png" width="12" style="padding:0px;margin:0px;border:none;">

派生到我的<a href=代码片" height="12" src="http://img.jb51.cc/vcimg/000/000/004/065_737_1b7.svg" width="12" style="padding:0px;margin:0px;border:none;">

  1. @R_502_198@>setpasswordforroot@localhost=password('root');

  2. @R_502_198@>exit

5.用新密码登陆

[html]view plaincopy

在CODE上查看<a href=代码片" height="12" src="http://img.jb51.cc/vcimg/000/000/004/064_75a_b83.png" width="12" style="padding:0px;margin:0px;border:none;">

派生到我的<a href=代码片" height="12" src="http://img.jb51.cc/vcimg/000/000/004/065_737_1b7.svg" width="12" style="padding:0px;margin:0px;border:none;">

  1. [root@bogon~]#@R_502_198@-uroot-p

  2. Enterpassword:

猜你在找的CentOS相关文章