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. iOS APP程序启动原理

    UIApplication 程序启动原理 一个应用程序运行就必须要有一个进程,一个进程至少要有一个线程,我们把这个线程叫做主线程,主线程开启之后会开启一个主运行循环,如果不开启一个运行循环,程序开启了 ...

  2. 苹果电脑Mac OS系统重装图文详解

    苹果电脑Mac OS系统重装图文详解 本文来自于[系统之家] www.xp85.com现在电脑都很强大,可是也很脆弱,常常需要你去维护,甚至经常需要你重装系统,那么Mac OS又如何重装系统呢?刚刚使 ...

  3. FineReport——发送邮件

    在FR中,个用户之间可以通过邮件的形式进行通信,但是存在一个问题就是FineReport平台只能设置一个发件人账户,收件人账户可以有多个. 所以在实际的系统开发中可能需要自己开发信息交互的模块. 在系 ...

  4. leetcode 121 122 123 . Best Time to Buy and Sell Stock

    121题目描述: 解题:记录浏览过的天中最低的价格,并不断更新可能的最大收益,只允许买卖一次的动态规划思想. class Solution { public: int maxProfit(vector ...

  5. XML 约束 (DTD和 schema)

    book.DTD 如下: <?xml version="1.0" encoding="UTF-8" ?> <schema xmlns=&quo ...

  6. 今天开始学模式识别与机器学习(PRML),章节5.1,Neural Networks神经网络-前向网络。

    今天开始学模式识别与机器学习Pattern Recognition and Machine Learning (PRML),章节5.1,Neural Networks神经网络-前向网络. 话说上一次写 ...

  7. 修改Struts2的struts.xml配置文件位置

    默认情况下,Struts2的配置文件名称为struts.xml,且该文件放在src根目录下.如下图所示: 如果需要修改struts.xml的位置,例如把struts.xml放到struts2文件夹下, ...

  8. 谈谈对final的理解

    1.final修饰类 类不能被继承,类中的所有方法都是final的 2.final修饰方法 方法不能被覆盖,private修饰的方法隐性的添加了final 3.final修饰方法内参数 方法内的参数不 ...

  9. POJ 1845 Sumdiv (整数唯一分解定理)

    题目链接 Sumdiv Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 25841   Accepted: 6382 Desc ...

  10. POJ3468 A Simple Problem with Interger [树状数组,差分]

    题目传送门 A Simple Problem with Integers Time Limit: 5000MS   Memory Limit: 131072K Total Submissions: 1 ...