Solved

Linux MySQL Noob

Posted on 2008-06-17
6
416 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

732 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