Apologies if this is an easy one, I'm stumped!

I'm having some trouble with syntax running MySQL from the command line.

I'm running MySQL 4.1.1-alpha from the OS X standard installer package on
a G5 running panther.

I have logged into MySQL as the root user, providing the correct password,
and I wish to see a list of the databases I have available, so I enter the
following command:

mysql> show databases;

I get back the following:

ERROR:
No Query Specified

If I try again, adding a 'Like' clause, things clear up:

mysql> show databases like '%';
+----------------------------+
| Database (%)               |
+----------------------------+
| cme_admin                  |
| cme_course_administration  |
| cme_course_finances        |
| cme_course_info            |
| cme_faculty_info           |
| cme_public                 |
| cme_user_data              |
| mysql                      |
| test_course_administration |
| test_course_finances       |
| test_course_info           |
| test_faculty_info          |
+----------------------------+

This same type of problem is cropping up in a number of different
settings.  For example, I can use the test_course_info database:

mysql> use test_course_info;
Database changed

But trying to show the tables in this database suffers from another syntax
problem:

mysql> show tables from test_course_info;
ERROR 12 (HY000): Can't read dir of './test_course_/' (Errcode: 2)

It seems that the full name of my database is not being read for some
reason.  So I try just to show tables, after all, I am using the proper
database, right?

mysql> show tables;
ERROR:
No query specified

So what if I try the same as before, and use wildcards?

mysql> show tables like 'tbl%';
+-----------------------------------+
| Tables_in_test_course_info (tbl%) |
+-----------------------------------+
| tblcoursecomments                 |
| tblcoursedaterepeatexceptions     |
| tblcoursedaterepeats              |
| tblcoursedates                    |
| tblcoursedatesubgroups            |
| tblcoursefaculty                  |
| tblcourselocations                |
| tblcourses                        |
| tblcoursesponsors                 |
| tblcoursetypes                    |
| tbldaterepeatperiod1s             |
| tbldaterepeatperiod2s             |
| tbldays                           |
| tblensessions                     |
| tbllocations                      |
| tblregfromaccess                  |
| tblsponsors                       |
+-----------------------------------+
17 rows in set (0.00 sec)


Similar problems are showing up with things as simple as a select query:

mysql> select * from tblcourses;
ERROR 1096 (HY000): No tables used

BUT I JUST LOOKED!!!!  There is in fact a table called tblcourses in the
databases.  What am I doing wrong here?

So, lets try to see the columns in this table:

mysql> show columns from tblCourses;
ERROR:
No query specified

mysql> show columns from tblCourses like '%';
**Big list of columns deleted to save space**

One of the colums is called course_id (it's the primary key, in fact).
Lets try to select that column:

mysql> select course_id from tblCourses;
ERROR 1054 (42S22): Unknown column 'course_' in 'field list'

Once again, we seem to be missing everything after the final underscore in
the column name.

I'm stumped as to why these queries are not working.  Does anyone have
suggestions for me?

Thanks,

Cris

********************************
Cris Ewing
CME and Telehealth Web Services
University of Washington
School of Medicine
Work Phone: (206) 685-9116
Home Phone: (206) 365-3413
E-mail: [EMAIL PROTECTED]
*******************************


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to