Solved

Linux MySQL Noob

Posted on 2008-06-17
6
419 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Turn Insights Into Action

You’ve already invested in ITSM tools, chat applications, automation utilities, and more. Fortify these solutions with intelligent communications so you can drive business processes forward.

With xMatters, you'll never miss a beat.

Question has a verified solution.

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

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Foreword This article was written many years ago, in the days when PHP supported the MySQL extension (http://php.net/manual/en/function.mysql-connect.php).  Today (http://php.net/manual/en/migration70.removed-exts-sapis.php) you would not use MySQL…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

695 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