Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

priveleges

 
   Database Help (Home) -> mySQL RSS
Next:  Setting "max worker threads"  
Author Message
mike

External


Since: Feb 15, 2005
Posts: 2



(Msg. 1) Posted: Tue Feb 15, 2005 12:19 pm
Post subject: priveleges
Archived from groups: mailing>database>mysql (more info?)

I have a virtual dedicated server on GoDaddy which has Redhat, Apache,
PHP, MySQL, and Plesk Reloaded installed. Plesk runs MySQL-Admin to
administer databases.

I have not problem logging in and setting up new domains, and php runs
fine locally in each domains webspace, however, I have set up a
database for one domain and cannot access it via php. It appears to be
a problem with privileges.

I found some info about setting privileges using 'grant access on ...'
but cannot get these to work.

I am not very familiar with *nix, php, or mysql having come from a
Windows NT, MSSQL environment so I am kinda in the dark at this point.

Questions:

1. Where is the base installation of mysql located? I cannot seem to
find it on the server. I have found several mysql folders in various
locations but they do not seem to have the service files in them. Is
there an easy way to determine where the service is being run from?

2. Is it necessary to stop/restart the service before or after setting
privileges.


This might be enough help to get me going in the right direction.
Any other thoughts or suggestions would be appreciated.

Thanks in Advance,

Mike

 >> Stay informed about: priveleges 
Back to top
Login to vote
mike

External


Since: Feb 15, 2005
Posts: 2



(Msg. 2) Posted: Tue Feb 15, 2005 2:57 pm
Post subject: Re: priveleges [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

  >>What error is PHP giving you? And can you login with the same
username &
  >>password using "mysql" - command line tool?

I cannot get command line to work...probably because I cannot locate to
mysql directory.

I can log in via Plesk / phpMyAdmin and execute the SQL to add table
and data to the database but when I try to run a query from web page, I
get "empty result set".

Query is: select * from LISTINGS

The table LISTINGS has 25 records in it. When I am in phpMyAdmin, I
can run the query SELECT * FROM `LISTINGS` WHERE 1 and it will return
the data, however, if I cut and paste this into the
mysql_queryhandler.php web form, it results in "empty result set".

Now, I was getting an error earlier about user@localhost not having
privileges but I deleted the domain and set it up again from scratch
and I no longer get the error.

Can I enter the GRANT command from phpMyAdmin to give the user all
access to the database? What is the correct syntax for that?

Thaks for the reply and help!

 >> Stay informed about: priveleges 
Back to top
Login to vote
Fivestar

External


Since: Feb 15, 2005
Posts: 4



(Msg. 3) Posted: Tue Feb 15, 2005 3:39 pm
Post subject: Re: priveleges [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Well, I tried entering the GRANT command in phpMyAdmin and I did get
the error message about the user@localhost not having privileges.
Seems that this command must be run using only the root account from
the command line?

Strange though how I can run a query from the admin screen but not from
the web form and the web form is not giving me the privilege error,
just empty set.

BTW, the web form I am using does work on another domain. It's just a
generic query handler I got out of one of my php books.
 >> Stay informed about: priveleges 
Back to top
Login to vote
Aggro

External


Since: Aug 28, 2003
Posts: 8



(Msg. 4) Posted: Tue Feb 15, 2005 3:40 pm
Post subject: Re: priveleges [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

mike DeleteThis @getresultz.com wrote:

 > 2. Is it necessary to stop/restart the service before or after setting
 > privileges.

No, if you use GRANT-syntax, you don't need to do anything. If you edit
the privileges by normal SQL queries, you need to run "FLUSH PRIVILEGES"
command for them to take effect. But just use the GRANT and you are fine.

What error is PHP giving you? And can you login with the same username &
password using "mysql" - command line tool?

mysql -u username -p databasename
 >> Stay informed about: priveleges 
Back to top
Login to vote
Aggro

External


Since: Aug 28, 2003
Posts: 8



(Msg. 5) Posted: Wed Feb 16, 2005 4:41 pm
Post subject: Re: priveleges [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

mike DeleteThis @getresultz.com wrote:

 > I cannot get command line to work...probably because I cannot locate to
 > mysql directory.

Try from your shell the whereis command, it might tell the location:
$ whereis mysql

 > Can I enter the GRANT command from phpMyAdmin to give the user all
 > access to the database? What is the correct syntax for that?

grant all on databasename.* identified by username@localhost identified
by 'password';
 >> Stay informed about: priveleges 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Best way to issue hundreds of inserts/updates??? - Using mysql 4.0.23- What is the best way to execute several (hundreds of) inserts and updates? Rather than issuing tons of individual inserts and updates, can I send the strings to a text file and then have mysql do them all?? IE : query.txt insert..

MySQL freezes, brings XP machine to a grinding halt - I've been using MySQL for a while for fairly light database development on my XP machine. Currently, I am just starting a new project and have experienced some big problems with MySQL today both on my office machine and at home where running a particular...

login as user 'root' but do not have root privlages and my.. - Hi gang: I'm experiencing a problem with MySQL -- I updated MySQL from version 4.1.0 to 4.1.10 and now when I login as root it doesn't show all the databases I should have access to, nor it doesn't recognize me being logged in as root (via..

FLUSH TABLES hangs if table is locked - Using FLUSH TABLES via the C query API mysql_query() hangs if the table is locked already. That is to say, nothing prevents me from running a LOCK TABLES twice; it won't tell me "it's already locked, don't try to run a FLUSH". Anyone know ...

Tool to convert DDL in graphical diagram? - Does anyone know of a tool that will create a graphical diagram from a DDL (SQL create script)? Preferable a free open-source tool. Thanks, A
   Database Help (Home) -> mySQL All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]