banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận hệ điều hành Windows Lỗi cơ sở dữ liệu của forum  XML
  [Programming]   Lỗi cơ sở dữ liệu của forum 16/05/2009 09:35:09 (+0700) | #1 | 180719
the_mistake
Member

[Minus]    0    [Plus]
Joined: 21/09/2008 12:33:09
Messages: 31
Offline
[Profile] [PM]

Chào mọi người, em đang tập tành up một forum Vbulletin từ localhost lên 1 host free ( cụ thể là byethost.com), forum của em hoạt động ở local host thì bình thường, nhưng khi upload bằng phần mềm cuteFtp thì truy cập vào địa chỉ đó xuất hiện thông báo lỗi:

Code:
Database Error  	Database error
The database has encountered a problem.
Please try the following:

    * Load the page again by clicking the Refresh button in your web browser.
    * Open the nguyenlinh.byethost31.com home page, then try to open another page.
    * Click the Back button to try another link.

The nguyenlinh.byethost31.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.



Vậy lỗi database ở đây là gì, có thể có cách nào xét rõ hơn được không, làm sao khắc phục được đây, mong mọi người ra tay giúp đỡ, em cám ơn nhiều lắm. smilie
[Up] [Print Copy]
  [Question]   Re: Lỗi Database Error Forum Vbulletin 3.6.5 17/05/2009 21:34:57 (+0700) | #2 | 180820
the_mistake
Member

[Minus]    0    [Plus]
Joined: 21/09/2008 12:33:09
Messages: 31
Offline
[Profile] [PM]
Em biết mô tả như trên có lẽ không đầy đủ, sơ sài, nhưng em nên tìm kiếm tài liệu về cái này ở đâu đây ạ, lỗi database cụ thể ở đây là do cái gì, có những trường hợp nào gây nên lỗi database này, em đã search google rất nhiều về lỗi này nhưng vẫn không tìm ra, mong mọi người cho ý kiến .
[Up] [Print Copy]
  [Question]   Re: Lỗi cơ sở dữ liệu của forum 19/05/2009 01:07:56 (+0700) | #3 | 180945
[Avatar]
tranduyninh
Member

[Minus]    0    [Plus]
Joined: 05/07/2006 12:05:48
Messages: 253
Location: aiowebs.net
Offline
[Profile] [PM] [WWW] [Yahoo!]
do dùng host free
Các bạn giúp mình giải cứu bạn gái này nha : http://bit.ly/23mHJE ( đây là 1 cuộc thi đó ) không biêt các hắc cơ có ý kiến như thế nào ?
[Up] [Print Copy]
  [Question]   Lỗi cơ sở dữ liệu của forum 19/05/2009 01:25:07 (+0700) | #4 | 180951
jforum3000
Member

[Minus]    0    [Plus]
Joined: 26/08/2007 02:53:39
Messages: 1172
Offline
[Profile] [PM]

the_mistake wrote:

Chào mọi người, em đang tập tành up một forum Vbulletin từ localhost lên 1 host free ( cụ thể là byethost.com), forum của em hoạt động ở local host thì bình thường, nhưng khi upload bằng phần mềm cuteFtp thì truy cập vào địa chỉ đó xuất hiện thông báo lỗi:

Code:
Database Error  	Database error
The database has encountered a problem.
Please try the following:

    * Load the page again by clicking the Refresh button in your web browser.
    * Open the nguyenlinh.byethost31.com home page, then try to open another page.
    * Click the Back button to try another link.

The nguyenlinh.byethost31.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.



Vậy lỗi database ở đây là gì, có thể có cách nào xét rõ hơn được không, làm sao khắc phục được đây, mong mọi người ra tay giúp đỡ, em cám ơn nhiều lắm. smilie  


Bạn upload file testmysql.php này lên host, chạy thử xem thế nào và post kết quả về nhé

Code:
<?
###################################### C O P Y R I G H T S ####################################
# THIS SCRIPT IS DISTRIBUTED BY WEBUNE.COM UNDER LICENSE UNDER THE GPL RULES
# PLEASE DO NOT REMOVE THIS MESSAGE IN SUPPORT OF OUR HARD WORK TO CONTINUE TO PROVIDE FREE SUPPORT
###############################################################################################
# OK, HERE WE GO
# Use this varialble if you are using an installation script
$step = $_GET['step'];
if (!$step) {
	$page_title = 'Form';
}
else{
	$page_title = 'install step '.$step;
}
############## BEGIN FUNCTIONS ##############################
# FUNCTION TO TEST USERNAME AND PASSWORD IN MYSQL HOST
function db_connect($server, $username, $password, $link = 'db_link') {
	global $$link, $db_error;
	$db_error = false;
	if (!$server) {
		$db_error = 'No Server selected.';
		return false;
	}
	$$link = @mysql_connect($server, $username, $password) or $db_error = mysql_error();
	return $$link;
}
# FUNCTION TO SELECT DATABASE ACCESS
function db_select_db($database) {
	echo mysql_error();
	return mysql_select_db($database);
}
# FUNCTION TO TEST DATABASE ACCESS
function db_test_create_db_permission($database) {
	global $db_error;
	$db_created = false;
	$db_error = false;
	if (!$database) {
		$db_error = 'No Database selected.';
		return false;
	}
	if ($db_error) {
		return false;
	} else {
		if (!@db_select_db($database)) {
			$db_error = mysql_error();
			return false;
		}else {
			return true;
		}
	return true;
	}
}

function step1 ($error) {
	echo '<h1 style="color:#FF0000">'.$error.'</h1><hr>';
?>
<form name="form1" method="post" action="<? $_SERVER['PHP_SELF']; ?>?step=2">
<table border="0" cellspacing="5" cellpadding="5">
<tr>
<td><div align="right">mysql hostname:</div></td>
<td><input name="server" type="text" value="<? echo $_REQUEST['server']; ?>"> (usually "localhost")</td>
</tr>
<tr>
<td><div align="right">mysql username:</div></td>
<td><input type="text" name="username" value="<? echo $_REQUEST['username']; ?>"></td>
</tr>
<tr>
<td><div align="right">mysql username password:</div></td>
<td><input type="text" name="password" value="<? echo $_REQUEST['password']; ?>"></td>
</tr>
<tr>
<td><div align="right">mysql database name:</div></td>
<td><input type="text" name="database" value="<? echo $_REQUEST['database']; ?>"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</form>
<?php
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Webune MYSQL TEST - <? echo $page_title; ?></title>
</head>
<body>
<h1><? echo $page_title; ?></h1>
<?
############## END FUNCTIONS ##############################
switch ($step) {
	case '2':
		if ($_REQUEST['server']) {
				$db = array();
				$db['DB_SERVER'] = trim(stripslashes($_REQUEST['server']));
				$db['DB_SERVER_USERNAME'] = trim(stripslashes($_REQUEST['username']));
				$db['DB_SERVER_PASSWORD'] = trim(stripslashes($_REQUEST['password']));
				$db['DB_DATABASE'] = trim(stripslashes($_REQUEST['database']));
				$db_error = false;
				db_connect($db['DB_SERVER'], $db['DB_SERVER_USERNAME'], $db['DB_SERVER_PASSWORD']);
				if ($db_error == false) {
					if (!db_test_create_db_permission($db['DB_DATABASE'])) {
						$error = $db_error;
					}
				} else {
					$error = $db_error;
				}
				if ($db_error != false) {
					$error = "failed";
					echo step1($db_error);
				} else {
					echo '<h1 style="color:green">Congratulations!</h1>Connected Successfuly to datbase <strong><a href="http://www.webune.com">Continue >> </a></strong>';
				}
		} else {
			$error = "ERROR: please provide a hostanme";
			echo step1($error);
		}
	break;

	default:
	echo step1('Step 1');
	break;
}
?>
<div align="center"><img src="http://www.webune.com/images/headers/default_logo.jpg" alt="Webune Hosting"></div>
<div align="center">Script Courtesy of <a href="http://www.webune.com">Webune PHP/Mysql Hosting</a></div>
</body>
</html>
[Up] [Print Copy]
  [Question]   Re: Lỗi cơ sở dữ liệu của forum 19/05/2009 04:16:12 (+0700) | #5 | 180992
the_mistake
Member

[Minus]    0    [Plus]
Joined: 21/09/2008 12:33:09
Messages: 31
Offline
[Profile] [PM]
Kết quả đây ạ

Code:
install step 2
Can't connect to MySQL server on 'ftp.byethost31.com' (4)



trong trường hợp này có phải là ta điền vào bảng thông tin user name: password do nhà cung cấp cấp cho không ạ,
còn database là tên của database ta đặt tại localhost, em đã điền như thế này đúng chưa anh?





Code:
mysql hostname:   ftp.byethost31.com
	(usually "localhost")
mysql username:  b31_3325876
	
mysql username password:  XXXXXX
	
mysql database name:  diendan

[Up] [Print Copy]
  [Question]   Re: Lỗi cơ sở dữ liệu của forum 19/05/2009 06:40:41 (+0700) | #6 | 181016
jforum3000
Member

[Minus]    0    [Plus]
Joined: 26/08/2007 02:53:39
Messages: 1172
Offline
[Profile] [PM]

the_mistake wrote:
mysql hostname: ftp.byethost31.com 

Cấu hình sai chỗ này, byethost dùng mysql hostname dạng sqlXXX.byethostXX.com, ftp.byethostXX.com dùng cho FTP server, bạn xem lại trong tài khoản host khi kích hoạt.
[Up] [Print Copy]
  [Question]   Re: Lỗi cơ sở dữ liệu của forum 19/05/2009 08:32:27 (+0700) | #7 | 181033
the_mistake
Member

[Minus]    0    [Plus]
Joined: 21/09/2008 12:33:09
Messages: 31
Offline
[Profile] [PM]


Vâng ạ, em nhập sai chỗ đó rồi, em đã nhập lại đúng rồi, chỉ còn chỗ database name không biết nhập cái gì vào.
Và cho em hỏi khi ta upload cái diễn đàn localhost đó lên host rồi, tại sao host đó lại bảo số lượng database là 0:
You are currently using 0 of 50 databases. Có phải vì điều này ( không nhận database của localhost kia) mà cái forum đó bị lỗi error database?


PS: tại localhost em đã tạo 1 database 'diendan' với toàn bộ dữ liệu của forum em muốn up vào đó.
Còn một điều quan trọng nữa, các bước up của em thế này đúng không ạ.
1. Tạo forum trên localhost
2. Up nó lên bằng cuteftp ( không chỉnh sửa gì cả)
em có làm sai (hay thiếu bước nào) không nhỉ??

[Up] [Print Copy]
  [Question]   Re: Lỗi cơ sở dữ liệu của forum 19/05/2009 10:42:23 (+0700) | #8 | 181042
jforum3000
Member

[Minus]    0    [Plus]
Joined: 26/08/2007 02:53:39
Messages: 1172
Offline
[Profile] [PM]

the_mistake wrote:

Còn một điều quan trọng nữa, các bước up của em thế này đúng không ạ.
1. Tạo forum trên localhost
2. Up nó lên bằng cuteftp ( không chỉnh sửa gì cả)
em có làm sai (hay thiếu bước nào) không nhỉ??

 

Thiếu bước restore database trên host, có thể dùng phpmyadmin, có sẵn trong hosting control panel, hoặc các công cụ chuyên dụng hơn như mysqldumper, bigdump, ...
Ngoài ra còn phải chính lại thông số cấu hình database trong tập tin config.php nữa.
[Up] [Print Copy]
  [Question]   Re: Lỗi cơ sở dữ liệu của forum 19/05/2009 21:56:08 (+0700) | #9 | 181091
the_mistake
Member

[Minus]    0    [Plus]
Joined: 21/09/2008 12:33:09
Messages: 31
Offline
[Profile] [PM]
Em cám ơn anh nhiều vì đã giúp đỡ, đúng là em đã đọc không kỹ và thiếu phần cấu hình,em up thành công rồi.
Thanks anh again!
[Up] [Print Copy]
  [Question]   Re: Lỗi cơ sở dữ liệu của forum 20/05/2009 06:48:24 (+0700) | #10 | 181159
[Avatar]
ham_choi
Member

[Minus]    0    [Plus]
Joined: 03/09/2006 21:42:03
Messages: 396
Offline
[Profile] [PM]
Nói chung là bạn đã quên tạo database trên host (bạn tạo database tên "diendan" trên localhost chẳng liên quan gì đến Byethost cả) . Rút kinh nghiệm , lần sau đăng nhập vào Vista Panel của Byethost , tạo database trước , rồi mới up source VBB lên , và lưu ý , cần phải sửa nội dung file config.php cho đúng với thông số trong Vista Panel của tài khoản của bạn.
If love were human it would know me
In a lost space come and show me
Hold me and control me and then
Melt me slowly down
Like chocolate !
[Up] [Print Copy]
  [Programming]   Lỗi cơ sở dữ liệu của forum 03/06/2009 05:21:52 (+0700) | #11 | 182666
tienlennao
Member

[Minus]    0    [Plus]
Joined: 22/05/2009 15:13:51
Messages: 1
Offline
[Profile] [PM]
mình cũng gặp rắc rối như the_mistake, cám ơn mọi ngời chia sẻ kinh nghiệm
[Up] [Print Copy]
  [Programming]   Lỗi cơ sở dữ liệu của forum 12/12/2010 19:33:11 (+0700) | #12 | 226934
[Avatar]
dinhhiep36
Member

[Minus]    0    [Plus]
Joined: 14/09/2009 00:48:26
Messages: 52
Offline
[Profile] [PM]
lỗi sau thì fix thế nào vậy các bác "Access denied for user 'dinhhiep'@'localhost' (using password: YES)".


mấy hôm nay em đâu có cấu hình file config đâu ??
[Up] [Print Copy]
  [Programming]   Lỗi cơ sở dữ liệu của forum 12/12/2010 19:44:25 (+0700) | #13 | 226936
[Avatar]
xnohat
Moderator

Joined: 30/01/2005 13:59:19
Messages: 1210
Location: /dev/null
Offline
[Profile] [PM] [Email] [WWW] [Yahoo!] [MSN]
Bồ ko chỉnh file config nhưng biết đâu có ai đó đã "hack" và chỉnh ? kiểm tra kĩ ko thừa bao h cả

Kiểm tra xem user trên còn tồn tại trên MySQL không ( vào Control Panel của hosting mà kiểm ), change lại password về password của bồ.

Tôi vẫn bảo lưu ý kiến, 1 website đang chạy bình thường, máy chủ thuê tại nhà cung cấp uy tín thì ít khi lỗi trên xảy ra. Kiểm tra kĩ có bị tấn công không
iJust clear, "What I need to do and how to do it"/i
br
brBox tán gẫu dời về: http://www.facebook.com/hvaonline
[Up] [Print Copy]
  [Programming]   Lỗi cơ sở dữ liệu của forum 12/12/2010 20:22:59 (+0700) | #14 | 226937
truyennxt
Member

[Minus]    0    [Plus]
Joined: 18/09/2010 07:51:36
Messages: 17
Offline
[Profile] [PM]
Mình thấy lạ là bạn cài vbb mà bạn không cần sửa file config thì khó hiểu. VBB cả bản null hay keygen đều cần phải chỉnh config cả, và nếu dùng host free thì chỗ localhost cần phải thay bằng tên host của bạn (sql.xxx.xxx)
[Up] [Print Copy]
  [Programming]   Lỗi cơ sở dữ liệu của forum 12/12/2010 20:29:11 (+0700) | #15 | 226938
[Avatar]
dinhhiep36
Member

[Minus]    0    [Plus]
Joined: 14/09/2009 00:48:26
Messages: 52
Offline
[Profile] [PM]
host này là host free bạn àh. trước đây mấy ngày diễn đàn vẫn hoạt động bình thường, đôi khi xảy ra lỗi CSDL. Cho đến ngày hôm nay thì lỗi hoàn toàn.

file config thì mình thấy vẫn bình thường.


p/s: diễn đàn này mình lập lâu rồi ...
[Up] [Print Copy]
  [Programming]   Lỗi cơ sở dữ liệu của forum 12/12/2010 22:50:08 (+0700) | #16 | 226943
[Avatar]
dinhhiep36
Member

[Minus]    0    [Plus]
Joined: 14/09/2009 00:48:26
Messages: 52
Offline
[Profile] [PM]
mình đã fix xong, cám ơn mọi người nhiều
[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|