# Drupal.



## Ex-Para (Mar 30, 2007)

I get this message at the drupal configuration page,

We were able to connect to the MySQL database server (which means your username and password are valid) but not able to select your database. MySQL reports the following message: Access denied for user ''@'localhost' to database 'connect'.
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?

So I am thinking I might be getting near to what is needed. The problem I have database name

I get this 
[email protected]:~$ mysql -u database -p

Enter password: 

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 25

Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)



Type 'help;' or '\h' for help. Type '\c' to clear the buffer.



mysql> 




This is what I am stuck at, I don't know what to do with the below or how to fill it in. 
> create database <databasename>;

> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPO TABLES RARY, LOCK TABLES ON <databasename>.* TO '<username>'@'localhost' IDENTIFIED BY '<password>';

> flush privileges;

Any ideas please.


----------



## DumberDrummer (Oct 27, 2003)

Hey dude. 

Mysql requires a database to be created... you have the right commands here

All you have to do is use those commands... for example, you are using a drupal so perhaps your database can be called drupal...

> create database drupal;

for that command, all you have to do is where it says mysql> is type the full line and hit enter. 

the database is then created
the second step you link is to give all permissions to your account

```
> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPO TABLES RARY, LOCK TABLES ON <databasename>.* TO '<username>'@'localhost' IDENTIFIED BY '<password>';
```
so <database name> you fill in with drupal, or whatever you created in the first step.... <username> is the username you used to login with to get to the mysql> prompt to begin with. <password> being your password. 

anything within <> needs to be replaced by the appropriate values. Then once the database is created and proper permissions are assigned, you can give drupal the name of the database, and the username and password needed to access it, and drupal should do the rest. 

Let me know if you have any more questions, I'll be happy to help.


----------



## Ex-Para (Mar 30, 2007)

Thanks for the reply but no way can I get it to work, I have un-installed and installed many times but each time I come to Drupal configuration I get nothing but a load of errors so I have wiped the hard drive with gpart ready to start again. Do you know anything about nginx


----------

