国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁技術(shù)文章
文章詳情頁

Mysql故障排除:Starting MySQL. ERROR! Manager of pid-file quit without updating file

瀏覽:2323日期:2023-11-30 12:20:05

安裝完mysql后,啟動MYSQL時發(fā)現(xiàn)報錯,提示如下:[root@web-server log]# /etc/rc.d/init.d/mysqld startStarting MySQL. ERROR! Manager of pid-file quit without updating file.

看下日志:[root@web-server log]# cat alert.log100811 10:22:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data100811 10:22:57 [Warning] The syntax '--log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '--slow_query_log'/'--slow_query_log_file' instead./usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)100811 10:22:57 [ERROR] Aborting

100811 10:22:57 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

100811 10:22:57 mysqld_safe mysqld from pid file /usr/local/mysql/data/web-server.pid ended100811 10:26:38 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data100811 10:26:38 [Warning] The syntax '--log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '--slow_query_log'/'--slow_query_log_file' instead./usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)100811 10:26:38 [ERROR] Aborting

100811 10:26:38 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

100811 10:26:38 mysqld_safe mysqld from pid file /usr/local/mysql/data/web-server.pid ended;

在網(wǎng)上找了如下方法,但依舊無法解決:

有人說將/etc/my.cnf里面的 skip federated注釋掉即可,但我的my.cnf里壓根就沒有這一項,還有人說/etc/my.cnf中沒有設(shè)置datadir=/data/mysql,但我看了這一項已經(jīng)有了。還有說data/mysql-bin.index沒有刪除,data/mysql-bin.index是存放日志文件索引的文件,只刪除了日志文件而沒有對日志的索引文件做處理顯然是不行的。但刪除data/mysql-bin.index文件,再service mysqld start還是不行。

應(yīng)該如何解決呢?

今天終于搞定了

mysql編譯如下:

CHOST="x86_64-pc-linux-gnu"CFLAGS="-march=nocona -O3 -pipe"CXXFLAGS="${CFLAGS}"./configure "--prefix=/usr/local/mysql" "--localstatedir=/data/mysql/data" "--with-comment=Source" "--with-mysqld-user=mysql" "--without-debug" "--with-big-tables" "--with-charset=gbk" "--with-collation=gbk_chinese_ci" "--with-extra-charsets=all" "--with-pthread" "--enable-static" "--enable-thread-safe-client" "--with-client-ldflags=-all-static" "--with-mysqld-ldflags=-all-static" "--enable-assembler" "--with-plugins=all" "--without-ndb-debug

makemake installuseradd mysql -d /data/mysql -s/sbin/nologin/usr/local/mysql/bin/mysql_install_db--user=mysqlcd /usr/local/mysqlchown -R mysql:mysql . 這一步一定要搞清楚,不要照網(wǎng)上的亂抄,到時候啟動mysql時會因為目錄權(quán)限問題而導(dǎo)致出錯!謹(jǐn)記。mkdir -p /data/mysql/datachown -R mysql /data/mysql/datacp share/mysql/my-huge.cnf /etc/my.cnfcp share/mysql/mysql.server/etc/rc.d/init.d/mysqldchmod 755 /etc/rc.d/init.d/mysqldchkconfig --add mysqld/etc/rc.d/init.d/mysqld start;;cd /usr/local/mysql/binfor i in *; do ln -s /usr/local/mysql/bin/$i/usr/bin/$i; done

這樣,問題就解決了[root@web-server local]# service mysqld startStarting MySQL.

標(biāo)簽: MySQL 數(shù)據(jù)庫
相關(guān)文章:
主站蜘蛛池模板: 安岳县| 北安市| 射阳县| 迁西县| 金坛市| 雷州市| 灵石县| 内江市| 大化| 房产| 丰宁| 武鸣县| 二手房| 望谟县| 马边| 新建县| 阜康市| 渑池县| 买车| 海丰县| 长顺县| 灵丘县| 仁布县| 七台河市| 同仁县| 普兰县| 岑巩县| 古蔺县| 柘荣县| 扬中市| 翁牛特旗| 禹州市| 鹤峰县| 兴城市| 疏附县| 八宿县| 河津市| 青浦区| 镇雄县| 页游| 肥西县|