could not select database

Hi guys I’m trying to write some code for a login, I’ve got it all but whenever I try login it says Could not select database. I can’t figure it out, I’ve got hosting with One.com and when I go into the PHP & MySQL settings it says the database name is «c343_co_uk», which is what I’ve used in the code below:

UPDATE: It’s detecting the database but whenever I try and log in with the exact same username and password that’s on MySQL it says invalid login

When I try to install the forum mybb 1.2.12 I always get the same error messaeg : There seems to be one or more errors with the database configuration information that you supplied:

Could not select the database ‘forum’. Are you sure it exists and the specified username and password have access to it?
Once the above are corrected, continue with the installation.

Someone can help me solve this problem?
thank you in advance

If you are on CPanel 99% of the time the database name is preceded by your cpanel username, so if your CPanel username is picos, then the database would be picos_forum instead of just forum.

It should be the same way for the database user as well.

Hi guys i’m new to PHP, I have been doing a simple login system using php, and now I’m face with this error «Could not select database because Access denied for user »@’localhost’ to database ‘loginsystem’»

anyone knows how to fix this?

    4 Contributors
  • forum14 Replies 682 Views 6 Days Discussion Span
  • commentLatest Post 8 Years Ago by bettybarnes

to find out a little info about what is happening, change these bits of code:

If you still get this error, run this SQL query in PHPMyAdmin, The MySQL Command Line tool, or any other thing that can run MySQL Commands:

It usually means you have provided invalid username and password into mysql_connect(). This may be because the user does not exist or the mysql server is currently down but when in doubt copy and paste the login details you last used for another site of yours on the same server (eg your master login).

Источник: computermaker.info

Понравилась статья? Поделиться с друзьями:
Ок! Компьютер
Добавить комментарий