WDCP開啟網頁時報錯:無法串連mysql,請檢查mysql是否已啟動及使用者密碼是否配置正確

來源:互聯網
上載者:User

標籤:linux

今天公司很久以前的一台WDCP整合的Web服務出現了問題,開啟網頁顯示“無法串連mysql,請檢查mysql是否已啟動及使用者密碼是否配置正確”

????

?????????????????(為伺服器故障時Web訪問報錯資訊)

????

????在網上找了三個小時的資料,找到了很多遇到該問題的朋友,並且只要是資料庫連接不正常的或者資料庫無法正常啟動的,全都會報這個錯誤,下面是我的解決方案:


1、檢查服務運行狀態

[[email protected] etc]# service mysqld status

?mysql is not running.

#mysql服務並未運行


[[email protected] etc]# service mysqld restart

?ERROR! MySQL manager or server PID file could not be found!

Starting MySQL. ERROR! Manager of pid-file quit without updating file.

#試圖重啟服務,結果報錯


[[email protected] etc]# cat /www/wdlinux/mysql-5.1.69/var/WDCP.err

查看WDCP的錯誤記錄檔


? ? 171209 16:10:02 mysqld_safe mysqld from pid file /www/wdlinux/mysql-5.1.69/var/WDCP.pid ended

????171209 16:12:25 mysqld_safe Starting mysqld daemon with databases from /www/wdlinux/mysql-5.1.69/var

????171209 16:12:25 [ERROR] /www/wdlinux/mysql-5.1.69/libexec/mysqld: unknown variable ‘innodb_additional_mem_pool_size=16M‘

????171209 16:12:25 [ERROR] Aborting

????#從日誌看為止的innodb我覺定把innodb的選項注釋掉看一下,結果重啟服務報了一個新的錯誤。


????171209 16:10:02 mysqld_safe mysqld from pid file /www/wdlinux/mysql-5.1.69/var/WDCP.pid ended

????171209 16:12:25 mysqld_safe Starting mysqld daemon with databases from /www/wdlinux/mysql-5.1.69/var

????171209 16:12:25 [ERROR] /www/wdlinux/mysql-5.1.69/libexec/mysqld: unknown variable ‘innodb_additional_mem_pool_size=16M‘

????171209 16:12:25 [ERROR] Aborting

????

????171209 16:12:25 [Note] /www/wdlinux/mysql-5.1.69/libexec/mysqld: Shutdown complete

????

????171209 16:12:25 mysqld_safe mysqld from pid file /www/wdlinux/mysql-5.1.69/var/WDCP.pid ended

????171209 16:13:32 mysqld_safe Starting mysqld daemon with databases from /www/wdlinux/mysql-5.1.69/var

????171209 16:13:32 [ERROR] /www/wdlinux/mysql-5.1.69/libexec/mysqld: unknown variable ‘innodb_buffer_pool_size=2G‘

????171209 16:13:32 [ERROR] Aborting

????#還是和innodb有關係,決定吧所有的innodb都登出掉!!!? ??


????171209 16:13:32 [Note] /www/wdlinux/mysql-5.1.69/libexec/mysqld: Shutdown complete

????

????171209 16:13:32 mysqld_safe mysqld from pid file /www/wdlinux/mysql-5.1.69/var/WDCP.pid ended

????171209 16:14:34 mysqld_safe Starting mysqld daemon with databases from /www/wdlinux/mysql-5.1.69/var

????171209 16:14:35 [ERROR] /www/wdlinux/mysql-5.1.69/libexec/mysqld: unknown variable ‘innodb_buffer_pool_size=2G‘

????171209 16:14:35 [ERROR] Aborting

????

????171209 16:14:35 [Note] /www/wdlinux/mysql-5.1.69/libexec/mysqld: Shutdown complete

????

????171209 16:14:35 mysqld_safe mysqld from pid file /www/wdlinux/mysql-5.1.69/var/WDCP.pid ended


? ? #在/www/wdlinux/etc/my.cnf有關innodb的選項全部注釋掉

????#innodb_buffer_pool_size = 2G

????#innodb_data_file_path = ibdata1:10M:autoextend

????#innodb_file_io_threads = 4

????#innodb_thread_concurrency = 16

????#innodb_flush_log_at_trx_commit = 1

????#innodb_log_buffer_size = 8M

????#innodb_log_file_size = 256M

????#innodb_log_files_in_group = 3

????#innodb_max_dirty_pages_pct = 90

????#innodb_lock_wait_timeout = 120


????啟動mysql服務進行測試:

????

????[[email protected] ~]# service mysqld start

????Starting MySQL. SUCCESS!

? ? #mysql啟動成功


????具體原因暫時還沒找到,主要是因為這不是主要的業務系統,以及該系統是前期開發人員搭建的,所以存在一些問題,此文檔僅作為簡單記錄,查出具體問題後會整理詳細文檔。

WDCP開啟網頁時報錯:無法串連mysql,請檢查mysql是否已啟動及使用者密碼是否配置正確

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.