Looking for a reason or a point to the solution.. DB install

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
Galactic Zero
Forum Regular
Forum Regular
Posts: 471
Joined: Mon Dec 06, 2004 10:43 pm

Looking for a reason or a point to the solution.. DB install

Unread post by Galactic Zero »

Ok, I'm trying to setup a fresh clean install of osCommerce outside of the application vault and am having problems connecting to the database on install. Yes, I know I should use the app-vault install however it isn't patched for the server globals off in php. Yes, I know I can install via app vault and then copy over the files. This should work however and if it doesn't then potential clients that want to create and install a DB may have problems for their own applications.

Server specs:
Plesk 7.1.x CP
Latest release of PHP, MySQL etc.
RedHat 3ES.

Setup, uploaded and set file permissions per docs (osCommerce), created in the cp the database, and added a database user setting password.

Went to my /catalogdir/install and started the process, on step 2, enter in my domain, user id, password, and database, choose persistant connection and store session files in db. click next, get:

A test connection made to the database was NOT successful.
The error message returned is:
Host '66.98.140.139' is not allowed to connect to this MySQL server
Please click on the Back button below to review your database server settings.
If you require help with your database server settings, please consult your hosting company.

Here is my php:

[root@gz /]# rpm -qa |grep php
phpWiki-(none)-1.2-7108
php-mysql-(none)-4.3.10-3.rhel3.art
php-domxml-(none)-4.3.10-3.rhel3.art
php-pear-(none)-4.3.9-11.rhel3.art
phpAds-(none)-2.0-7101
phpsurveyor-(none)-0.98-7106
php-xmlrpc-(none)-4.3.10-3.rhel3.art
php-pgsql-(none)-4.3.10-3.rhel3.art
phpMyFamily-(none)-1.4.0-7101
phpBB-(none)-2.0.11-7101
phpDig-(none)-1.85-7101
php-mcrypt-(none)-4.3.10-3.rhel3.art
php-imap-(none)-4.3.10-3.rhel3.art
php-devel-(none)-4.3.10-3.rhel3.art
php-(none)-4.3.10-3.rhel3.art
phpMoney-(none)-1.3-7105
phpBugTracker-(none)-1.19-7101
phpBook-(none)-1.50-7102
php-snmp-(none)-4.3.10-3.rhel3.art
php-ldap-(none)-4.3.10-3.rhel3.art
php-mbstring-(none)-4.3.10-3.rhel3.art
[root@gz /]#

I've double and tripled checked the id/pw.. checked for case etc..
tested by loging into the shell, and using mysql -uxxxxx -pxxxxx logs me into the system, then type connect database name and get connected..

But not thru the web script...

Anyone have any ideas on how to fix this?
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net
Danny
Forum User
Forum User
Posts: 59
Joined: Mon Apr 11, 2005 3:48 am

Unread post by Danny »

You connect to mysql via socket an not via ip your port 3306 is closed.
You need edit the file that stored the parameters to the connection in the server and chenge your ip by localhost.

If you wont allow external connections plese uncomment the line in /etc/my.cnf

skip.networking
Galactic Zero
Forum Regular
Forum Regular
Posts: 471
Joined: Mon Dec 06, 2004 10:43 pm

Unread post by Galactic Zero »

Thanks, got it fixed..

where it asked for the server instead of using the domain name used localhost:3306 and it worked great!!

Thanks again.. out of 4 message boards, this one is the best.. at least get answers instead of crickets.
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net
Danny
Forum User
Forum User
Posts: 59
Joined: Mon Apr 11, 2005 3:48 am

Unread post by Danny »

Galactic Zero wrote:Thanks, got it fixed..

where it asked for the server instead of using the domain name used localhost:3306 and it worked great!!

Thanks again.. out of 4 message boards, this one is the best.. at least get answers instead of crickets.
In first place Excuse my broken english, you dont need add the port to the connection string.
An example of a php config

<?php
$mysql_host = "localhost";

$mysql_user = "user";

$mysql_pass = "password";

$mysql_base = "yourDB";

?>
Galactic Zero
Forum Regular
Forum Regular
Posts: 471
Joined: Mon Dec 06, 2004 10:43 pm

Unread post by Galactic Zero »

I didn't modify the existing install file of osCommerce, where it asked for the database server you'd think normally you'd input the domain of the site that you are installing to.

Well, what ever value I put there the script couldn't connect to the server due to the connection not being allowed. So, your suggestion of using localhost:3309 in place of the assumed database server worked like a charm.

The reason I didn't want to modify the script file is that those in the osCommerce community that run into this problem and don't have shell access to the server or don't have the php skills to edit the file directly would have a chance to install this if they received the same error.

If worse came to worse, then yes, I'd have edited the file and then did the install, or at the very least used the app vault install and then modified the files.

Your insight was appreciated, thank you.
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net
Post Reply