473,378 Members | 1,119 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

priveleges

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

Jul 23 '05 #1
4 2090
mi**@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
Jul 23 '05 #2
>>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!

Jul 23 '05 #3
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.

Jul 23 '05 #4
mi**@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';
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Leonard Lim | last post by:
for this particuler case, the root user does not have priveleges to update, insert, select database and so on. It fail also to grant user access control and create or drop database. I think I had...
0
by: Steve | last post by:
Hi, Yesterday I signed up for another dedicated linux server with the hosting company I use and I am having problems getting MySQL 4.1.3 working on it. I've tried just about everything I can...
8
by: Brent | last post by:
Does anyone know the best way to detect and track a visitors screen resolution. I know the javascript to detect the users resolution but I am a bit confused on the best way to track and save this....
1
by: Claus Haslauer | last post by:
Hi, firstly, I am new to access03 and server03 Originally, I had written an access 2002 database. Then, we transferred (for another reason) to server 2003. Then, we got access 2003. Then I...
2
by: Ray Dillinger | last post by:
Okay, most of my career has been spent doing linguistics or hardcore math, and letting other people write the interfaces to it. Now I'm up for something a little different and I need to expand my...
0
by: Bob Graham | last post by:
I have a problem with wanting to deny users delete priveleges on a group of folders and files. The files are Excel files. My program code opens the files and allows users to make changes and then...
0
by: wesley | last post by:
Hi All, for some reason i cannot Create tables in my database anymore. I have a valid user that has the relevant permissions. But when i try to create a user i get an error saying "failed to create...
0
blyxx86
by: blyxx86 | last post by:
I'm getting this error message when I try to open one of the 'front end' files I have, and also when I try to open the 'back end' file from certain computers. I can do it from my station here, and...
5
by: nktt3514 | last post by:
I'm using a assembly to load my apllication, and now I need to list all forms in my apllication and list all controls. I have read the topic on...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.