Jump to content

MYSQL problem


Xteeahn

Recommended Posts

Hey, I was trying to set up Snipe gallery from http://www.snipegallery.com/ and I got some mysql errors, as there support forum is closed I was hoping any of you could help me.

I ran through their installer, I set all the paths to where they needed to be. But as soon as I want to run Snipe it gives me this error

[quote]A database error has occured.

mySQL said: Access denied for user 'ODBC'@'localhost' (using password: NO)

SQL query: select id, name, created_on from snipe_gallery_cat where cat_parent='0' [/quote]

I can see the error comes from table "snipe_gallery_cat" and it gives some errors from some of those fields.
But I dont know much of mysql so I got no clue what I need to do here.

This is how these fields looks like
[quote]
Field        Type          Collation  Attributes  Null      Default  Extra
id        int(11)                                      No        auto_increment
name    varchar(200)      latin1_general_ci        Yes  NULL
created_on  datetime                                No  0000-00-00 00:00:00
[/quote]
And I am running on xampp [url=http://www.apachefriends.org/en/xampp-windows.html]http://www.apachefriends.org/en/xampp-windows.html[/url]
Link to comment
Share on other sites

I'm not aware of any user ODBC, I havent set this user in Snipe's config file and neither in phpmyadmin.
I just tried adding user ODBC and gave him all privileges and now I get this error.
[quote]mySQL said: No database selected

SQL query: select id, name, created_on from snipe_gallery_cat where cat_parent='0' [/quote]
Link to comment
Share on other sites

Well mysql_connect and mysql_select_db is not to be found in the config file nor anywhere else, but it seems to connect like this
[quote]
$cfg_database_host = "localhost";

$cfg_database_user = "ODBC";

$cfg_database_pass = "";

$cfg_database_name = "fotosh";
[/quote]
Link to comment
Share on other sites

that's not connecting, that's simply assigning your connection variables. notice that the snippet you posted is not calling any functions at all. with those variables, you'd have to make a connection like this:
[code]
<?php
$conn = mysql_connect($cfg_database_host, $cfg_database_user, $cfg_database_pass);
mysql_select_db($cfg_database_name, $conn);
?>
[/code]

apparently, though, based on your original post, there is a connection being attempted SOMEWHERE because of the error you were receiving.
Link to comment
Share on other sites

So I found the file where the connection is being attempted
[quote]
if ((!is_dir($cfg_admin_path)) || (!file_exists($cfg_app_path."/inc/config.php"))) {
$path_error = 1;
$is_error = 1;
} else {
if (!@mysql_pconnect($cfg_database_host,$cfg_database_user,$cfg_database_pass))
die('<span class="errortxt">FATAL ERROR: cannot connect to mySQL server <br>host: '.$cfg_database_host.' <br>user: '.$cfg_database_user.' <br>password: '.$cfg_database_pass.' </span>');
if (!@mysql_select_db($cfg_database_name))
die('<span class="errortxt">FATAL ERROR: I cant make up my mind!! Cannot select MySQL database "'.$cfg_database_name.'"</span>');
[/quote]
But it looks like to me that I am making a database connection.
And whenever I try to reach this page I get the error stated in the code
[quote]
FATAL ERROR: cannot connect to mySQL server
host: http://localhost/
user: ODBC
password:
[/quote]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.