LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-01-2003, 08:08 AM   #1
spyghost
Member
 
Registered: Jun 2003
Distribution: Redhat
Posts: 245

Rep: Reputation: 30
how to create a user that has access priv to mysql in rh 9.0?


hi,

i am creating a simple web based database with mysql, php, and apache in rh 9.0.

i use this inside the php script that i am making:
$connection = mysql_connect("localhost", "root", "mypasswd");

i would like to create another user that has access priviledges to mysql because its not good to user root right?

i tried to make one user a member of the mysql group and here is what happened... the user can "connect" to mysql, but he cannot select a database...
mysql_select_db("database", $connection);

now, how do i add the user "properly" such that he can do everything in mysql (without considering root of course)

thanks...
 
Old 11-01-2003, 09:16 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
If you want to do it graphically hten phpMyAdmin is great. On the cli - try:
mysql -u root
(enter your password)

Then at the mysql prompt:
grant all on DATABASE.* to SOMEUSER@localhost identified by 'PASSWORD';

You'll need to replace the words in capitals obviously. This gives which ever user you choose full access to that one database - if you want to set more restricive permissions then look at the mysql docs on the GRANT statement.
 
Old 11-01-2003, 09:40 AM   #3
spyghost
Member
 
Registered: Jun 2003
Distribution: Redhat
Posts: 245

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by david_ross
If you want to do it graphically hten phpMyAdmin is great. On the cli - try:
mysql -u root
(enter your password)

Then at the mysql prompt:
grant all on DATABASE.* to SOMEUSER@localhost identified by 'PASSWORD';

You'll need to replace the words in capitals obviously. This gives which ever user you choose full access to that one database - if you want to set more restricive permissions then look at the mysql docs on the GRANT statement.
is that a downloadable software? where can i download it?
 
Old 11-01-2003, 09:45 AM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
phpMyAdmin? here:
http://www.phpmyadmin.net/home_page/
 
Old 11-02-2003, 03:15 AM   #5
spyghost
Member
 
Registered: Jun 2003
Distribution: Redhat
Posts: 245

Original Poster
Rep: Reputation: 30
thanks!
 
  


Reply


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
Auto create user, mysql and ftp haze Linux - General 1 04-12-2005 10:10 AM
Mysql how to create user? fturcic Linux - Software 1 01-31-2005 11:23 PM
MySQL - command - create user/single database dmedici Linux - Software 3 06-21-2004 03:17 PM
MySQL user access and grants tuka Linux - Software 0 08-20-2003 07:18 AM
mysql cannot create a user nocturnal Linux - Software 1 07-05-2003 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:18 PM.

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