Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\AppServ\www\hcch\employee.php on line 77
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in C:\AppServ\www\hcch\employee.php on line 77
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\AppServ\www\hcch\employee.php on line 77
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in C:\AppServ\www\hcch\employee.php on line 77
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in C:\AppServ\www\hcch\employee.php on line 140
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\AppServ\www\hcch\employee.php on line 141
Access denied for user 'ODBC'@'localhost' (using password: NO)作者: sheauren 時間: 2016-1-20 10:51 AM
Access denied for user 'ODBC'@'localhost'(using password: NO)
帳號登入失敗
A link to the server could not be established
連線沒有建立
如果你是本機用名稱為ODBC帳號沒密碼狀態連你的mysql 無法登入..作者: kevin0438 時間: 2016-1-21 09:21 AM
然後要把原先設好的資料庫名稱testdb, 授權給你的新使用者名稱 testuser來使用
包括讀寫以及資料表的建立等
如果不想灌phpmyadmin也可以
授權給資料庫的指令為
GRANT ALL PRIVILEGES ON testdb.* TO 'testuser'@'127.0.0.%' IDENTIFIED BY '123456' WITH GRANT OPTION;
為了確認你的執行順利, 在DOS終端機裏執行mysql -u testuser -p123456 確定是否可以進入mysql client
然後在mysql client裏 輸入"open testdb;" 就會順利開啟資料庫