Author Topic: DB connection problems  (Read 2841 times)

thewaterman

  • Stalker
  • *
  • Posts: 2
  • Karma: +0/-0
  • Newbie :)
    • View Profile
DB connection problems
« on: 21-06-2013 05:54 »
I'm trying to setup ampjuke. I keep getting can not connect to DB. I've deleted DB and user's several times. I even when into the php file to check and looks like the info's there. Also deleted the setup.php and .sql file when trying to install again. I can get the log in screen with a little prodding to the db.php and config files. Not connect to DB... Is there a way to inport the ampjuke app into cpanel to install?

thewaterman

  • Stalker
  • *
  • Posts: 2
  • Karma: +0/-0
  • Newbie :)
    • View Profile
Re: DB connection problems
« Reply #1 on: 22-06-2013 01:31 »
Ok... I may not be the most informed but I've installed scripts before, but ampjuke is bucking me. Here's what I'm doing.

Upload into a dir in pulbic_html
Upload files into dir.
open browerser to the dir on my host. Window opens for install. Click continue and starts to install. Noe I'm at the config window. Where is shows;

it looks like you have not installed AmpJuke, yet. Permissions are all OK!
I click on OK. To install AmpJuke, click here.

I then reach: Ok !
Click here to proceed with the installation.
I then do so.

I then reach the - AmpJuke site configuration. I the Expand the first two sections by clicking on the small plus-sign ("+")

Database Options:
Database host:   localhost
Database user:   domain user name_DB name
Database user's password:   enter DB password
Database name:   domain user name_DB Name
Create an empty database:   Warning: If you select an existing database, everything within it will be deleted ! The box is checked.
Create empty tables within the database:    The box is checked.
Prefix tablenames: ampjuke_  (question. Do we need the prefix or can you blank it out ?)

Location of program files & your music

I'm entering the following:

"Base" folder where your music files are located: /home/domain user name/music
HTTP-Location of program files: http://www.domianname.com/ampjuke
Use this charset:   utf-8

Then I click save and continue

And I get the following error:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'domainusername_music'@'localhost' (using password: YES) in /home/daveswat/public_html/ampjuke/sitecfg.php on line 432
Create database: Could not connect.

I have mad sure of the correct information is being entered. I am able to get a loging screen with some mod's, but can connect msql data base. I even check the dp.php and it shows the correct information. I've been able to install on another domain and it works. I'm at a lose right now... If you can give me/use the files to mod directly to get ampjuke working it would help.

Michael

  • Administrator
  • Addicted to music
  • *
  • Posts: 26
  • Karma: +2/-0
    • View Profile
Re: DB connection problems
« Reply #2 on: 24-06-2013 15:26 »
Hi thewaterman,

Thanks for posting and welcome to the AmpJuke forum.
Sorry I wasn't able to respond before now, - been away for the entire weekend.

According to your 2nd post, it seems like you've done everything right and according to the installation guide.

I cannot for the love of God see what's wrong - apart from the fact, perhaps, that you can only have one database on the host you're trying to install on (yes - some hosters has a limit of *one* MySQL database per user/customer - unless, of course, you want to pay).

A quick&dirty solution might be to run the SQL-statements found in db_new.php one by one against your database using something like phpMyAdmin or similar tool.
You've obviously already found out a way to "adjust" the contents of db.php  ;)
...although all that should be taken care of during installation.

This is the best I can come up with right now.

Please post an update if anything is unlear (well...feel free to post an update no matter what).

//Michael.

kara

  • Stalker
  • *
  • Posts: 4
  • Karma: +0/-0
  • Newbie :)
    • View Profile
Re: DB connection problems
« Reply #3 on: 30-08-2013 12:02 »
Hello,

I had the same problem with another server.
MySQL complained about the 'user'@'localhost" after I had created the user 'user' and declared the 'localhost'.

I had to create the user at the local host :
CREATE USER 'user'@'localhost' IDENTIFIED BY 'some_pass';

Michael

  • Administrator
  • Addicted to music
  • *
  • Posts: 26
  • Karma: +2/-0
    • View Profile
Re: DB connection problems
« Reply #4 on: 30-08-2013 12:46 »
Hello kara,

Thanks for posting and welcome to the AmpJuke forum.

...and thanks for the follow-up in relation to this.

//Michael.