linux下發布war所遇問題

來源:互聯網
上載者:User


linux下發布war所遇問題 1 linux啟動mysql 由於啟動方式不一樣 顯示也不一樣   www.2cto.com  通過./mysqld_safe &啟動  ps-ef|grep mysql後會顯示如下資訊 root     15537     1  0 11:16 ?        00:00:00 /bin/sh ./mysqld_safe  /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/bogon.err --pid-file=/usr/local/mysql/data/bogon.pid --socket=/usr/local/mysql/mysql.sock --port=3306  而通過 ./mysqld --user==root 強制通過root登陸 只會顯示 root      4998     1  0 13:12 ?        00:00:00 ./mysqld --user=root  服務網所掛的linux這裡強制用第二種方式啟動。用第一種啟動不了 就算是啟動了 過了一會就自動掛斷了。 就算是按照第二中方式啟動 也不能與資料庫插入 。爆出如下錯誤 java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect to this MySQL server"  排查原因從如下著手:www.2cto.com  首先看資料庫的設定檔是否配置正確。 正確的話 繼續排查 伺服器上的資料庫裡面的mysql資料庫 找到user表 查看host 發現裡面有兩個host是一樣的,但是沒有root 所以會報出上述錯誤。刪掉其中一個host就可以了。但是必須重啟服務。 整了半天 ,為了避免下次再出現上述錯誤,特意記錄下來 。 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.