Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to configure a new database

Status
Not open for further replies.

pmonett

Programmer
Sep 5, 2002
2,632
FR
Beginner issue here : I have created a new database on the webserver, but I cannot seem to be able to access it.

When I try, I get an connection error message saying I am not authorized, yet I am using the admin access configured in D:\Program Files\xampp\apache\conf\httpd.conf

What am I missing ? Where do I go to fix this ?

The admin is on extended leave, no docs, and the order to get things working asap. Business as usual.

Thanks for any tips.

Pascal.



I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
What did you use to create the database?

What are you using to connect to the database?

If you have access to a GUI such as MYSQL's own MYSQL Administrator, you can use that to define user permissions for the new DB. Once a user has been granted access to the DB, then you can use that to access it form say a web page or, or an application.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Database creation was via PHPMyAdmin and import of db structure template.
That worked.

To connect, I'm just using the browser. There is a web app using the MySQL database. I have reconfigured this web app to connect to the new database, which it is doing.

But, despite my giving it the admin login and password, apparently MySQL doesn't want to hear of it.

Pascal.

I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
I have reconfigured this web app to connect to the new database, which it is doing.

But, despite my giving it the admin login and password, apparently MySQL doesn't want to hear of it.

So which one is it? Is it connecting or not?

If its not, do you get any errors?
If no errors, then what is happening to make you think MYSQL is not working with it?

Try using PHPMyAdmin to grant your admin password access to the DB s well. Just because you created it, doesn't mean it can automatically perform queries on it.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
What I am trying to say is that I have configured everything I know to configure. The PHP code is trying to connect to the right database, which exists, but I get an authorization error when the code runs, and I don't know where to go to fix that.

Pascal.

I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
What error? Post it here.

Assuming its not a password problem, I would assume the user simply can't connect to the new DB from that location.

Go to the Privileges tab in PHPMyAdmin after selecting the DB in question.

Then Look at the list of users. Your user should have Privileges granted to it to use the DB. If not, you can click on the little pencil icon to change them. Also make sure the Host matches the location from where you are connecting to it through PHP, that is the server where PHP is running. If its the same as the mysql sever then it should read localhost or set to "%" so it can connect from anywhere.





----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Well, I admit that I find this a but unexpected, but after rebooting the server (not just shutting down MySQL and restarting it), well the connection works now.

So the issue was a reboot.

Is that logical ?

Don't know, but at least it works and I'll be happy with that.

Thak you for your time.

Pascal.

I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top