G2 install problem - Database setup

JRSFORUMS

Joined: 2004-12-15
Posts: 104
Posted: Sat, 2004-12-25 21:18

I am getting the following error from database set up:

Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10061) in C:\Program Files\Apache Group\Apache2\htdocs\Gallery2\lib\adodb\drivers\adodb-mysql.inc.php on line 339
localhost: Can't connect to MySQL server on 'localhost' (10061)

This apears similar to the post in: http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=21918&highlight=connect+mysql+server except his was a Linux environment.

I created a database "gallery2" and gave 'grant all' to "jrs@localhost" (and also to "jrs" just in case) with pw "xxxyyy"

For the database install, I entered

Database type: MySQL (all versions)
DB Hostname: local host
DB Username: jrs
DB Password: xxxyyy
DB Name: gallery2
Table Prefix: g2 (not sure what these prefix are, but they came
Column Prefix: g up with the install screen)

In case it is important, the database is named gallery2 is at: C:\Program Files\MySQL\MySQL Server 4.1\data\gallery2 Also, you will note that MYSQL is not under the .../Apace2/htdoc3/ dir....is that OK?

I am sure there is some simple step that I need to understand to get by this. Appreciate any help you guys can end.

Thanks...JOHN

----

Gallery2 ver...latest from CSV 12-25-04
Apache version: 2.0.52-win32-x86-no_ss
MYSQL 4.1.8 (Windows Essentials)
PHP version: 4.3.9-Win32
Graphics Toolkit: 6.1.6-Q16-windows-dll
Operating system: WIN XP SP2
Web browser/version (if applicable): IE6

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2004-12-26 17:50

probably won't help, but:
1) localhost not local host
2) make sure mysql is running

 
JRSFORUMS

Joined: 2004-12-15
Posts: 104
Posted: Sun, 2004-12-26 18:29

yes, it is actually "localhost.

MYSQL is "started"

I can run MYSQLADMIN. I get:
MYSQL server Instance
username: jrs
hostname: localhost
port: 3306
Server info
MYSQL Version: MySQL 4.1.8nt via TCP/IP
Network Name: Localhost
IP: 127.0.0.1

I cannot get PHPMYADMIN to work...cannot signon.

Gallery2 Install still fails with same message as above.

I suspect some key thing I am missing or some info needed for certain files.

Would appreciate assistance.....

 
alinhnguyen

Joined: 2004-12-30
Posts: 2
Posted: Thu, 2004-12-30 23:34

I have the same problem: Cannot connect to localhost. I replaced the localhost my the exact IP address of mysql server, but it still did not work.
Appreciate your help,
Linh

 
killerstrom

Joined: 2004-12-27
Posts: 20
Posted: Fri, 2004-12-31 13:16

Try to set the G2 user in MySQL without any password and connect after that in the setup. I had several problems before I tried that part. Lucky me my G2 is on a intranet.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-01-01 22:38

Hm. From reading the PHP documentation on MySQL, if you're using MySQL with sockets instead of ports (for added security) then you probably need to put the path to the socket in the place where we ask for the port. I haven't tested this configuration though so your mileage may vary...

(see http://us3.php.net/manual/en/function.mysql-connect.php for more details)

 
joshismycopilot

Joined: 2009-07-14
Posts: 31
Posted: Tue, 2009-07-14 19:49

Ok, I'm having a problem with this too. I got to the Database step. I went to mydomain.phpmyadmin and created a database gallery2. I checked privileged, and it says username : Josh, type : wildcard, privileges : all privileges, grant : yes. So,,, I'm confused about where I find the exact information that gallery2 is looking for here. What is the hostname??? Username??? Etc.... I just can't figure this out...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2009-07-14 20:40

Ask you host to create a DB for you and they will send you the info that G2 needs.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team