Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

I can't get my website to connect to mysql database hosted on my yahoo site

Guest
Sep 02, 2012 Sep 02, 2012

Copy link to clipboard

Copied

I used David Powers tutorials to build a CMS website in Dreamweaver using a testing site set up on my computer. I installed XAMPP and got it working on my computer. (I have a Windows 7 PC with Dreamweaver CS6)

Now I have installed the mysql database on my remote site following the instructions in the help section of Yahoo Small Business, where my website is hosted. I recreated the same database on the myPHPAdmin on my remote site. (If I understood what I found out when searching for a solution, Yahoo doesn't allow me to see the database from Dreamweaver. It seems that I have to make sure the connections are correct and then upload my site to the remote server. Then it should work once up)

Following the instructions I could find on Yahoo it seems that all I needed to do was make sure that the user name and password were the same as on my local computer and change the my Sql Server in the Server Connection in Dreamweaver CS6 to mysql instead of localhost, upload my website and it should connect. When I go to my webpage online I get "No database selected".

I know html, css, some php, and mysql.

I have been using Dreamweaver for approximatley 2 years and have created 2 successful websites for my husband, who is a photographer. He now wants to have a blog type news website and since I couldn't get Wordpress to do what he wanted to do I decided to create a CMS website. It works great on my computer, but now I need it to work on my remote site.

I know it's probably something really stupid that I have overlooked and I would really appreciate any help I could get.

I'm more than happy to learn whatever I need to learn to get this done. I have been searching all kinds of forums and I can find a lot of posts about this or a similar problem, but no solutions.

Please let me know if I need to provide more information.

TOPICS
Server side applications

Views

3.5K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 02, 2012 Sep 02, 2012

Copy link to clipboard

Copied

Following the instructions I could find on Yahoo it seems that all I needed to do was make sure that the user name and password were the same as on my local computer and change the my Sql Server in the Server Connection in Dreamweaver CS6 to mysql instead of localhost, upload my website and it should connect. When I go to my webpage online I get "No database selected".

Just looking at that part of your response, I don't get what they are asking you.  Typically the remote host will require that you update the username/password and possibly SQL server.  When you are in most shared environments, which is what I presume you are in, you typically have a username that is prefix_username.  So you should be updating your script to match that information, not the other way around.  Also with the "mysql instead of localhost" comment, you would only change the script from localhost to another server (ip address) if the mySQL server is not on your web server.  If you host tells you this is true thent he value should be an IP address instead of localhost.  Is that the case?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 02, 2012 Sep 02, 2012

Copy link to clipboard

Copied

I'm sorry, the way I wrote that was confusing. In mysql it suggested you create a new user that had limited access to access each database you created, rather than use the root user which had all permissions. So in both the mysql on my computer and the mysql on my website I created a user with the same username and password, so that when my website was on my remote server the username and password were the same as when I was testing it on my local computer.

SnakEyez02 wrote:

Following the instructions I could find on Yahoo it seems that all I needed to do was make sure that the user name and password were the same as on my local computer and change the my Sql Server in the Server Connection in Dreamweaver CS6 to mysql instead of localhost, upload my website and it should connect. When I go to my webpage online I get "No database selected".

Just looking at that part of your response, I don't get what they are asking you.  Typically the remote host will require that you update the username/password and possibly SQL server.  When you are in most shared environments, which is what I presume you are in, you typically have a username that is prefix_username.  So you should be updating your script to match that information, not the other way around.  Also with the "mysql instead of localhost" comment, you would only change the script from localhost to another server (ip address) if the mySQL server is not on your web server.  If you host tells you this is true thent he value should be an IP address instead of localhost.  Is that the case?

For the second part of your question in the "Why can't I access my database" help on Yahoo it says "If your PHP or Perl configuration files require a host name, you may have a problem with your host name. Make sure that you are using the host name mysql, not the default host name localhost." I assumed that meant that in the setup menu when establishing a server connection I needed to replace "localhost" as the mysql Server with "mysql" and then upload my website. This didn't work. Since the mysql server I am trying to access can be accessed using phpmyadmin at www.mywebsite.com/phpmyadmin this seemed to make sense to me. I think I might have managed to access the mysql server, but I'm not choosing the database I want correctly.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 02, 2012 Sep 02, 2012

Copy link to clipboard

Copied

Ok, just found the Yahoo documentation.  You are correct about the mySQL name.  If the database is not selected, then you may need to troubleshoot and see if the script to call the DB is up there and then check the database name in your script to make sure it matches what is on the remote host.  It is possible, as I stated before that prefixes could be added to your database names so they can host as many unique databases as possible.  Outside of that this is one of those issues that is hard to troubleshoot because it requires examination of your code, but also sensitive information such as passwords.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 02, 2012 Sep 02, 2012

Copy link to clipboard

Copied

LATEST

I was trying to show my husband the new error message (before I was getting a "this page does not exist", then I was getting an error "You have not selected a database") and it worked! So for some reason it must have taken a little while

Thank you for your help!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines