Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-07-2010, 01:39 AM   #1
Registered: Mar 2010
Distribution: Slackware
Posts: 63

Rep: Reputation: 4
Arrow How do I create a new mysql user and a mysql database at the shell prompt?

thanks a lot, experts at Linux Questions!!
Old 08-07-2010, 07:33 AM   #2
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 97
To create the database:
mysql -p -e "create database MyProject;"

To grant full access to only this database:
mysql -p -e "grant all privileges on MyProject.* to 'MyAdmin'@'localhost' identified by 'PassWord';"


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql: cannot create database deostroll Linux - Server 4 08-04-2009 02:17 PM
Create mysql user for backup of database timgerr Linux - Server 2 01-04-2008 11:44 AM
How to create Database in mysql irfanhab Linux - General 1 12-16-2004 07:37 PM
MySQL - command - create user/single database dmedici Linux - Software 3 06-21-2004 04:17 PM
query DNS and create mysql database nabil Programming 0 01-18-2002 05:42 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration