Centos中用命令 yum install mysql安装数据库,但装完后运行mysqld启动mysql的时候提示找不到,通过 find / | grep mysqld 也没找到mysqld的目录,后来在Google上搜索下,才知道用yum安装时候mysql也有三个参数的。

yum install mysql,只是安装了mysql的client,如果你只安装了这一步,就会发现找不到mysqld。

yum install mysql-server,才安装了mysql的服务后台程序;当然还有一个MySQL-devel。

装上后就有mysqld了。

具体步骤如下:

  1. yum install mysql
  2. yum install mysql-server
  3. yum install mysql-devel
  4. chgrp -R mysql /var/lib/mysql
  5. chmod -R 770 /var/lib/mysql
  6. service mysqld start
  7. To start mysqld at boot time you have to copy
  8. support-files/mysql.server to the right place for your system
  9. PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
  10. To do so, start the server, then issue the following commands:
  11. /usr/bin/mysqladmin -u root password 'new-password'
  12. /usr/bin/mysqladmin -u root -h LAMP.ORG password 'new-password'
  13. Alternatively you can run:
  14. /usr/bin/mysql_secure_installation
  15. which will also give you the option of removing the test
  16. databases and anonymous user created by default.  This is
  17. strongly recommended for production servers.
  18. See the manual for more instructions.
  19. You can start the MySQL daemon with:
  20. cd /usr ; /usr/bin/mysqld_safe &
  21. You can test the MySQL daemon with mysql-test-run.pl
  22. cd mysql-test ; perl mysql-test-run.pl
  23. Please report any problems with the /usr/bin/mysqlbug script!
  24. The latest information about MySQL is available on the web at
  25. http://www.mysql.com
  26. Support MySQL by buying support/licenses at http://shop.mysql.comz

转自:http://www.magentonotes.com/centos-yum-install-mysql-and-mysqld.html

用yum安装完mysql后没有mysqld的问题的更多相关文章

  1. 安装完 MySQL 后必须调整的 10 项配置(转)

    英文原文:10 MySQL settings to tune after installation 译文原文:安装完 MySQL 后必须调整的 10 项配置 当我们被人雇来监测MySQL性能时,人们希 ...

  2. 安装完MySQL后必须要调整的10项配置

    2014年02月10日11:11 来源:开源中国 作者:BoydWang, 美好的2014, DrZ 编辑:徐志远 标签: 配置 , mysql , 数据库 [IT168 评论]当我们被人雇来监测My ...

  3. 安装完 MySQL 后必须调整的 10 项配置

    原文出处: mysqlperformanceblog   译文出处:开源中国   欢迎分享原创到伯乐头条 当我们被人雇来监测MySQL性能时,人们希望我们能够检视一下MySQL配置然后给出一些提高建议 ...

  4. 安装完 MySQL 后必须调整的 10 项配置(转)

    当我们被人雇来监测MySQL性能时,人们希望我们能够检视一下MySQL配置然后给出一些提高建议.许多人在事后都非常惊讶,因为我们建议他们仅仅改动几个设置,即使是这里有好几百个配置项.这篇文章的目的在于 ...

  5. docker 安装完mysql 后客户端无法访问

    1.在虚拟机的centos 中安装 docker 的mysql 镜像. docker run --name mysql01 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=12 ...

  6. 安装完mysql后用root不能su成mysql

    现象: debian的机器用aptitude install mysql-server-5.1 后,用id mysql 可看出已经建了mysql用户,但是用root来su mysql 不成功,/var ...

  7. yum安装mysql后没有mysqld

    在Centos中用命令 yum install mysql安装数据库,但装完后运行mysqld启动mysql的时候提示找不到,通过 find / | grep mysqld 也没找到mysqld的目录 ...

  8. Centos7:yum安装MySQL5.7后如何设置root密码

    Centos下安装软件的方式很简单,只需要通过yum install xxx命令即可.第一步当然检查是否有mysql的yum源,命令:yum list|grep mysql-community[主要还 ...

  9. yum安装Apache,Mysql,PHP

    用yum安装Apache,Mysql,PHP.  用yum安装Apache,Mysql,PHP. 2.1安装Apache yum install httpd httpd-devel 安装完成后,用/e ...

随机推荐

  1. js-xlsx操作excel表格

    1导入与导出功能实现 <!DOCTYPE html> <html lang="en"> <head> <meta charset=&quo ...

  2. SQL 列 转换成 查询出来的 行

    查询  每个学生 的  (姓名,语文,数学,英语,成绩)为列 表结构如下: student: 学生表 grade 成绩表 : 查询出如下效果: SQL如下: select s.name,a.* fro ...

  3. ES6 一种新的数据结构--Map跟Objct的区别

    var map1=new Map(); var keys={key:'val'}; map1.set(keys,'content'); ==> {Object {key: "val&q ...

  4. Python Flask装饰器登录验证

    from flask import Flask,render_template,redirect,request,session app = Flask(__name__) app.secret_ke ...

  5. 禅道BUG管理工具使用链接存储

    http://www.zentao.net/book/zentaopmshelp/259.html

  6. hadoop3.1集成yarn ha

    1.角色分配

  7. opencv c++基本操作

    常用操作 imread imread (char *filename, int flag=1); 第二个参数,int类型的flags,为载入标识,它指定一个加载图像的颜色类型.可以看到它自带缺省值1. ...

  8. jdk1.6错误:no such provider: BC jdk1.6支持SSL问题

    程序调用https请求,由于jdk1.6只支持1024的DH,需要调整 1.在$JAVA_HOME/jre/lib/ext 下添加加密组件包 bcprov-jdk15on-1.52.jar和bcpro ...

  9. spring mvc 表单提交 乱码

    1.在web.xml添加过滤器: <filter> <filter-name>SpringCharacterEncoding</filter-name> <f ...

  10. mysql中MAX()函数和count()函数的技巧使用

    1.max()函数 在考虑提高数据库io的情况下,可以创建索引 ===>create index 索引名称 on 表名(列名); 2.count()函数 问题:count(*)与count(某列 ...