Creating a new user and database in mysql

User avatar
cpg
Administrator
Posts: 2594
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Creating a new user and database in mysql

Postby cpg » Thu Jan 01, 2009 3:57 am

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]:
Yah!

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
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
radioz
Posts: 406
Joined: Tue Nov 24, 2009 1:07 pm

Re: Creating a new user and database in mysql

Postby radioz » Wed Nov 25, 2009 8:09 am

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?

Thanks,
radioz

User avatar
bigfoot65
Project Manager
Posts: 11024
Joined: Mon May 25, 2009 4:31 pm

Re: Creating a new user and database in mysql

Postby bigfoot65 » Wed Nov 25, 2009 10:38 am

Hello,

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.
ßîgƒσστ65
Applications Manager

User avatar
cpg
Administrator
Posts: 2594
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Creating a new user and database in mysql

Postby cpg » Wed Nov 25, 2009 5:50 pm

@radioz

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!!
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

Who is online

Users browsing this forum: No registered users and 2 guests