473,549 Members | 2,935 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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@localh ost' (Using
password: YES)

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

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

It came back with an error message:

SQL-query :

GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc. * TO
sassisc@localho stIDENTIFIEDBY '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 1912

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

Similar topics

0
603
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 creating database and tables and populating it. My database is called "sassisc". However, my code dies when it tries to connect to DB: $result =...
6
6847
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 : GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc. * TO
4
5807
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 code for a UDF that simply returns the integer value you pass it:
5
2635
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 from trace: 2005-11-29 08:20:29.97 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:1160 ECID:0 Ec:(0x296F9540) Value:0x3
3
2190
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 17:49:21.84 spid4 Wait-for graph 2006-06-01 17:49:21.84 spid4 2006-06-01 17:49:21.84 spid4 ... 2006-06-01 17:49:26.92 spid4 ...
8
4908
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 soon as I go to the command line (on the actual DB server), I get a strange (and somewhat frightening) sqlcode -1007 (corrupt tablespace!?). I'm...
3
2571
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 2007-03-26 12:55:33.64 spid4 Victim Resource Owner: 2007-03-26 12:55:33.64 spid4 ResType:LockOwner Stype:'OR' Mode: X SPID:137 ECID:0 Ec:(0x4DE61570)...
5
2397
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. However I don't want this user to have that kind of control, what would be the best role to allow the user full access(including remoting) to only...
0
1403
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 encountered .... Printing deadlock information 2008-03-31 04:32:06.40 spid4s Wait-for graph 2008-03-31 04:32:06.40 spid4s 2008-03-31...
0
7518
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7446
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7715
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7956
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6040
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5087
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.