yrstruly Posted June 5, 2013 Share Posted June 5, 2013 (edited) 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 June 5, 2013 by yrstruly Link to comment Share on other sites More sharing options...
justsomeguy Posted June 5, 2013 Share Posted June 5, 2013 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. Link to comment Share on other sites More sharing options...
yrstruly Posted June 6, 2013 Author Share Posted June 6, 2013 (edited) I am doing everyting like said, nothing works! Anybody who know how to do this pls help, password: musica for login etc. Edited June 6, 2013 by yrstruly Link to comment Share on other sites More sharing options...
justsomeguy Posted June 6, 2013 Share Posted June 6, 2013 When you go to the database portion of cPanel, what does it say is the host to use to connect? Link to comment Share on other sites More sharing options...
yrstruly Posted June 6, 2013 Author Share Posted June 6, 2013 yes... I gave u the login details can u pls try. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 6, 2013 Share Posted June 6, 2013 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". Link to comment Share on other sites More sharing options...
yrstruly Posted June 7, 2013 Author Share Posted June 7, 2013 (edited) 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 June 7, 2013 by yrstruly Link to comment Share on other sites More sharing options...
terryds Posted June 7, 2013 Share Posted June 7, 2013 (edited) 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 June 7, 2013 by terryds Link to comment Share on other sites More sharing options...
yrstruly Posted June 7, 2013 Author Share Posted June 7, 2013 I have included all of the codes and password in the previous posting. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 7, 2013 Share Posted June 7, 2013 Then that's the information you need to use to connect. mysql_connect('sql103.byethost12.com', 'b12_12422275', 'musica') Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now