adnet Posted October 15, 2002 Posted October 15, 2002 I am not able to connect to MySQL database using the admin. I am able to connect using the catalog. The problem appears to be with the hostname or syntax I should be using for the admin section. Please verify what naming conventions I should be using for the database connection. My hosting company has already verified the HOSTNAME for the MySQL db. ie: admin - application_top.php // define our database connection define('DB_SERVER', $HTTP_ENV_VARS['mysql.exotic-creations-by-dewdrop.com']); define('DB_SERVER_USERNAME', 'exoti001'); define('DB_SERVER_PASSWORD', 'donna215'); define('DB_DATABASE', 'exoti001'); define('USE_PCONNECT', 1); http://exotic-creations-by-dewdrop.com/adm...min/default.php error: Unable to connect to database server! I am using OS v 2.1 I did make the modifications to the application_top.php file(s) but did not change the database.php because I did not see anthying to change. The only modifications I made were for the database settings: No coding changes were made. I am using a UNIX FREE BSD server :oops: Please help me asap ....I need to get this problem fixed asap
Guest Posted October 15, 2002 Posted October 15, 2002 What does your catalog/includes/configure.php look like for the DB_SERVER? You should have pretty much the same thing on the admin side. Also, shouldn't you be able to connect to your DB through the MySQL.exe client? That would be another way to test your parameters. Good luck!
adnet Posted October 15, 2002 Author Posted October 15, 2002 The DB_SERVER is - 'mysql.exotic-creations-by-dewdrop.com' This is the correct HOSTNAME for the MySQL db. I also connect using MySQLadmin with no problem. The username, password and database name is also correct. // define our database connection define('DB_SERVER', 'mysql.exotic-creations-by-dewdrop.com'); define('DB_SERVER_USERNAME', 'exoti001'); define('DB_SERVER_PASSWORD', 'donna215'); define('DB_DATABASE', 'exoti001'); define('USE_PCONN
Guest Posted October 15, 2002 Posted October 15, 2002 define('DB_SERVER', $HTTP_ENV_VARS['mysql.exotic-creations-by-dewdrop.com']); I think your problem is with the $HTTP_ENV_VARS[]. Take that away, and you should be OK.
adnet Posted October 15, 2002 Author Posted October 15, 2002 Thank You This resolved my problem. What version of OS Commerce should I now use? I am going to re-download the latest version.
Guest Posted October 15, 2002 Posted October 15, 2002 Use 2.2's latest snapshot. And actually instead of this... define('DB_SERVER', 'mysql.exotic-creations-by-dewdrop.com'); Try this when yuo go to set it up again... define('DB_SERVER', 'localhost'); That's worked for me on every MySQL dB that I've used on several different boxes with different setups.
Guest Posted October 15, 2002 Posted October 15, 2002 define('DB_SERVER', 'localhost'); That's worked for me on every MySQL dB that I've used on several different boxes with different setups. That will only work when the DB server is actually on the same box. Granted that's the setup for most sites.
adnet Posted October 15, 2002 Author Posted October 15, 2002 After making these changes the admin layout is not displaying the data properly after changes http://exotic-creations-by-dewdrop.com/adm...min/default.php before changes http://198.104.182.200/admin/default.php 'localhost' also did not work again the only change that was made was the db settings, no other coding changes has been made. these examples are using 2 different servers. The only changes were made to the application_top.php ( files ) Please send me your advice... :oops:
Guest Posted October 15, 2002 Posted October 15, 2002 Looks fine to me. The only problem isn't the DB connection but the various titles...
adnet Posted October 15, 2002 Author Posted October 15, 2002 Take a good look at: http://exotic-creations-by-dewdrop.com/adm...min/default.php The page layout immediately changed after making changes to the local host..... I am able to connect the db but why did the layout change?
Guest Posted October 15, 2002 Posted October 15, 2002 Did you make those changes with a WYSIWYG editor like Dreamweaver or Frontpage? IF so, most likely that is the problem because HTML editors make slight changes in coding that will affect this. Everytime I've seen something like this, that was the problem. Edit your code using a straight HTML editor like cuteHTML.
adnet Posted October 15, 2002 Author Posted October 15, 2002 I made the changes using Notepad. where can I get the editor you mentioned? also localhost did not work. I am using a UNIX FREE BSD box.
Guest Posted October 15, 2002 Posted October 15, 2002 http://cutehtml.com/download/cutehtml.asp To be honest, if the options you've tried don't connect to your mySQL dB, I don't know what else to offer you as far as options except delete that line since it seemed to work earlier.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.