I couldn't make instructions on INSTALL.mysql.txt work.

I'm using the telnet/ssh client - PuTTY.

I followed the Drupal install instruction, wget http://drupal..., etc. w/o an issue. Yeh!

I moved to the MySQL database stuff and got stuck. I DON'T WANT TO DO THIS FROM CPANEL, but from the command line, via PuTTY (which also works as a MySQL command line cleint).

I type in mysql from the command line and get:

root@www1 [~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is [connection ID] to server version: 4.1.21-standard

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


This is where the breakdown is... The instructions on INSTALL.mysql.txt

First, you must create a new database for your Drupal site (here, 'databasename'
is the name of the new database):

mysqladmin -u username -p create databasename

MySQL will prompt for the 'username' database password and then create the
initial database files. Next you must login and set the access database rights:

mysql -u username -p

Again, you will be asked for the 'username' database password. At the MySQL
prompt, enter following command:

ON databasename.*
TO 'username'@'localhost' IDENTIFIED BY 'password';

I'm not sure what to type in?


victortrac’s picture

It looks like you're logging in as root and that your mysql is set for no authentication when connecting to mysql as root from the localhost. That's probably not a good idea. You want to create a new mysql user just for your site: http://dev.mysql.com/doc/refman/4.1/en/adding-users.html

After the new user is created, you can type in at the MySQL CLI: "CREATE DATABASE databasename;". Then you can type in the "GRANT SELECT,..." as in INSTALL.mysql.txt.

susie’s picture

assuming you want a database called drupaldb, with a user called drupaluser, a password of drupalpassword and the database is on the same machine as the drupal install:

1. create a new database:
create database drupaldb;
2. add users etc for that database with whichever permissions you want:
grant all privileges on drupaldb.* to drupaluser@localhost identified by 'drupalpassword';

daouverson2’s picture

I got the database created with the "create database [database_name]", but the user, password and permissions doesn't stick; this is where I get it wrong.

Using cPanel, here's the process:

1.) log into cPanel using my hosting account username & password
2.) click MySQL
3.) create database
3.) create user
4.) add user to database with "all" permissions

I'm trying to do the same thing on the command line with PuTTY (a great telenet/ssh client). I'm 80% there.

I just need to figure out the commands to 3 & 4 (from the list above).

I sure appreciate the help...

Doug Ouverson
hear | see | say | do | teach

Doug | webmaster