‘cannot Connect To The Database Because: ‘ . Mysql_error()); (help)?
Hello,
I am new to all of this configuring things but I am slowly trying to learn. But I am going through the process of installing Drupal and right now I am trying to set up the Database Configuration. Now, when I go into my cpanel on here and click on MySql, then as follow(Ill use a sample name);
New Database: EliteGirl (then clicked on create database)
Current users: Jane (username) fakepw (password) ((then clicked on create user))
Everything adds fine. Now when I get to the Add Users to your Databases section, I have ALL Privileges checked, then I click on add users to database, then this is what is displayed;
Current Databases:
elite08_EliteGirl
Users in EliteGirl
elite08_jane (Privileges: ALL PRIVILEGES)
Connection Strings
Perl $dbh = DBI->connect(”DBI:mysql:elite66_EliteGir…
“elite08_jane”,”");
PHP $dbh=mysql_connect (”localhost”, “elite08_jane”,
“”) or die(’Cannot connect to the database because: ‘ . mysql_error());
mysql_select_db (”elite08_EliteGirl”);
So, I enter the Database name, username and password in Drupal as I entered on Lunarpages and I get this error;
Failed to select your database on your MySQL database server, which means the connection username and password are valid, but there is a problem accessing your data. MySQL reports the following message: Incorrect database name ‘elite66_EliteVASupport ‘.
Are you sure you have the correct database name?
Are you sure the database exists?
Are you sure the username has permission to access the database?
What am I doing wrong? At the bottom of the screen I see it has a link to access phpMyAdmin, am I suppose to configure anything in there? When I go in there, under create new database, I see it has No Privileges in red. What is wrong there?
Related posts:
- Emergency:!? 3gforfree? It Says Someone Else Is On!? i was on 3gforfree and now i click on anything or push back it says this… If you still have to install Drupal, proceed to...
- Drupal Unsupported Database Error (my Database Is Supported)? I am currently getting this error message: Warning: conf_init(./sites/default/settings.php) [function.conf-init]: failed to open stream: Permission denied in /home/blueccom/public_html/includes/boot… on line 238 Warning: conf_init() [function.include]: Failed...
- How Do I Find Mysql Database Name For Wordpress? In my Control panel under under “create and update” I created one Database. It asked me to create a USERNAME and PASSWORD, which I did....
- What Is A Content Management System That Does Not Require Access To A Mysql Database? I’m creating a website for a student group at my university and don’t have access to a MySQL database, but I want something that works...
- Drupal, Apache And Mysql? Hi! Im on linux ubuntu and i’m wanting to use drupal cms however I am new to mysql, (needs a database to work.) how can...



RSS
The only thing I can see is that your connection misses its PASSWORD! (that you said you set to “fakepw”):
in Php only:
-> $link = mysql_connect(”localhost”, “elite08_jane”, “fakepw”) or die (”Error: “.mysql_error());
mysql_select_db(”elite08_EliteGirl”) or die(”Could not select database: “.mysql_error());
The error you receive refers to an incorrect link in PERL: it is trying to access elite66! (and not elite_08).
DON’T put BOTH codes! Or you call using Php, OR you call using Perl, not BOTH!
Try Php as above only.
Just one more word: I hope the users/pwd you gave are REALLY fake. If not, destroy the DB, recreate a new one and put new users and password…