A Database Error Occurred

不想你离开。 提交于 2019-12-25 06:48:08

问题


Unable to connect to your database server using the provided settings.

Filename: C:\wamp\www\bdwey-flowrank-f557ab5e422d\system\database\DB_driver.php

Line Number: 124

where the problem, please help?

DB setting is correct

$active_group = 'default';
$active_record = TRUE;
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = 'sqlpass';
$db['default']['database'] = 'myDBName';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;`

and when remove password from $db['default']['password'] = ''; generate this error

A Database Error Occurred

Error Number: 1017

Can't find file: '.\flowrank\use@0009rs.frm' (errno: 22)

SELECT items.image, CONCAT(users.fname,' ',users.lname) AS full_user_name, competition.competition_id,competition.title,competition.votes FROM items AS items LEFT JOIN competitions AS competition ON competition.competition_id = items.competition_id LEFT JOIN users AS users ON competition.user_id = users.user_id GROUP BY items.competition_id ORDER BY items.votes ASC LIMIT 5

Filename: C:\wamp\www\bdwey-flowrank-f557ab5e422d\system\database\DB_driver.php

Line Number: 330

Where the problem?


回答1:


Looks like the problem is not a code problem but your MySQL server.

Try repairing your mysql tables. Have a read here: http://dev.mysql.com/doc/refman/5.0/en/rebuilding-tables.html



来源:https://stackoverflow.com/questions/17912508/a-database-error-occurred

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!