Jump to content

Recommended Posts

Posted

Okay, well, I'm trying to create a register using MySQL and PHP. But first I wanted to test out the MySQL connection first before I made the entire register system. Just in case something goes wrong. And something did.

 

I try to connect, but I just get an error saying:

Access denied for user 'gsrpg_memsdb'@'localhost'

 

I don't see what the problem is exactly. I know I got the username, password, and db name correct (not too certain on the location of the mysql server to connect to). I searched the forums and found that the server name to connect to is 'localhost', but if it's not then please say.

 

I've tried 'stevie' and 'stevie.heliohost.org' for the server names as well but they haven't worked.

 

If anyone could shine any light on my situation, I'd be grateful.

 

-Juan

Posted

First of all, localhost is correct.

 

Judging by the text of the error, it seems as though you did not add permissions to your MySQL user. Go to http://stevie.heliohost.org:2082/frontend/x3/sql/index.html

Once there, find the two dropdown boxes to "Add User To Database" (bottom). Select the user and database and click add. Select "All Privileges" and then press Make Changes. That should fix the problem.

Posted

I thought it was localhost.

 

I tried that already, but it didn't fix the problem. Sadly. I'm at ends with the solution. But thanks for clarifying the host.

Posted

You have to append your username to your database when asked of it. For example, if I had a databased called phpbb, it would actually be wizard_phpbb. The same applies to users.

 

 

You should also double check your php code with a php forum. They most likely know more than we do about php and will be able to help you debug it.

Posted

I know, the name of the db and username has to contain your username. I did that, and it's not going right with me.

 

And the code isn't very long: simply showing the text "Hallo" to see if the connection is okay. I made it like that before I created the entire register system just in case I had an incident in connecting. Coincidentally, I do. D:

Posted

Try making a new user and new database. Be sure to add the permissions. Set the host to localhost and directly copy and paste the username and database name to make sure it is correct. Use a new password. (The password does not contain the username of your account like the db name and username does). See if that connects.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...