LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 07-02-2003, 08:33 PM   #1
nullpt
Member
 
Registered: Jul 2003
Distribution: Red Hat
Posts: 94

Rep: Reputation: 15
Mysql


Hi folks,

I have mysqld running, since i've installed it, I'v only changed the root user password, so I could use it for my web page.
Now I would need to add a new user with a password that can only access a specific database.

I have been rtfming all day, and I couldn't find any useful help.

Hope u can help me.

PS: Don't have any control panel or any other software to configure the server .
 
Old 07-02-2003, 08:40 PM   #2
Drogo
Member
 
Registered: Oct 2002
Distribution: RedHat 8 or 9 (shrike)- Fedora Core 1,2
Posts: 215

Rep: Reputation: 30
Try :

phpMyAdmin

easy to manage Mysql
 
Old 07-03-2003, 03:28 AM   #3
slizadel
LQ Newbie
 
Registered: Jun 2003
Distribution: RH9, Gentoo, Slack
Posts: 23

Rep: Reputation: 15
If you're interested in learning the actual tables that need to be modified and the SQL syntax needed to grant certain users access to a given database/table you might take a look at this link. It gives a pretty simple step-by-step guide to setting up users.
 
Old 07-03-2003, 11:53 AM   #4
anilnatha
LQ Newbie
 
Registered: Jun 2003
Distribution: Red Hat 8.0, 9.0
Posts: 26

Rep: Reputation: 15
There are three ways you can do this:

1. Use phpMyAdmin like another person said above

2. Use MySQLFront (I personally love this program because you can connect to any remote MySQL database and do anything that phpMyAdmin has as well, you'll just have to write some of the queries yourself)

3. If you have access to run the mysql command from a command line Here is the command you want to use:

GRANT ALL PRIVILEGES ON [database].[table] TO [username]@[host] IDENTIFIED BY 'some_pass' [WITH GRANT OPTION];

The items in [] need to be filled in, or are optional.

[database] : name of database that you want this user to access. They will only have access to this database. You may let them access every database by simply using *
[table] : same type of access structure as database above, whatever tables you list here are the only tables they can access. if you have defined * to be the databases they can access, make this *

[username] : username that user will use to connect
[host] : host from which they will connecting from, this can be a defined host, or can be a wildcard in which case you would use %

some_pass : choose a password for that user to use to connect

[WITH GRANT OPTION] : if you want this user to have access to the mysql.user table simply add this comment. if you leave it out, they cannot modify the mysql.user table. this is a good security measure. I would leave this out, unless you really trust the user that is connecting to your database.


I apologize if any of this doesn't sound right or if i'm mistaken on any part. I'm going off the top of my head on this. If you want detailed information visit:

http://www.mysql.com/doc/en/Adding_users.html

Last edited by anilnatha; 07-03-2003 at 11:56 AM.
 
  


Reply



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
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-07-2008 11:48 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM

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

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

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