• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 519
  • Last Modified:

how to create mysql user in linux and grant full access , database update

Dear Experts:

I am having redhat enterprise linux with mysql server running, I would like to create the mysql user and grant full access to create database, tables , records and do all modifications for whatever this user does, would prefer to do this in linux command level, I have mysql root user credentials

2. How to change the mysql root user password.

3. how to drop the database and import the updated or backup database with the same name, I mean daily backup are taken if any day want to revert to the one day old database would like to drop/delete the running database and import the oneday old data base.

please suggest, thanks in advance.
0
D_wathi
Asked:
D_wathi
2 Solutions
 
Ray PaseurCommented:
I think you would want to start by learning the basics of MySQL.  It has queries to do all of these things.  it's documented in the online man pages.  A good place to start might be here:
http://www.mysql.com/

There are many good online learning resources that are well-reviewed, as well as books on the subject.  But as you will see when you start the learning process, there are days, if not weeks, of study required to answer broad questions like these!
http://www.amazon.com/Best-Sellers-Books-MySQL-Guides/zgbs/books/6133986011
http://education.oracle.com/pls/web_prod-plq-dad/ou_product_category.getFamilyPage?p_family_id=406
http://www.w3schools.com/sql/
https://www.udemy.com/mysql-database-for-beginners2/
http://www.lynda.com/MySQL-training-tutorials/260-0.html
0
 
Tim PhillipsCommented:
Question 1:
mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' WITH GRANT OPTION;

Question 2:
mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
mysql> FLUSH PRIVILEGES;

Question 3: part 1
mysql> drop database <db_name>

Question 3: part 2
export:
mysql> mysqldump -u [username] -p [database_name] > [dumpfilename.sql]

import:
mysql> mysql -u [username] -p [database_name] < [dumpfilename.sql]
0
 
gheistCommented:
# mysql_secure_installation
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now