Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Error connecting to mysql on localhost

Posted on 2016-10-06
3
Medium Priority
?
79 Views
Last Modified: 2016-10-06
Hello;

I have a connection to mysql via php code as below,and it was ok for years but today i get error connecting to database,what is the problem?

<?php
$connmag = mysql_pconnect($dbhostmag, $dbusermag, $dbpassmag) or die ('Error connecting to database,please refresh your page.');  
mysql_select_db($dbnamemag);                 
?>

Open in new window


I use win7+iis7.

thanks
0
Comment
Question by:MOSTAGHASSI
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
Ryan Chong earned 2000 total points
ID: 41832079
make sure the MySQL service is running in your machine?
make sure the username and password provided are correct?
0
 

Author Comment

by:MOSTAGHASSI
ID: 41832095
mysql is not running it has error 2003.
0
 

Author Closing Comment

by:MOSTAGHASSI
ID: 41832122
I started mysql and it is ok, thanks.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question