Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8728793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:42:58+00:00 2026-06-13T08:42:58+00:00

I apologize in advance if this is a really dumb question (i’m a newb

  • 0

I apologize in advance if this is a really dumb question (i’m a newb at php & mysql.

Basically, I am at the step of setting up the connect_to_mysql.php file,
as shown here at (5:50):
http://www.youtube.com/watch?v=YaII5QhNCH0

and as shown here:
http://www.developphp.com/view_lesson.php?v=248

I’m using MAMP. the ports are 80 / 3306
However I know that at the MAMP start page it says, the following, which also, does not work.:

MySQL

The MySQL Database can be administrated with phpMyAdmin.

To connect to the MySQL Server from your own scripts use the following connection parameters:

Host: localhost
Port: 3306
User: root
Password: root

Here is what I have:

this is connect_to_mysql.php:

        <?php  
    // Created BY Adam Khoury @ www.flashbuilding.com - 6/19/2008  
/*  
1: "die()" will exit the script and show an error statement if something goes wrong with     the     "connect" or "select" functions. 
2: A "mysql_connect()" error usually means your username/password are wrong  
3: A "mysql_select_db()" error usually means the database does not exist. 
*/ 
// Place db host name. Sometimes "localhost" but  
// sometimes looks like this: >>      ???mysql??.someserver.net 
$db_host = "localhost"; 
// Place the username for the MySQL database here 
$db_username = "builder2";  
// Place the password for the MySQL database here 
$db_pass = "builder2";  
// Place the name for the MySQL database here 
$db_name = "suitstore"; 

// Run the actual connection here  
mysql_connect("$localhost","$builder2","$builder2") or die ("could not connect to     mysql");
mysql_select_db("$suitstore") or die ("no database");              
?>

and this is test.php:

    <?php   
    // Connect to the file above here   
require "connect_to_mysql.php";  

echo "<h1>Success in database connection! Happy Coding!</h1>";   
// if no success the script would have died before this success message 
?>

So, when I load the test site on Chrome, it says:
Server error
The website encountered an error while retrieving . It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

So, this is probably part of the problem: In DW, when I open test.php it tells me that “this site may have dynamically related files that can only be discovered by the server [ Discover ] [ Preferences ]”

Then, if I click discover, it says:
“Dynamically related files could not be resolved because of an internal server error. [ Retry ]”

Thanks, and sorry if this is a dumb question. I truly don’t know jack about php / mysql.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:42:59+00:00Added an answer on June 13, 2026 at 8:42 am

    I think they should be.

    mysql_connect($db_host,$db_username,$db_pass) or die ("could not connect to mysql");
    mysql_select_db($db_name) or die ("no database");   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I apologize in advance if this question is too broad or too it-depends. Basically,
I apologize in advance if this is really a Super User question... I just
I apologize in advance if this question seems confused. The behaviour I am seeing
I apologize in advance, if this question doesn't make sense. I'm a newbie. I
I apologize in advance for not knowing how to better state this question. In
I apologize in advance; this is a long question. I've tried to simplify as
This is a very noobish question, so I apologize in advance! I have two
This question is probably borderline for stack overflow, so I apologize in advance if
This feels like a super newb question, so apologizes in advance. How does one
In advance, I apologize for the open endedness, and general wishy-washiness of this question,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.