image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Design & Media

Reply
 
Thread Tools
  #1  
Old April 13th, 2003, 02:19 PM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montrιal
Posts: 2,172
Thanks: 0
Thanked 0 Times in 0 Posts
michaelsanford is on a distinguished road
Angry CompleteMySQL4 is killing me (user problems)

Code:
[amras@nimbus ~]% mysql -ujack -pjack1 jacks_db
ERROR 1045: Access denied for user: 'jack@localhost' (Using password: YES)
Jack is configured with GRANT ALL to jacks_db.*, and his user looks like this
Code:
*************************** 1. row ***************************
                 Host: %
                 User: jack
             Password: 5d259af02736f264
          Select_priv: Y
          Insert_priv: Y
          Update_priv: Y
          Delete_priv: Y
          Create_priv: N
            Drop_priv: N
          Reload_priv: Y
        Shutdown_priv: N
         Process_priv: Y
            File_priv: Y
           Grant_priv: N
      References_priv: Y
           Index_priv: Y
           Alter_priv: N
         Show_db_priv: Y
           Super_priv: Y
Create_tmp_table_priv: Y
     Lock_tables_priv: Y
         Execute_priv: Y
      Repl_slave_priv: Y
     Repl_client_priv: Y
             ssl_type: 
           ssl_cipher: 
          x509_issuer: 
         x509_subject: 
        max_questions: 0
          max_updates: 0
      max_connections: 0
I first used the command line to make the new user, then I tried phpMyAdmin2.4.0

I granted everything to my own user (the username of my shell account) and gave it a blank password, accessible only from localhost. That one works fine, but jack doesn't work at all, not from the shell, not from my local scripts...

Now I'm a total security freak, so I've allocated only privieges to rick to let him see his own database, but I don't want him doing anything outside his DB, or having too much control over my server.

I'm using CompleteMySQL4.0.12 from www.aaronfaby.com

So, any ideas what's going on?
__________________
michaelsanford.com • Blog • Twitter • Tumblr • LinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0
Reply With Quote
  #2  
Old April 21st, 2003, 03:04 AM
azrad's Avatar
Not-so-junior Member
 
Join Date: Apr 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
azrad is on a distinguished road
err... actually.. u should have login differently...

for ur case, u using % as the host...
u might want to use this command.

mysql -h <your_ip_adress> -u <username> -p <password>

or the other way around, you have to grant another account for your 'jack' account...

grant select,insert,update...
on db.*
to jack@localhost
identified by '<password>'

i hope this help... =)
__________________
PowerBook - 1.5GHz PowerPC G4
1GB RAM
Mac OS 10.4.0 | Apache 2.0 | MySQL 4.0.15 | PHP 4.3.4R2
Reply With Quote
  #3  
Old April 21st, 2003, 03:34 AM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montrιal
Posts: 2,172
Thanks: 0
Thanked 0 Times in 0 Posts
michaelsanford is on a distinguished road
I did grants for everything, but the thing is I don't call jack from the command line usually, i use a PHP script with mysql_pconnect() which is where I first noticed that it failed.

Anyway I reverted to another mysql build (see sig) trying to get that to work too hehe.

Also, why do you say I should specify the host name at the command line? I've never done that before, since it's just calling the local mysqld server, and jack is configured with a wilcard host allowance anyway.

Thanks for the input azrad!
__________________
michaelsanford.com • Blog • Twitter • Tumblr • LinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0
Reply With Quote
  #4  
Old April 22nd, 2003, 03:49 AM
azrad's Avatar
Not-so-junior Member
 
Join Date: Apr 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
azrad is on a distinguished road
ehehe... no probs... cause i had the same problem too last time...

i did used the wildcard host... but end up errors... so i just config it to localhost... (that's why u didn't have to specified the -h variables...) since it connect to localhost by default...

as for PHP coding... i used this coding...

mysql_connect("<your_ip>", "<username>", "<password>");

or in your case

mysql_connect("localhost", "<username>", "<password>");

=)
__________________
PowerBook - 1.5GHz PowerPC G4
1GB RAM
Mac OS 10.4.0 | Apache 2.0 | MySQL 4.0.15 | PHP 4.3.4R2
Reply With Quote
  #5  
Old April 22nd, 2003, 01:47 PM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montrιal
Posts: 2,172
Thanks: 0
Thanked 0 Times in 0 Posts
michaelsanford is on a distinguished road
Yeah I know it connects to localhost by default that's why i was wondering hehe.

The thing is though, I have to let the user log in remotely (they're using a GUI MySQL manager from their own computer) from a dynamic-IP machine. So I can't set it to localhost (well I can but it would be a pain for them).

Also my machine is dynamic IP

Problems, problems, problems hehe
__________________
michaelsanford.com • Blog • Twitter • Tumblr • LinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0
Reply With Quote
  #6  
Old April 22nd, 2003, 10:53 PM
azrad's Avatar
Not-so-junior Member
 
Join Date: Apr 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
azrad is on a distinguished road
err...

i wish i can come up with good idea...

but u're right, since they use dynamic IP, u can;t set it to localhost... if u set it to localhost, they have to login from the same machine, right?

i wish i can help u with that... maybe if i found it somewhere over the net... i'll let u know... =)
__________________
PowerBook - 1.5GHz PowerPC G4
1GB RAM
Mac OS 10.4.0 | Apache 2.0 | MySQL 4.0.15 | PHP 4.3.4R2
Reply With Quote
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thank God the Witch Is Dead Veljo Mac OS X System & Mac Software 2 June 27th, 2003 05:51 PM
Recovering a deleted User markg Mac OS X System & Mac Software 5 October 14th, 2002 01:45 PM
Getting /etc/motd to show with ftpd new32 Mac OS X System & Mac Software 4 October 8th, 2001 10:54 AM
Anonymous FTP The DJ Mac OS X System & Mac Software 5 January 16th, 2001 11:31 AM


All times are GMT -5. The time now is 04:07 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.