Database Setup

ID #1009

How do I setup a user for database access?

First, create a new database. Once you've done this, control_mysql automatically creates a database user with the same name as your system username. The password is set to a random value. To set the password to something you like, do:

control_mysql password user_name

It will prompt you to enter a password twice.

New users can be created with the 'adduser' command to control_mysql, i.e.:

control_mysql adduser new_user_name

You can then use the standard MySQL grant system to give this user access to tables in your databases.  For example:

$ mysql -u user_name -h db -p

mysql> grant all privileges on my_new_db.* to new_user_name@'%'

Tags: -

Related entries:

Last update: 2008-10-02 14:05
Author: Dave Steinberg
Revision: 1.1

Digg it! Print this record Send to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this entry:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry