Solved

Linux MySQL Noob

Posted on 2008-06-17
6
406 Views
Last Modified: 2010-03-19
Hello, I've got a Linux server running MySQL server.  It is up and running great, currently being used by one web app on this server and I don't want to break it.

What I would like to do, is create a new SQL database and a new username and password that a new web application (that I'm going to install on this server) can use to access the new database.

Can you tell me the commands that I need (there is no GUI on this server) to add a SQL database and a set of credentials to access the database with.  AND/OR a good web site or two that I can read to learn more about SQL.

To let you know more about the SQL that I'm running, here are the results of a 'yum list | grep -i sql'

mysql.i386                               5.0.22-2.2.el5_1.1     installed
mysql-server.i386                        5.0.22-2.2.el5_1.1     installed
perl-DBD-MySQL.i386                      3.0007-1.fc6           installed
php-mysql.i386                           5.2.2-3                installed
postgresql-libs.i386                     8.1.11-1.el5_1.1       installed
python-sqlite.i386                       1.1.7-1.2.1            installed
sqlite.i386                              3.3.6-2                installed


Thanks!!!
0
Comment
Question by:brasslan
6 Comments
 
LVL 6

Accepted Solution

by:
psychic_zero earned 200 total points
ID: 21809380
0
 
LVL 1

Assisted Solution

by:hpz937
hpz937 earned 100 total points
ID: 21809440
Personally I use phpMyAdmin on my webserver, i makes it very easy to add databases, users, tables etc...

http://www.phpmyadmin.net/home_page/index.php
0
 
LVL 18

Assisted Solution

by:Matthew Kelly
Matthew Kelly earned 50 total points
ID: 21809883
Agree with hpz937.

Install PHP and use phpMyAdmin.

That way you get a web GUI to the database and do not have to mess with all of the command structures. Follow the tutorials given by psychic zero to get it up and running.
0
 
LVL 10

Assisted Solution

by:Nellios
Nellios earned 150 total points
ID: 21813034
You can use the command prompt:
#From the commannd prompt to create new db.

mysqladmin -u current_user -p create new_data_base_name;
 

#To set permission to the db enter the mysql prompt

mysql -u current_user -p

#to allow access from localhost (this is the case for a web app

mysql> grant all on new_data_base_name.* to new_user@localhost identified by 'new_password';

#to allow access from all other hosts if needed

mysql> grant all on new_data_base_name.* to new_user@'%' identified by 'new_password';

Open in new window

0
 
LVL 6

Author Comment

by:brasslan
ID: 22491231
Thanks everyone for all your help!  Sorry I forgot to close this one :-)
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Transferring database from one server to another 1 63
understanding output of mysql version 2 50
html input clean up 3 47
Have issues with Query MySQL 9 54
Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now