Author Topic: Need some help with database (mysql)  (Read 10620 times)

0 Members and 1 Guest are viewing this topic.

fircx

  • Jr. Member
  • **
  • Posts: 3
Need some help with database (mysql)
« on: September 10, 2013, 01:19:10 PM »
Hey guys!

I have linux server with mysql (5.1) apache (2.2) and php (5.3.3) installed. I uploaded Mibew files created database, but I have error while trying to access /install url.

Code: [Select]
Could not connect. Please check server settings in config.php. Error: Access denied for user 'webimuser'@'localhost' (using password: YES)
But I don't have any problem connecting the mysql server with credentials I have in config.php file:

Code: [Select]
[root@livechat mibew]# mysql -u webimuser -h localhost -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 43
Server version: 5.1.69 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| webim              |
+--------------------+
2 rows in set (0.00 sec)

here is my config.php

Code: [Select]
$mysqlhost = "localhost";
$mysqldb = "webim";
$mysqllogin = "webimuser";
$mysqlpass = "XXXXX";
$mysqlprefix = "";


I granted all privileges to that user:

grant all privileges on webim.* to 'webimuser'@'localhost' identified by 'xxxxx';

I don't know what else should I do. Maybe there is some problem with php-mysql driver ? 


fircx

  • Jr. Member
  • **
  • Posts: 3
Re: Need some help with database (mysql)
« Reply #1 on: September 10, 2013, 01:32:31 PM »
I create test php file to invoke connection and than echo if succeeded:

Code: [Select]
<?php
mysql_connect
("localhost""webimuser""xxxxxx") or die(mysql_error());
echo 
"Connected to MySQL<br />";
mysql_select_db("webim") or die(mysql_error());
echo 
"Connected to Database";
?>


and it works fine so there must be something with config.php file ?


Dmitriy Simushev

  • Moderator
  • Native
  • *****
  • Posts: 345
Re: Need some help with database (mysql)
« Reply #2 on: September 10, 2013, 02:31:16 PM »
Hi,

May be there is some low level cache in apache, so try to restart it.

ChrisS

  • Sr. Member
  • ****
  • Posts: 36
Re: Need some help with database (mysql)
« Reply #3 on: September 10, 2013, 06:36:32 PM »
Hi fircx,

1, What version of messenger have you uploaded to the server.
2, Is the server on your pc locally or live hosted.

Have a look @ this thread here http://mibew.org/forums/index.php?topic=169597.0


Sometimes we can't see the wood for the trees
Regards
« Last Edit: September 14, 2013, 07:50:29 PM by ChrisS »

fircx

  • Jr. Member
  • **
  • Posts: 3
Re: Need some help with database (mysql)
« Reply #4 on: September 11, 2013, 08:25:28 AM »
thanks guys for replay!
 
I finally got it working by removing everything, than I download archive again wrote my mysql credentials in config.php file and everything is working perfect now. I'm not quite sure what was the problem but anyways it is fixed.

Version I'm using is Mibew Messenger 1.6.5, 2013-07-24. 

ChrisS

  • Sr. Member
  • ****
  • Posts: 36
Re: Need some help with database (mysql)
« Reply #5 on: September 11, 2013, 09:26:01 AM »
Hi fircx,

Glad you got it sorted, would of been nice to of found out what the cause was as the mibew files has a checksum added to them to make sure they stay intact correctly for install.? However, working is a word I like  ;D

Regards