Database Error: Can not connect to MySQL server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Albert
    New Member
    • Dec 2012
    • 2

    #1

    Database Error: Can not connect to MySQL server

    Hi I already had my wamp server running in green light, and I already opened the localhost using wamp server. the problem is that when I try to open my website folder via localhost this always shows up.

    "Database Error. Can not connect to MySQL server"

    I'm sorry for this question because I'm not really familiar with PHP and MySQL for PHP, the website file is already running in the internet, they just want me to edit something in the website so what I meant is that it's already a running website, I want to edit it via localhost.
    My question is does this error shows that I have a problem connecting to the database in wamp or database of my website? thank you in advance
    Last edited by Albert; Dec 8 '12, 07:14 AM. Reason: to be clear
  • Rangan
    New Member
    • Dec 2012
    • 8

    #2
    check whether the mysql server instance is started or not.

    start -> run -> services.msc -> click start on mysql

    Comment

    • Albert
      New Member
      • Dec 2012
      • 2

      #3
      Hi thank you for your reply, I tried to start the service and it said "windows could not start the mysql service on local computer error 2 the system cannot find the file " Do I need to install a MYSQL server? or running the MYSQL in wampserver is fine? sorry for the questions

      Comment

      • Rangan
        New Member
        • Dec 2012
        • 8

        #4
        It looks like you have 2 other versions of MySQL running on your system

        Have you tried another wamp alike, like XAMPP or even installing it yourself??

        If so you have not properly uninstalled them and one of them has already grabbed the port mysql uses.

        Wamps install of mysql is called wampmysql, so here is how to remove the other 2 versions from your system

        Either uninstall the other versions properly if the software they came from is still on your system, or if you have just deleted the folders that the other software came in ( or dont know how the other mysql's got there )

        Launch a command window using your admin account or us 'Run as Administrator'

        keyin

        sc delete MYSQL
        sc delete MYSQL5

        Comment

        Working...