Jump to content

Recommended Posts

Hi,

Thanks for stoping by and reading.

I am quite new to php and mysql.

I generated a small app with php and mysql that works locally (I use xampp).

I have an account and a webpage hosted in 1freehosting.com

I wanted to share the app online so I took all my php & html files and copied them to my hosting space in 1freehosting.

I also created a new database and user in 1freehosting that contained all the required fields.

Now the php scripts seem to work fine, but I cannot manage to access the databases from my php script.

In principle the user and password must be correct (since I can access phpmyadmin with it, and select from my database, and create fields and so on). However I get the error

Access denied for user 'u211641509_root'@'srv14.main-hosting.com' (using password: YES)

 

You can check the page in http://www.anaisabel.tk/spread-the-petition/ if you want.

 

Any help will be appreciated. I feel I am missing something obvious, but I cannot sort it.

Thank you!

Ana

 

Link to comment
https://forums.phpfreaks.com/topic/297799-accessing-my-databases-in-my-server/
Share on other sites

It seems like you simply have the wrong username and/or password. Is there a place where you configure user accounts? Does it say that actual username? Sure you have the right password?

 

You are connecting to the database from code running on hosted site, right? Not locally?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.