使用者的設定為:
- 代碼: 選擇全部
mysql> select user,host from user ;
+------------------+-----------+
| user | host |
+------------------+-----------+
| test3 | % |
| root | Kavka |
| debian-sys-maint | localhost |
| root | localhost |
+------------------+-----------+
4 rows in set (0.00 sec)
my.cnf的mysqld部份設定如下(沒有skip-networking )
- 代碼: 選擇全部
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
# skip-locking
# skip-external-locking
thread_concurrency = 4
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
query_cache_limit = 1048576
query_cache_size = 16777216
query_cache_type = 1
log-bin = /var/log/mysql/mysql-bin.log
files kept.
max_binlog_size = 104857600
skip-bdb
內部連線偷沒有問題,但是mysql -h指定自己的ip或127.0.0.1就沒辦法連線
- 代碼: 選擇全部
# > mysql -h 127.0.0.1 -u test3 -p
Enter password:
ERROR 2013: Lost connection to MySQL server during query
# > mysql -h localhost -u test3 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 4.0.24_Debian-10-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
user test3的權限為:
- 代碼: 選擇全部
# > mysqlaccess 127.0.0.1 test3 mysql
mysqlaccess Version 2.06, 20 Dec 2000
By RUG-AIV, by Yves Carlier (Yves.Carlier@rug.ac.be)
Changes by Steve Harvey (sgh@vex.net)
This software comes with ABSOLUTELY NO WARRANTY.
Access-rights
for USER 'test3', from HOST '127.0.0.1', to DB 'mysql'
+-----------------+---+ +-----------------+---+
| Select_priv | Y | | Show_db_priv | Y |
| Insert_priv | Y | | Super_priv | Y |
| Update_priv | Y | | Create_tmp_table_priv | Y |
| Delete_priv | Y | | Lock_tables_priv | Y |
| Create_priv | Y | | Execute_priv | Y |
| Drop_priv | Y | | Repl_slave_priv | Y |
| Reload_priv | Y | | Repl_client_priv | Y |
| Shutdown_priv | Y | | Ssl_type | ? |
| Process_priv | Y | | Ssl_cipher | ? |
| File_priv | Y | | X509_issuer | ? |
| Grant_priv | N | | X509_subject | ? |
| References_priv | Y | | Max_questions | 0 |
| Index_priv | Y | | Max_updates | 0 |
| Alter_priv | Y | | Max_connections | 0 |
+-----------------+---+ +-----------------+---+
NOTE: A password is required for user `test3' :-(
The following rules are used:
db : 'No matching rule'
host : 'Not processed: host-field is not empty in db-table.'
user : '%','test3','X','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','','0','0','0'
BUGs can be reported by email to bugs@mysql.com
網路上用google找資料有找部着頭緒,只找到一篇http://www.linuxuser.com.tw/power/list2.php?id=1892說可能是glibc的問題,可是還是解決不了,請問還有可能是什麼問題嗎?