Jump to content
Sign in to follow this  
yrstruly

SQL Connections to online host

Recommended Posts

Can somebody pls help me connect to my online host pls? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Connect to MySQL</title></head><body><?php // Script 12.1 - mysql_connect.php/* This script connects to the MySQL server. */ // Attempt to connect to MySQL and print out messages:if ($dbc = mysql_connect('http://yrstruly3.0fees.net ', '', '')) { print '<p>Successfully connected to MySQL!</p>'; mysql_close($dbc); // Close the connection. } else { print '<p style="color: red;">Could not connect to MySQL.</p>'; } ?></body></html> Details of host: I can give u the password!Cpanel Username: fees0_13306514 Cpanel Password: Your URL: http://yrstruly3.0fees.net or http://www.yrstruly3.0fees.net FTP Server : ftp.0fees.net FTP Login : fees0_13306514 FTP Password : MySQL Database Name: MUST CREATE IN CPANEL MySQL Username : fees0_13306514 MySQL Password : MySQL Server: SEE THE CPANEL

Edited by yrstruly

Share this post


Link to post
Share on other sites

Since it tells you to see cPanel, I assume you've created a database in cPanel and gotten the server name from there, correct? You also need to use your MySQL username and password when you're connecting, you're not using either.

Share this post


Link to post
Share on other sites

I am doing everyting like said, nothing works! Anybody who know how to do this pls help, password: musica for login etc.

Edited by yrstruly

Share this post


Link to post
Share on other sites

When you go to the database portion of cPanel, what does it say is the host to use to connect?

Share this post


Link to post
Share on other sites

No, I can't. I don't know what the host is. I asked you this:

When you go to the database portion of cPanel, what does it say is the host to use to connect?
and you answered "yes".

Share this post


Link to post
Share on other sites

This is what i get when i go the cpanel and select databases or phpmyadmin Current Databases MySQL DB Name b12_12422275_20423 MySQL User Name b12_12422275 MySQL Host Name sql103.byethost12.comMySQL Password musica

Edited by yrstruly

Share this post


Link to post
Share on other sites

Have you created the database ? What's the database name, username, and password? And, please code your html/php code here using BBtag [*code][/code] // Remove the * Like this

These are my codes

Edited by terryds

Share this post


Link to post
Share on other sites

Then that's the information you need to use to connect. mysql_connect('sql103.byethost12.com', 'b12_12422275', 'musica')

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...