За последние 24 часа нас посетили 11828 программистов и 1164 робота. Сейчас ищут 720 программистов …
-
- С нами с:
- 3 фев 2016
- Сообщения:
- 4
- Симпатии:
- 0
-
<?php if ( ! defined(‘BASEPATH’)) exit(‘No direct script access allowed’);
-
$active_group = «default»;
-
$db[‘default’][‘hostname’] = «localhost»;
-
$db[‘default’][‘username’] = «qwert»;
-
$db[‘default’][‘password’] = «qwert»;
-
$db[‘default’][‘database’] = «socialarti»;
-
$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»;
Что с ней делать ? почему не подключается к базе ? пароль база данных и прочее прописаны правильно
-
Команда форума
Модератор- С нами с:
- 15 мар 2007
- Сообщения:
- 9.902
- Симпатии:
- 969
Re: Ошибка A Database Error Occurred Unable to connect to y
подробности будут?
-
- С нами с:
- 3 фев 2016
- Сообщения:
- 4
- Симпатии:
- 0
Re: Ошибка A Database Error Occurred Unable to connect to y только код. Смотрю подобные ошибки в гугле так там пишут в какой строке ошибка и так далее. у меня просто вот эта ошибка без указаний и все.
A Database Error OccurredUnable to connect to your database server using the provided settings.
-
Команда форума
Модератор- С нами с:
- 15 мар 2007
- Сообщения:
- 9.902
- Симпатии:
- 969
Re: Ошибка A Database Error Occurred Unable to connect to y
я очень рад был увидеть объявление значений ключей массива. но как ты может быть догадываешься — ни одна из этих строк не может сгенерировать подобное сообщение об ошибке. не хочешь чтоб тебе помогали — играй дальше в партизана.
-
- С нами с:
- 3 фев 2016
- Сообщения:
- 4
- Симпатии:
- 0
Re: Ошибка A Database Error Occurred Unable to connect to y форум для новичков …. скажите что хотите увидеть я скину, потому что я не знаю что дает эту ошибку
-
Команда форума
Модератор- С нами с:
- 15 мар 2007
- Сообщения:
- 9.902
- Симпатии:
- 969
Re: Ошибка A Database Error Occurred Unable to connect to y
да, форум для новичков, но у тебя голова-то на плечах для чего? если речь идет об ошибке установки соединения с субд то обсуждается код отвечающий за установку соединения с субд. да, конфиг ты молодец что выложил, но только он же бесполезен в обсуждаемой проблеме. вообще бесполезен. можно было еще выложить код установки соединения без конфига и тогда бы мы начали гадать какой конфиг. как видишь, есть варианты быть не информативным. не надо ими пользоваться.
и да, включи вывод ошибок на максимальный уровень — возможно там еще какой-то текст ошибки спрятан.
Microsoft distributes Microsoft SQL Server 2012 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2012 fix release.
Symptoms
Consider the following scenario:
-
You create a business rule in System Administration of Master Data Manager in Microsoft SQL Server 2012.
-
The business rule contains a combination of attributes. The name of one of the attributes contains a space.
-
You try to publish the business rule.
In this scenario, you receive the following error message:
A database error has occurred. Contact your system administrator.
Cause
This issue occurs because of a bug in SQL Server 2012 Master Data Services (MDS).
Resolution
Cumulative update information
SQL Server 2012
The fix for this issue was first released in Cumulative Update 1 for SQL Server 2012. For more information about how to obtain this cumulative update package for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:
2679368 Cumulative update 1 for SQL Server 2012Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2692828 The SQL Server 2012 builds that were released after SQL Server 2012 was released
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.
Workaround
To work around this issue, do not use spaces in attribute names in a business rule.
References
For more information about the Incremental Servicing Model for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:
935897 An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problemsFor more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
822499 Naming schema for Microsoft SQL Server software update packagesFor more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates
Need more help?
Want more options?
Explore subscription benefits, browse training courses, learn how to secure your device, and more.
Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.
Can someone help me?
I am a beginner and trying to make wearing CodeIgniter authentication, but when I try to make an error like this
A Database Error Occurred
Error Number: 1046
No database selected
SELECT * FROM (`user`) WHERE `user_username` = 'amanda' AND user_passwordMD5("12345") =
Filename: C:xampphtdocscodeignitersystemdatabaseDB_driver.php
Line Number: 330
thanx
asked Apr 5, 2014 at 6:05
4
please make sure you have setup database configuration in application/config/database.php file
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'my_database';
answered Apr 5, 2014 at 6:10
3
Check the database.php file in application/config/
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = 'mypassword';
$db['default']['database'] = 'my_database'; // here is the database selection
answered Apr 5, 2014 at 6:12
ReNiSh ARReNiSh AR
2,7822 gold badges30 silver badges42 bronze badges
3
Open the file application/config/database.php
file and change the following line:
$db['default']['dbdriver'] = 'mysql';
To:
$db['default']['dbdriver'] = 'mysqli';
This shift to mysqli
saved by day.
martianwars
6,3605 gold badges34 silver badges44 bronze badges
answered Dec 10, 2016 at 18:50
Lost connection to MySQL server during query
Line Number: 337
answered Jul 6, 2017 at 7:16
people who critic here should have not only education but also common sense. they should know also what time I made this comment and what was my reputation score. It is not only about giving an answer but the giving also the suggestion a beginner can pin-point the problem. I could have given the answer but just after posting my comment someone already given answer. Look below — best among anyone given here
$config['hostname'] = "localhost";
$config['username'] = "username";
$config['password'] = "password";
$config['database'] = "database";
$config['dbdriver'] = "mysql";
$config['dbprefix'] = "";
$config['pconnect'] = FALSE;
$config['db_debug'] = TRUE;
$config['cache_on'] = FALSE;
$config['cachedir'] = "";
$config['char_set'] = "utf8";
$config['dbcollat'] = "utf8_general_ci";
answered Apr 5, 2014 at 14:53
user3470953user3470953
11k2 gold badges17 silver badges18 bronze badges
Steps to reproduce the issue
OS — Ubuntu 20.04
PHP 7.4.3 (cli) (built: Aug 17 2022 13:29:56) ( NTS )
Mysql Server — Already installed and running various other databases on separate server — Version 5.7
Mysql Client installed is version 8.0
Joomla Version 4.2.2
Apache2 — Server version: Apache/2.4.41 (Ubuntu)
The Webserver is fresh installation with latest update and upgrade.
After installing the pre-requisites, I started the installation and filled in the basic details and database connections.
I am able to connect the database from the server from commandline.
But, when I proceed with Joomla installation, I am getting the A Database error occurred.
Note :- separate database created for joomla installation.
I am not able to view the logs for the errors further.
Kindly help me with the installation in case I am missing somehting. .
Regards
Abhinav Aggarwal
Привет всем!!!
Ошибка такая….
________________________
Error Number: 1054
Unknown column ‘id_relation’ in ‘where clause’
SELECT id, title FROM 2d_categories WHERE id_relation = 0
Filename: models/AutoloadModel.php
Line Number: 8
_________________________
Сам файл AutoloadModel.php ….
_________________________
<?php
class AutoloadModel extends CI_Model
{
public function getCategories()
{
$sql = "SELECT id, title FROM 2d_categories WHERE id_relation = ?";
$query = $this->db->query($sql, 0);
$getCategories = '';
foreach ($query->result() as $row) {
$sql = "SELECT title, url FROM 2d_categories WHERE id_relation = ? ORDER BY title";
$query1 = $this->db->query($sql, $row->id);
$getSubCategories = '';
foreach ($query1->result() as $row1) {
$getSubCategories .= '<li><a href="'.site_url('category/'.$row1->url.'/').'">'.$row1->title.'</a></li>';
}
$getCategories .= '<li class="dropdown">
<a href="#" class="dropdown-toggle waves-effect waves-light" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">'.$row->title.' <span class="caret"></span></a>
<ul class="dropdown-menu">
'.$getSubCategories.'
</ul>
</li>';
}
return $getCategories;
}
public function getFooter()
{
$sql = "SELECT title, url FROM 2d_pages WHERE display_footer = 1 ORDER BY title";
$query = $this->db->query($sql);
$getFooter = '';
foreach ($query->result() as $row) {
$getFooter .= '<li><a href="'.site_url('page/'.$row->url.'/').'">'.$row->title.'</a></li>';
}
return $getFooter;
}
}
Ну и в принципе сам вопрос — В какую сторону копать и что менять?
Заранее примного благодарен!!!)))