Database Setup

cmmconan2

Joined: 2010-03-10
Posts: 5
Posted: Wed, 2010-03-10 17:09

I have NO IDEA whatsoever as to how to set up a database. I tried phpMyAdmin and made a db but couldn't create any tables. I used mysql and created a user and pass asociated with the db but when I entered the information on the pre-installer setup, I get the following error.

Quote:
Warning: mysqli_real_connect() [function.mysqli-real-connect]: (28000/1045): Access denied for user 'tschnor'@'localhost' (using password: YES) in /home/spotcom1/public_html/wp2/wp2gallery2/gallery2/lib/adodb/drivers/adodb-mysqli.inc.php on line 109
Could't connect :
localhost: Access denied for user 'tschnor'@'localhost' (using password: YES)

Is there some sort of video tutorial on how to do this? I am so lost!

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Wed, 2010-03-10 17:19
Quote:
Access denied for user 'tschnor'@'localhost' (using password: YES)

Typically that means you got the username or password wrong, or the hostname on which the db runs is wrong.

Quote:
I tried phpMyAdmin and made a db but couldn't create any tables

You don't need to make any tables. G2 does it for you. It's reasonably straightforward with the commandline mysql command. There are examples in the installation instructions on this site.

 
cmmconan2

Joined: 2010-03-10
Posts: 5
Posted: Wed, 2010-03-10 17:29

Oh wow... when I created the database, I was allowed 7 characters for the username. I added my 8th char to the setup preinstaller and it worked...

Thanks!

EDIT: Nevermind. It only started over.. guess I took too long... I have read the readme file about 10 times and I still don't understand what to do.

 
cmmconan2

Joined: 2010-03-10
Posts: 5
Posted: Wed, 2010-03-10 17:42

I should also add that I am doing this through my cpanel. Is that why things aren't working out at all?

I went to:
cpanel > MSQL database wizard
.created a new database 'spotcom1_gallery2'
.created a user 'tschnor' with a password
.allowed ALL PRIVILEGES

Then it says that I am done... I return to the preinstaller setup and enter the database name I just created with the user and pass and it still says the aforementioned quote.

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Wed, 2010-03-10 17:46

Using cpanel should be fine. But the error message you quoted is still indicative of using the wrong password/username/hostname combination. There's not much else to do until you get those right.

 
cmmconan2

Joined: 2010-03-10
Posts: 5
Posted: Wed, 2010-03-10 17:49

Well I know that I have the user and pass right. So it's the hostname.. I have it saying 'localhost'. What would I need to change it to?

EDIT: I have tried 'gallery2' 'spotcom1_gallery2'

 
cmmconan2

Joined: 2010-03-10
Posts: 5
Posted: Wed, 2010-03-10 18:01

Also. Would I put 'gallery2' or 'spotcom1_gallery2' for the 'DB Name'?

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Wed, 2010-03-10 19:15

That depends on what mysql thinks your db name is. Sometimes hosting providers share mysql installations and prefix db names for their customers automatically. I've never run an ISP so I don't know the mechanism for doing that. If in doubt, check with your hosting provider.

Quote:
So it's the hostname.. I have it saying 'localhost'

That's correct if mysql is running on the same machine as your website. That isn't always the case for hosting providers, sometimes they run a shared mysql installation for their customers on a different host. Check with your hosting provider.