LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 06-08-2009, 03:02 AM   #1
epamuk
Member
 
Registered: May 2007
Posts: 62

Rep: Reputation: 15
What is the reason this Mysql Error ?


What is the reason this Mysql Error ?

[root@webserver root]# mysql -u root -p;
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4534627 to server version: 4.0.13-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SELECT VERSION();
+-----------------+
| VERSION() |
+-----------------+
| 4.0.13-standard |
+-----------------+
1 row in set (0.05 sec)
mysql> SHOW DATABASES;
+----------------+
| Database |
+----------------+
| algoritma_DB |
| arsiv_haber |
| gecici_anket |
| hat_rehberi |
| hat_rehberi_v2 |
| mysql |
| navigator |
| test |
| vipar |
+----------------+
9 rows in set (0.06 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.05 sec)
mysql> GRANT ALL PRIVILEGES ON algoritma_DB.* TO 'algoritma_dbadmin@localhost' IDENTIFIED BY "h3F!jz?Z" WITH GRANT OPTION;
ERROR 1047: Unknown command
mysql>
 
Old 06-08-2009, 03:54 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Double quotes around the password?

This is what I use (recently tested on version 5.0.37 but as far as I know it also works on 4.0.23a)
Code:
mysql> grant all privileges on *.* to 'wim'@'localhost' identified by 'my password' with grant option;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
This is the example from the reference manual for v3.23, v4.0 and v4.1)
Code:
GRANT ALL ON mydb.mytbl TO 'someuser'@'somehost';
please note that user and host are treated separately (so each of them between single quotes instead of together); might be another cause of the error.


Note: check your documentation
 
Old 06-09-2009, 02:20 AM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5
Posts: 16,076

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Yeah single quotes for the passwd, precisely because it allows 'funny' chars in a passwd. Also, separate sets of quotes for user and host.
IOW, what he said
 
  


Reply

Tags
mysql


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL 5.0.67: Unable to install & run. Error /var/lib/mysql/mysql.sock' (2) peteyperson Linux - Server 2 03-04-2009 01:16 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 03:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
X gives error for no reason mandrakemikael Linux - General 4 10-26-2004 09:51 PM


All times are GMT -5. The time now is 02:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration