Can't connect to mysql database

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Can't connect to mysql database

Postby mickeymouse » 06. April 2016 22:39

It always worked. Now it doesn't.
Mind you, I had a computer crash and had to restart to factory delivery level and restore my personal files.
Perhaps I've missed something.

I get
Fatal error: Call to undefined function mysql_connect()

mycode is:
$link = mysql_connect('localhost', $UserID, $password);
mickeymouse
 
Posts: 42
Joined: 08. March 2009 06:10
Location: France & Canada
Operating System: Win 7 Family Prem Ed (64 bit?)

Re: Can't connect to mysql database

Postby Altrea » 07. April 2016 00:37

We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8286
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Can't connect to mysql database

Postby mickeymouse » 13. April 2016 01:02

Thank you Altrea
I removed the ;; saved the file and restarted Xampp butnow I get this message:
Can't use HomeAccounting:Access denied for user ''@'localhost' to database 'homeaccounting'
mickeymouse
 
Posts: 42
Joined: 08. March 2009 06:10
Location: France & Canada
Operating System: Win 7 Family Prem Ed (64 bit?)

Re: Can't connect to mysql database

Postby Altrea » 13. April 2016 05:23

You got logged in by an anonymous user.
Did you define your own database user you want to use?
If yes, which host is the user allowed to login from?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8286
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 48 guests