bennetthaselton

error in instructions for installing database from shell?

Vote 0 Votes

On the page:
http://www.movabletype.org/documentation/installation/detailed-instructions.html

the instructions for installing the MySQL database "using a shell", say:
>>>
If you have shell access to your Web server, you can use the mysqladmin utility to create a database. Enter the following command to create a database named movabletype.
mysqladmin create movabletype -u username -p

Replace "username" with the user name you want use to access the database. Enter the password for the user name you created. If the database is created successfully, you see no information on the screen.
>>>

This looks to me like it's wrong. You don't replace "username" with the username used to access the Movable Type database. That will just give you an error since you're trying to sign in using a username that doesn't exist yet. You replace "username" with the MySQL administrator username. Then once signed in to MySQL as the MySQL administrator, you need extra steps to create a DIFFERENT username which is then used to access the Movable Type database.

(If you look at the instructions for creating the database using other routes, like phpMyAdmin, this is what they tell you to do.)

I think the instructions for creating the Movable Type database from the shell, should say something like the following:

***

$ mysql -u adminusername -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5340 to server version: 3.23.54

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

mysql> CREATE DATABASE movabletype;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON movabletype.* TO "movabletypeusername"@"localhost"
-> IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

mysql> EXIT
Bye
$

***

where, in the above commands:
- "adminusername" should be replaced with the MySQL administrator username. This would have been created back when you installed MySQL. Often it will just be called "root".
- "movabletypeusername" should be replaced with the username that you want to create to access the Movable Type database. This is not a pre-existing username; typing the above commands will create the new username. For good security, this should be *different* from the adminusername that is used to administer MySQL.
- "password" should be replaced with the password that you want to use with the newly-created "movabletypeusername" MySQL account. Again, it is good security practice to make this different from the password for the MySQL administrator account (and also, different from the password that you used to connect to the machine in the first place).

Write down the values that you used for "movabletypeusername" and "password" since you will need to re-enter them later on in the Movable Type installation process.
***

I have verified that these instructions worked for me when I used them during the Movable Type installation process. Hope this is helpful.

1 Reply

| Add a Reply
  • You're right Bennett!

    Though in over 98% cases, the user would create the database from inside his/hers hosting account control panel using a very simple procedure, those that want to create the database from the shell need first to connect to MYSQL with the admin access and then eventually create a different user for the to be created movable type database.

    Thanks for your contribution on this!

Add a Reply

Forum Groups

1774 6167

Last Topic: Template modules by Zielun on Feb 16, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1434 5088

Last Topic: Maintenance announcement by Nick on Feb 17, 2012

695 2912

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

174 740

Last Topic: Captcha images rendering slowly by ScottM on Feb 12, 2012

190 568

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012