web hosting

- English -

Resident Freddy
Joined
Apr 7, 2004
Messages
5,263
Can't find an up-to-date thread. I have my domain and need a web host which will mainly need to run PHP and mysql, possibly some javascript aswell.

I got scammed from streamline got next a year ago so dont want anything to do with them again.

Any ideas?, wont need alot of bandwidth / space, its only a small project, so cheap as possible is nice. Thanks.
 

- English -

Resident Freddy
Joined
Apr 7, 2004
Messages
5,263
Thanks dysfunction.

I went with it and got a host etc.. now comes the trouble ;s

Just going off topic for people who may be able to help.

My site is working on the local host, tho when i transfer the documents via ftp to the host i am getting ;

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/jamesaro/public_html/includes/database.php on line 21
Database connection failed: Access denied for user 'root'@'localhost' (using password: YES)

I have used cpanel to create a db and have copied all the info over from the local host. I have also changed the ip, db name etc and im 90% sure i have done it correct as ive been playing for some hours and tried all combinations.

My DB constants for connecting are ;

<?php

// Database Constants
// If not defined, define as ;

defined("DB_SERVER") ? null : define("DB_SERVER", "localhost"); (also tried using the IP given for the server)
defined("DB_USER") ? null : define("DB_USER", "root"); (tried using the user given for the ftp)
defined("DB_PASS") ? null : define("DB_PASS", "xxxxx"); (pass is pw for mysql to connent)
defined("DB_NAME") ? null : define("DB_NAME", "website"); (db name is just called website atm)

?>

Am i missing something off in getting it working?
should mention ive tried a simple connect script to see if i can connect to a database via the server and its not working, though did via the local host.
Also had a simple html page runnnig online, so i know thats working.

Its my first time in putting a database live as ive only ever done it on local machines, so im not too sure if ive done it correctly.

Any help appreciated,

Thanks :D
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,804
you may want to make that root@<whatever your host is named>?

dunno if that'll help though :/
 

Ovron

One of Freddy's beloved
Joined
Nov 4, 2004
Messages
471
You most likely will not be able to auth against the mysql server as "root" unless you are on a VPS/dedicated server [and even if you were, it still isn't a good idea].

Set up a mysql user in the CPanel, and then use that in your PHP scripts.

As to your comment, the server host will probably be "localhost" unless you have been informed otherwise.

If you do not manage to solve this yourself, contact your host as they might have a special setup for how to auth etc.

Regards,
Ovron
 

- English -

Resident Freddy
Joined
Apr 7, 2004
Messages
5,263
You most likely will not be able to auth against the mysql server as "root" unless you are on a VPS/dedicated server [and even if you were, it still isn't a good idea].

Set up a mysql user in the CPanel, and then use that in your PHP scripts.

As to your comment, the server host will probably be "localhost" unless you have been informed otherwise.

If you do not manage to solve this yourself, contact your host as they might have a special setup for how to auth etc.

Regards,
Ovron

Thanks, that worked!

next problem is that it wont let me log in to my own account haha .. ive checked the database, even made a new user but wont log me in!
 

- English -

Resident Freddy
Joined
Apr 7, 2004
Messages
5,263
drives me crazy this stuff, dont know what i did, but it just started working ..
:england:
 

MYstIC G

Official Licensed Lump of Coal™ Distributor
Staff member
Moderator
FH Subscriber
Joined
Dec 22, 2003
Messages
12,379
with cPanel you have to assign a mysql user access rights to the database
 

Users who are viewing this thread

Top Bottom