473,323 Members | 1,570 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,323 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 1894

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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.