can't connect to mysql database

mysql , php United States
  • 18 years ago

    I want to connect to the database planetsim.
    and show table links
    but im getting these errors
    Warning: MySQL Connection Failed: Access denied for user: 'username@localhost' (Using password: YES) in C:\apache\htdocs\planetsim\links.php on line 6


    Warning: MySQL Connection Failed: Access denied for user: 'ODBC@localhost' (Using password: NO) in C:\apache\htdocs\planetsim\links.php on line 7


    Warning: MySQL: A link to the server could not be established in C:\apache\htdocs\planetsim\links.php on line 7

  • 18 years ago

    you are using the wrong username and password to connect and on the last error, thats because it couldnt connect because of this.

  • 18 years ago

    ok then i worked it out.
    I want to display a table called links with these fields
    id, sitename, siteaddress
    theres only 2 rows at the moment
    I want to have the siteaddress as the url and the sitename where ud put the name of a page or site
    eg.
    <a href="siteaddress">sitename</a>
    how can i do this
    also who can help me can they show me from the begginning like from connect to database

  • 18 years ago

    you could take a look at http://www.php.net/manual/en/ref.mysql.php ... that should show you how to do pretty much everything

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” - Martin Fowler