libmysqld_dev linux,解决mysql安装mysqld doesn\'t exist or is not-鸟哥のlinux-ChinaUnix博客

最近phpwind升级8.7后,经常出现宕机的现象,不是Apache卡死,吃光内存机器重启,就是mysql数据库被锁,无奈!

多个原因,apache的版本过低,导致执行效率慢;另外数据库版本过低,查询语句多时,自动锁!网站几乎不能访问!另外就是程序可能也有点问题,测试页面可以正常访问!主页却不能打开!

把apache升级到2.2版本,程序转移到了另一台机器上,搭建LAMP环境,用于编译php, 已经安装好了mysql!  试着运行,发现机器运行正常,无负载超高的现象,可是网站还是会卡,数据库还是会锁死!

联系到phpwind官方寻找技术支持,的确有bug,官方同意帮我们解决!

我们也考虑到把数据版本也升级下,由于机器暂时紧缺,只能在程序上搭建,一条船上前线,哈哈!

采用二进制文件安装mysql

初始化正常,添加mysql服务,可是启动的时候出现问题了

[root@localhost scripts]# /usr/local/mysql5.0.45/bin/mysqld_safe --defaults-file=/etc/my.cnf  --user=mysql  &

[1] 31358

[root@localhost scripts]# The file /usr/local/mysql/bin/mysqld doesn't exist or is not executable

Please do a cd to the mysql installation directory and restart

this script from there as follows:

./bin/mysqld_safe.

See http://dev.mysql.com/doc/mysql/en/mysqld_safe.html for more

information

\

[1]+  Exit 1                  /usr/local/mysql5.0.45/bin/mysqld_safe --defaults-file=/etc/my.cnf --user=mysql

查看了很多资料,最终还是官方的文档给力:

5. Change location into the installation directory:

shell> cd mysql

You will find several files and subdirectories in the `mysql'

directory. The most important for installation purposes are the

`bin' and `scripts' subdirectories:

* The `bin' directory contains client programs and the server.

You should add the full pathname of this directory to your

`PATH' environment variable so that your shell finds the MySQL

programs properly. See *Note environment-variables::.

* The `scripts' directory contains the `mysql_install_db'

script used to initialize the `mysql' database containing the

grant tables that store the server access permissions.

6. Ensure that the distribution contents are accessible to `mysql'.

If you unpacked the distribution as `mysql', no further action is

required. If you unpacked the distribution as `root', its contents

will be owned by `root'. Change its ownership to `mysql' by

executing the following commands as `root' in the installation

directory:

shell> chown -R mysql .

shell> chgrp -R mysql .

The first command changes the owner attribute of the files to the

`mysql' user. The second changes the group attribute to the

`mysql' group.

7. If you have not installed MySQL before, you must create the MySQL

data directory and initialize the grant tables:

shell> scripts/mysql_install_db --user=mysql

If you run the command as `root', include the `--user' option as

shown. If you run the command while logged in as that user, you

can omit the `--user' option.

The command should create the data directory and its contents with

`mysql' as the owner.

After creating or updating the grant tables, you need to restart

the server manually.

8. Most of the MySQL installation can be owned by `root' if you like.

The exception is that the data directory must be owned by `mysql'.

To accomplish this, run the following commands as `root' in the

installation directory:

shell> chown -R root .

shell> chown -R mysql data

9. If you want MySQL to start automatically when you boot your

machine, you can copy `support-files/mysql.server' to the location

where your system has its startup files. More information can be

found in the `support-files/mysql.server' script itself and in

*Note automatic-start::.

我之前执行的是   chown -R mysql:mysql  .

官方: shell> chown -R root .

shell> chown -R mysql data

最后修正重启:

[root@localhost mysql5.0.45]# chown -R root .

[root@localhost mysql5.0.45]# chown -R mysql data

[root@localhost mysql5.0.45]# ./bin/mysqld_safe --user=mysql &

[1] 31480

[root@localhost mysql5.0.45]# Starting mysqld daemon with databases from /mysqldata

关闭重启:

[root@localhost mysql5.0.45]# /usr/local/mysql5.0.45/bin/mysqladmin  -u root  shutdown

STOPPING server from pid file /mysqldata/localhost.localdomain.pid

110928 10:49:34  mysqld ended

[1]+  Done                    ./bin/mysqld_safe --user=mysql

[root@localhost mysql5.0.45]# ./bin/mysqld_safe --user=mysql &

[1] 31654

[root@localhost mysql5.0.45]# Starting mysqld daemon with databases from /mysqldata

正常!ok

阅读(20826) | 评论(0) | 转发(4) |

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/511478.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

从开店营销到智能化私域运营,有赞发布人工智能引擎Jarvis

“以往在私域发起一场营销活动,从活动策划,到历史数据分析,再到内容排期,整个策划阶段往往需要一周以上的时间,而现在通过营销画布(MA)以及其中内嵌的人工智能能力,只需要30分钟不到…

“云网管” ---云上构建网络自动化体系

简介:云网管是基于阿里云网络多年技术和经验沉淀打造的云上智能网络管理运维平台,提供企业网络全生命周期管理运维的能力,让部署更快捷、运维更高效、网络更透明。 1.背景 云网管是基于阿里云网络多年技术和经验沉淀打造的云上智能网络管理…

2022 (第五届)GIS软件技术大会开幕,GIS、IT将加速融合

院士专家共论GIS与AI、数据库等IT技术加速融合趋势。 会上,超图正式发布新产品SuperMap GIS 11i(2022)、与华为联合发布禹贡开源空间数据库。 6月29日上午,2022(第五届)GIS软件技术大会主题大会在线开幕。大会以“地理智慧 多维筑基”为主题,…

牛顿迭代法c 语言程序,牛顿迭代法 c语言实现

#include #include double func(double x) //函数{return x*x*x*x-3*x*x*x1.5*x*x-4.0;}double func1(double x) //导函数{return 4*x*x*x-9*x*x3*x;}int Newton(double *x,double precision,int maxcyc) //迭代次数{double x1,x0;int k;x0*x;for(k0;k{if(func1(x0)0.0)//若通过…

构建制品不一致,后续工作都是白费 | 研发效能提升36计

简介:本篇文章,我们从软件交付的终态出发,提出了不可变构建的概念。在软件开发的过程中,我们怎样才能享受产业生态的红利,实现软件交付过程的标准化呢?软件交付当中的集装箱应该是什么样的? 专栏…

巧用 Bitmap 实现亿级海量数据统计

作者 | 码哥字节来源 | 码哥字节在移动应用的业务场景中,我们需要保存这样的信息:一个 key 关联了一个数据集合。常见的场景如下:给一个 userId ,判断用户登陆状态;显示用户某个月的签到次数和首次签到时间&#xff1b…

cache 访问延迟背后的计算机原理

简介:本文介绍如何测试多级 cache 的访存延迟,以及背后蕴含的计算机原理。 CPU 的 cache 往往是分多级的金字塔模型,L1 最靠近 CPU,访问延迟最小,但 cache 的容量也最小。本文介绍如何测试多级 cache 的访存延迟&…

c语言fun函数yx,C语言解24点游戏程序

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼前几天在微博上看到24点的游戏,6 6 610。算了很久是在算不出来,最后我想我何不写一个小程序解决它?说做就做,我刚开始的想法很简单,就是列举4个数的所有可能的表达式组合&…

创新推出 | Serverless 场景排查问题利器:函数实例命令行操作

简介: 实例命令行功能的推出希望能消除用户使用 Serverless 的“最后一公里”,直接将真实的函数运行环境展现给用户,此后 Serverless 将不再是一个“黑盒”,用户可以更加信任和依赖 Serverless 平台来扩展更多的业务场景和规模。 …

人人都是 Serverless 架构师 | 弹幕应用开发实战

简介:如何使用 Serverless 架构实现全双工通信的应用,Serverless 架构中数据库是如何使用的,本篇文章将为您揭开答。 作者 | 寒斜(阿里云云原生中间件前端负责人) Serverless 的理念是即时弹性,用完即走。…

“ Linux 和 Kubernetes 正在成为一切的平台”—— 对话全球最大独立开源公司 SUSE CTO...

【CSDN 编者按】作为全球企业级开源解决方案领导者SUSE的CTO,Brent Schroeder见证了一波又一波技术潮流赋能企业创新发展,为企业注入新活力。同时,他也感受到技术革新给企业的商业策略、运营方式和IT基础设施所带来的冲击。他认为&#xff0c…

c语言里有js的预编译环节吗,C语言第十一讲,预处理命令.

C语言第十一讲,预处理命令.一丶预处理简介什么是预处理,预处理就是预先处理. 我们知道,程序会经过编译,连接形成可执行文件这些在编译之前对源文件进行简单加工的过程,就称为预处理(即预先处理、提前处理)。预处理主要是处理以#开头的命令,例如#include …

各位 PHPer,Serverless 正当时

简介:PHP 作为一个开发群体的很大的语言其应用范围相当广泛,Serverless 的理念和 PHP 语言的理念都是让开发者最大精力集中在自己的业务价值。那么 PHP 遇见 Serverless 会迸发出哪些火花呢? 前言 PHP 的应用范围相当广泛,尤其是…

数字化转型再下一城,数字孪生厂商优锘科技宣布完成超3亿元融资

数字孪生技术是传统行业数字化转型的重要抓手,属于国家优先发展的战略性产业之一,已列入国家“十四五”规划纲要。 6月30日消息,数字孪生领导厂商“UINO优锘科技”宣布已于近期完成C轮超3亿元融资,本轮融资由中国互联网投资基金领…

双龙贺岁,龙蜥 LoongArch GA 版正式发布

简介:Anolis OS 8.4 LoongArch 正式版发布产品包括 ISO、软件仓库、虚拟机镜像、容器镜像。 简介 继 Anolis OS LoongArch 预览版发布后,现迎来龙蜥 LoongArch 正式版首发,该正式版在预览版的基础上提供了 AppStream、PowerTools 等仓库。A…

c语言中a lt 1e-9,年9月计算机二级考试C语言强化训练题

年9月计算机二级考试C语言强化训练题为了使广大学员在备战计算机二级考试时更快的掌握相应知识点,小编在此精选了计算机二级C语言的练习题供学员参考,大家要抓紧时间备考,祝大家备考愉快,梦想成真。一、单选题1). 若有说明&#x…

Serverless 年终技术盘点 :工业、学术、社区遍地开花,国内厂商迅速卡位

简介:预计 2021 年,将会有大量主流企业的核心应用,从原来的主机架构迁移到 Serverless 架构。 作者 | 刘宇(花名:江昱) 2021 年,Serverless 架构在权威咨询机构 Forrester 所发布的 《 The F…

Docker 如何安全地进入到容器内部

作者 | 飞向星的客机来源 | CSDN博客🌟 前言镜像是构建容器的蓝图,Docker 以镜像为模板,构建出容器。容器在镜像的基础上被构建,也在镜像的基础上运行,容器依赖于镜像。本文将对 容器的运行 及相关内容进行详细讲解。容…

KubeVela v1.2 发布:你要的图形化操作控制台 VelaUX 终于来了

简介:时间来到 2022 年,KubeVela 也正式进入了第四个阶段,在原先核心控制器 API 基本稳定的基础上,我们以插件的形式增加了一系列开箱即用的功能。让开发者可以通过 UI 控制台的方式,连接 CI/CD 完整流程,端…

c语言水仙花数(输入判断),用c语言判断一个数是否为水仙花数?

你的C语言程序我帮你改完了,完整的程序如下(改动的地方见注释)#includeint narcissistic(int number){//这里n1改成n0并加product变量保存连乘积int a,b0,n0,c,number2,number3,product;number2number;number3number;while(number>0){//这里把number>10改成number>0nu…