On Tue, 5 Mar 2002, David Novogrodsky wrote:
> I have two accounts on my Mac (G4 450): one is the admin account the
> other a working account without admin permissions.
A sound policy. No problems there.
> I installed MySQL when I was using the admin account.
Good -- this is normal, though the best way to do these sorts of things is
to always run as your own account, but issue priviliged commands like
installations with 'sudo', e.g. "sudo fink install mysql". Sudo protects
you from the habit of leaving yourself logged in as root, where you can
accidentally do questionable things, and it also provides a mechanism for
logging & reporting what work was done with the admin privilige.
> The mysqld command works fine (using the terminal app). However, I need
> to use sudo to access mysqladmin. Neither of these commands are
> available in terminal if I am using my working account (no administrator
> permissions).
Ok, the confusing thing here is that you're dealing with "users" at at
least two different levels: the system itself (your login), and the
accounts set up & maintained within the MySQL server. Chances are that you
will be running the mysqld daemon as user "mysql" (if not, you should be)
and are accessing it with the database account "root". The latter setting
is the one that needs to be adjusted. You should be able to make a raw
connection by trying something like...
% mysql -u root -p -D mysql
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 3.23.42
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> GRANT ALL ON some_db.* TO david IDENTIFIED BY "password";
...where you fill in whatever is appropriate on the first password prompt,
and you supply the password you want for the regular user at the last
line. You can get a similar result by INSERTing into the system user
table in MySQL. It also might be a good idea to further specify where this
account can log in from -- locally, remotely, etc. To do so, try:
mysql> GRANT ALL ON some_db.*
-> TO david@localhost
-> IDENTIFIED BY "password";
mysql> GRANT ALL ON some_db.*
-> TO [EMAIL PROTECTED]%
-> IDENTIFIED BY "password";
mysql> GRANT ALL ON some_db.*
-> TO david@%.novogrodsky.net
-> IDENTIFIED BY "password";
The first lets you in from localhost, the second would be any host on your
local subnet, and the third would be anywhere within your domain name.
You can also control what kinds of things the user can do, etc -- look up
the GRANT command for details. After flushing priviliges, this should
allow you to log in from your own account, and should resolve this
problem.
--
Chris Devers [EMAIL PROTECTED]
Apache / mod_perl / http://homepage.mac.com/chdevers/resume/
_______________________________________________
Fink-beginners mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-beginners