473,396 Members | 2,147 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,396 software developers and data experts.

problem with GRANT statement

I am having a problem with accessing MySQL database from my PHP code.
I tested accessing MySQL db locally and once things worked I created
the same DB on my web hosting's server. No problem creating database
and tables and populating it.
My database is called "sassisc".

However, my code dies when it tries to connect to DB:

$result = mysql_pconnect('localhost', 'sassisc', 'dodge3') or
die("Could not connect : " . mysql_error());

I get:

Could not connect : Access denied for user: 'sassisc@localhost' (Using
password: YES)

I went to PHPMyAdmin and tried to execute the following command:

GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc.* TO
sassisc@localhost IDENTIFIED BY 'dodge3'

It came back with an error message:

SQL-query :

GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc. * TO
sassisc@localhostIDENTIFIEDBY 'dodge3'

MySQL said:

You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'BY 'dodge3'' at line 1

For some reason, the words "localhost", "identified" and "by" were
stuck to each other. I tired this a few times and every time it was
same.
When I execute the same command minus the IDENTIFIED BY part, it works
fine.

What am I doing wrong or missing?

TIA.
Jul 19 '05 #1
0 1901

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

Similar topics

0
by: Xerxes | last post by:
I am having a problem with accessing MySQL database from my PHP code. I tested accessing MySQL db locally and once things worked I created the same DB on my web hosting's server. No problem...
6
by: Xerxes | last post by:
When I use the following GRANT statement GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc.* TO sassisc@localhost IDENTIFIED BY 'dodge3' it came back with an error message: SQL-query : ...
4
by: Abram Friesen | last post by:
Hi all, I'm a newbie at DB2 and trying to create a simple java UDF. When I call my function, I'm receiving SQL4306N. Could someone please tell me what I'm doing wrong here? Here is my java...
5
by: Matik | last post by:
Hello, I've very often a deadlock problem. The deadlock is generated always in the same way, by one application calling in DB two sp's (application has two threads). This is an error message...
3
by: shark | last post by:
Hi all. i am facing a deadlock problem .i have included the -t1204 and -T3605 trace flags and have got the following o/p pu tin sqls server logs. 2006-06-01 17:49:21.84 spid4 2006-06-01...
8
by: peteh | last post by:
Hi All; I have what I hope is a simple environmental problem. I have some SQL that creates a VERY simple procedure. When the create is executed from Quest (from a Windows client) - no problem. As...
3
by: gjspaho | last post by:
it occours every about 5-6 minutes this is the info i fo8und on sql server log 2007-03-26 12:55:33.64 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:135 ECID:0 Ec:(0x4DB77570) Value:0x4a...
5
by: rhaazy | last post by:
I am trying to a simple insert statement from a remote application against a sql server 2005 database. To fix the problem I was having, I had to grant the Login I was using the role of sysadmin. ...
0
by: Mezhnik | last post by:
Could anyone help me understand the deadlock graph posted below? and, maybe, the reason behind the deadlock? Any help is very appreciated. Thank you. 2008-03-31 04:32:06.40 spid4s Deadlock...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.