libmysqld_dev linux,解决mysql安装mysqld doesn\'t exist or is not-鸟哥のlinux-ChinaUnix博客
最近phpwind升級8.7后,經常出現宕機的現象,不是Apache卡死,吃光內存機器重啟,就是mysql數據庫被鎖,無奈!
多個原因,apache的版本過低,導致執(zhí)行效率慢;另外數據庫版本過低,查詢語句多時,自動鎖!網站幾乎不能訪問!另外就是程序可能也有點問題,測試頁面可以正常訪問!主頁卻不能打開!
把apache升級到2.2版本,程序轉移到了另一臺機器上,搭建LAMP環(huán)境,用于編譯php, 已經安裝好了mysql!? 試著運行,發(fā)現機器運行正常,無負載超高的現象,可是網站還是會卡,數據庫還是會鎖死!
聯系到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::.
我之前執(zhí)行的是?? 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) | 轉發(fā)(4) |
總結
以上是生活随笔為你收集整理的libmysqld_dev linux,解决mysql安装mysqld doesn\'t exist or is not-鸟哥のlinux-ChinaUnix博客的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 4岁言语智商30哈意思?
- 下一篇: Spring精华问答 | Spring