LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-10-2003, 11:16 PM   #1
verokard
LQ Newbie
 
Registered: Jul 2003
Location: Tangerang, Indonesia
Posts: 5

Rep: Reputation: 0
Question MySQL Instruction error


Hi !!!, I'm new in MySQL.
So please help me......

The Server is running, but when i want to use :
mysql> SELECT VERSION(), CURRENT_DATE;
the message appear like below statement :
bash : syntax error near unexpected token `('


Regards
Verdi



 
Old 07-10-2003, 11:42 PM   #2
ann_tulip18
Member
 
Registered: Jul 2003
Posts: 31

Rep: Reputation: 15
the syntax for select statement is this:

Select <column name1>, .. <columnameN> into <tablename>;
 
Old 07-11-2003, 01:31 AM   #3
verokard
LQ Newbie
 
Registered: Jul 2003
Location: Tangerang, Indonesia
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for your advise, but i got this instruction from MySQL Manual book as follow :

Here's a simple command that asks the server to tell you its version number and the current date. Type it in as shown here following the mysql> prompt and press Enter:

mysql> SELECT VERSION(), CURRENT_DATE;
+--------------+--------------+
| VERSION() | CURRENT_DATE |
+--------------+--------------+
| 3.22.20a-log | 1999-03-19 |
+--------------+--------------+
1 row in set (0.01 sec)
mysql>
 
Old 07-11-2003, 01:56 AM   #4
ann_tulip18
Member
 
Registered: Jul 2003
Posts: 31

Rep: Reputation: 15
Mine is working fine.. are you sure you installed it properly??

Try to exit in mysql and then log in again, then type again the select statement.


 
Old 07-11-2003, 02:14 AM   #5
IceNineJon
Member
 
Registered: Jun 2002
Location: Los Angeles, Ca, USA
Distribution: Mandrake 9.1
Posts: 82

Rep: Reputation: 15
verokard, are you sure you're in the mysql program? You need to run "mysql -u <yourusername> -p" to first get into the mysql prompt and then type in your commands. It seems like you're trying to run "SELECT VERSION(), CURRENT_DATE;" from your bash shell.
 
Old 07-11-2003, 04:28 AM   #6
verokard
LQ Newbie
 
Registered: Jul 2003
Location: Tangerang, Indonesia
Posts: 5

Original Poster
Rep: Reputation: 0
OK, I'll try
Thanks Ice9
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
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
Mplayer Illegal Instruction error visualnoise Linux - Software 4 02-28-2005 03:49 PM
MySQL Instruction error verokard Programming 1 07-11-2003 06:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:26 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration