Page 1 of 1

Creating a new user and database in mysql

Posted: Thu Jan 01, 2009 3:57 am
by cpg
To create a new user and database run these to commands in a terminal (when it prompts for a password it is hda)

We will assume here the username and database to be created are these (change for your case appropriately):

Code: Select all

Database: gallery User name: gallery
The first step is creating the db:

Code: Select all

mysqladmin -uroot -p create gallery
Then create a user for it (also type hda as the password when prompted:

Code: Select all

mysql_setpermission --u root
Go to option 5

Code: Select all

5. Create/append quite extended user privileges for an existing database and host combination (user can do SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX, LOCK TABLES,CREATE TEMPORARY TABLES)

Code: Select all

Which database from existing databases would you like to select: You can choose from: - amahi_development - gallery Which database will it be (case sensitive). Type * for any:
Then choose database by typing gallery and press Enter.

When asked for the username,

Code: Select all

What username is to be created:
type: gallery again. This will be the user name.

Code: Select all

Would you like to set a password for gallery [y/n]:

Stick to hda if you trust your network, otherwise chose a password.

Then comes choosing the hosts allowed:

Code: Select all

We now need to know from what host(s) the user will connect. Keep in mind that % means 'from any host' ... The host please:
Type localhost. When asked for more hosts, say no. Stick to that unless you know you are going to be accessing the DB from other hosts in the network.

Type yes to the "are you sure?" question.

This will creates the following

DB Name: gallery
User name: gallery
Password: whatever you type

Re: Creating a new user and database in mysql

Posted: Wed Nov 25, 2009 8:09 am
by radioz
So the user names / passwords I create in the control panel don't apply to the apps?

Do I need to use this procedure to create valid names/passwords for each app?

I have not been able to run any of the apps without using admin / admin as the application logins. Am I missing something?


Re: Creating a new user and database in mysql

Posted: Wed Nov 25, 2009 10:38 am
by bigfoot65

Each app has it's own procedure for adding new users. The amahi users are not part of the applications. The admin login will provide you access to that apps user management function. The user information is stored in a separate database for each one, so I would not recommend doing it via mysql.

So if you have 3 apps that require user name and password, you will have to add them in each one.

I hope I have not confused you. If you need additional help, please let me know.

Re: Creating a new user and database in mysql

Posted: Wed Nov 25, 2009 5:50 pm
by cpg

you are missing the special instructions. when you install the apps, there is an area that comes up called "special instructions" for the app. tells you of any user/password that has been set up for the app by default.

read those!!