pedrojose
05-30-2008, 04:31 PM
Hi!
I dont know much about php and sql, (im realy a newbie) but i have a program that requres remote access to sql.
So i was told to type in query/ on phpmyadmin this:
Log as the admin user, like this:
mysql -u admin -p
and enter your Plesk admin password at prompt.
But after i write mysql -u admin -p i get the error:
#1064 - 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 'mysql -u admin -p' at line 1
Does someone can help me? Whant sould i writ in sql query to access as administrator?
Hildy
05-30-2008, 04:44 PM
If you're logged into phpmyadmin, you likely already have admin access to mysql at that point.
"mysql -u admin -p" is the command to launch a mysql console.
In phpmyadmin->sql window, just put the command you're been asked to run (grant ... on db.* to user@host identified by 'password'; or whatever it is).
pedrojose
05-30-2008, 05:11 PM
#1044 - Access denied for user 'bluekora'@'%' to database 'dbname'
it stilll gives the error.
So how do i grant my self with admin previleges, wich is the syntax to run:
When using: mysql -u admin -p
It says that im using an incorect syntax for my system version
Hildy
05-30-2008, 05:26 PM
Well, it looks like you're logged into phpmyadmin as "bluekora", and that user doesn't have permission to do what you need to. If you actually have the admin password for mysql, then you should be able to log into phpmyadmin as "admin".
If you don't have admin access, then you're going to need to talk to someone who does. Simply being able to talk to the mysql server doesn't give you any special rights. It's a secure system, and without that password, you won't be able to do anything to it.
Can you clarify further what's involved here? The "program" that needs access, is that on your PC or on a server somewhere? The MySQL server, is that on your PC or on a server somewhere? Whose MySQL server is it?
CArmstrong
05-30-2008, 05:29 PM
Like others have said, login as 'admin' not 'bluekora'.
In your own initial post you said this:
Log as the admin user, like this:
mysql -u admin -p
and enter your Plesk admin password at prompt.
There was a typo in that syntax. Like others have said, again, login as: mysql -uadmin -p
And enter your Plesk admin password at the prompt.
pedrojose
05-30-2008, 05:31 PM
Its my sql server and the software in novocrm. Im trying to set up a remote database to use with this software in my company.
So do i log in plesk as the admin and then go to sql?
pedrojose
05-30-2008, 05:40 PM
I have just log in plesk as admin - go to database - and open phpmyadmin and type: mysql -uadmin -p
And it gives the following error:
Comando SQL:
mysql - uadmin - p
Mensagens do MySQL :
#1064 - 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 'mysql -uadmin -p' at line 1
- Then i went back and type:
GRANT ALL PRIVILEGES ON bknews_novocrm.* TO bluekora@'%' IDENTIFIED BY 'mypassword';
And gives the following error:
Comando SQL:
GRANT ALL PRIVILEGES ON bknews_novocrm . * TO bluekora@'%' IDENTIFIED BY 'mypassword';
Mensagens do MySQL :
#1044 - Access denied for user 'bluekora'@'%' to database 'bknews_novocrm'
--> So whats i´m doing wrong? Can someone explain or help?
Thanks
Hildy
05-30-2008, 06:20 PM
In phpmyadmin, on the home page of the tool, you should see something like:
# Server: localhost via TCP/IP
# User: root@localhost
What do those say on your phpmyadmin screen? You said above you logged into Plesk as admin, but that doesn't necessarily mean you're logged into phpmyadmin as admin. (phpmyadmin is a graphical interface to mysql, and doesn't require further login. You don't need the "mysql -u admin -p" line unless you are at a OS console window.)