MySQL errors

Discussion in 'Web Design and Development' started by 76ShovelHead, Apr 21, 2012.

  1. 76ShovelHead macrumors 6502a

    76ShovelHead

    Joined:
    May 30, 2010
    Location:
    Florida
    #1
    I switched my databases from PHPMYADMIN to MySQL and MySQL Workbench because I didn't like how PHPMYADMIN was accessed in a browser. I'm using XAMPP for hosting my sites, and when I try to login to one of my sites i get an error because my sites are still trying to access the old mysql in xampp. I have the databases all up and loaded but no attempt to try to connect to the new mysql. Its the exact same database with a different application handling it.

    I believe this means I need to seek out another program to host my pages since its trying to access its own mysql server and not mine. Are there any that just host html and PHP? I'm sick of how they all try to bundle everything in there.
     
  2. Darth.Titan macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    Location:
    Austin, TX
    #2
    Your post makes no sense to me. You stopped using PHPMyAdmin in favor of MySQL Workbench. I'm with you there. However then you start talking about your sites trying to access the "old" MySQL. That's where you lost me.

    PHPMyAdmin is a web front end written in PHP that enables you to administrate your MySQL server. MySQL Workbench basically does the same thing, but it's a compiled executable that connects remotely to your MySQL server. The point is, they should both be accessing the same MySQL server.

    It's kind of like if you said, "I decided to switch from Safari to Firefox, but Firefox keeps trying to access the old internet that I used when I was using Safari." It doesn't make sense.
     
  3. masterbeta2 macrumors newbie

    Joined:
    Apr 21, 2012
    #3
    +1

    xampp yuck

    but anyway, it sounds as if (from lack of any good information to your problem) whatever you are trying to access your db with, perhaps you didn't edit your (i'm assuming) new config file to connect to your db - any actual errors would help
     
  4. LaWally macrumors 6502a

    Joined:
    Feb 24, 2012
    #4
    Well you could always compile and configure all the individual components from scratch. IIRC, the XAMPP universal binary bundle consists of only 30 separate software components and libraries.
     
  5. 76ShovelHead, Apr 22, 2012
    Last edited: Apr 22, 2012

    76ShovelHead thread starter macrumors 6502a

    76ShovelHead

    Joined:
    May 30, 2010
    Location:
    Florida
    #5
    Sorry about that I probably wrote this after not sleeping for 16+ hours lol.

    I have XAMPP installed running MySQL and Apache. I exported my databases from PHPMyAdmin and turned of MySQL from the XAMPP Control. Then I installed MySQL Server and then MySQL Workbench. Now I have a new MySQL Server instance running. So then I imported my old database through MySQL Workbench. It worked fine. Then when I tried logging into my site I got PHP errors on the lines 74 and 75 of my class.login.php file that contained:

    mysql_connect("localhost" "root" "");
    mysql_select_db(billing)or die"";

    It also specified that it was looking for this database in my USERS/KENLAVALLEE/APPLICATIONS/XAMPP or something similar.

    That's when I drew the assumption that it was still trying to connect to the old database that was hosted by XAMPP instead of the new instance hosted by MySQL Server.
     
  6. Darth.Titan macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    Location:
    Austin, TX
    #6
    Well of course it is. As far as XAMPP is concerned, your local MySQL server doesn't exist. XAMPP is very much like a virtual machine, in that it is self contained. You need to copy the rest of your project's code out of XAMPP and just run it locally from your Mac's Apache server. Then it will be able to connect to your local MySQL server.

    Take XAMPP out of the equation entirely.
     
  7. 76ShovelHead thread starter macrumors 6502a

    76ShovelHead

    Joined:
    May 30, 2010
    Location:
    Florida
    #7
    This is EXACTLY what I was looking for. Not because I wanted to hear it, but I thought the same and wanted to validate my assumption. Of course, there is another problem. The whole reason I'm running XAMPP is because OS X Lion's built in Apache won't start. Furthermore, I've read this is a common issue and I tried the common fix but it didn't work for my machine so I guess it's back to google. Right now I'm still using this terrible XAMPP, but I'm not in any rush to get my domain name yet.
     

Share This Page