2016-08-04 191 views
2

我在遊戲服務器和網絡服務器之間的連接有一些麻煩。遊戲服務器運行FreeBSD 9.3,Mysql5.5和Webserver使用的是Centos 6.5。MySQL連接服務器客戶端

有時連接它的全成,但意想不到的幾個刷新後,我收到此錯誤:

access denied for user 'root'@'XXX.XXX.XXX.XXX' (using password yes) 

我已經沒有這個文件,但它或不相同的結果嘗試:my.cnf中

[mysqld] 
local-infile=0 
query_cache_limit=5M 
query_cache_size=0 
query_cache_type=1 
max_connections=1500 
interactive_timeout=100 
wait_timeout=50 
connect_timeout=10 
thread_cache_size=128 
key_buffer=200M 
join_buffer=1M 
max_allowed_packet=16M 
table_cache=1536 
sort_buffer_size=18M 
read_buffer_size=18M 
max_connect_errors=10 
thread_concurrency=2 
myisam_sort_buffer_size=64M 
server-id=1 
tmp_table_size=32M 
max_heap_table_size=32M 

[mysqldump] 
quick 
max_allowed_packet=16M 

[mysql] 
no-auto-rehash 

[isamchk] 
key_buffer=128M 
sort_buffer=128M 
read_buffer=10M 
write_buffer=10M 

[myisamchk] 
key_buffer=128M 
sort_buffer=128M 
read_buffer=10M 
write_buffer=10M 

[mysqlhotcopy] 
interactive-timeout 

MySQL user preview

MySQL privileges preview(all privilleges active)

+0

什麼可以幫助,是連接到另一個用戶,而不是「根」。某些服務器可能會默認阻止「root」連接。 –

+0

謝謝你的回覆。我第一次嘗試用戶'Administrator',但結果是一樣的。爲了服務器的安全,我想使用'user'@'特定IP'。 –

回答

0

您需要檢查您的MySQL'用戶'實際權限 請注意您需要提供客戶端連接的實際IP地址,以便您的用戶可以連接到服務器:例如,'user'@192.168.1.2'。

或者您可以允許此用戶使用'user'@'%'語句從任何IP連接。

你可以顯示你的權限表嗎? 看看here瞭解更多關於MySQL權限的信息,這可能有所幫助。

+0

授予*。*至'root'@'5.154.240.166'由密碼標識'* 0EC4AE6282E803E81E2329FB776F56F85413BE0D'授予選項 + --------------------所有特權-------------------------------------------------- -------------------------------------------------- -------------------- + –

相關問題