?
Solved

Linux MySQL Noob

Posted on 2008-06-17
6
Medium Priority
?
421 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 800 total points
ID: 21809380
0
 
LVL 1

Assisted Solution

by:hpz937
hpz937 earned 400 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 200 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 600 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

Give Your Engineering Team a Productivity Boost

Learn why container technology is so powerful and how it can provide your team with productivity gains and other benefits.

Question has a verified solution.

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

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 …
In this article, we’ll look at how to deploy ProxySQL.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

752 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