By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,701 Members | 1,955 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,701 IT Pros & Developers. It's quick & easy.

MySQL Database improperly setup?

P: n/a
I installed mySQL and have it running.... but I think I made a
mistake somewhere along the line...... I believe I did follow the
instructions that were provided with the distribution at:
http://dev.mysql.com/downloads/

The database is up. It seems that a test database
instance has been created (named "test"). I can see
it. However, the other database instance that should
have been created, named "mysql" doesn't show up when
I do "show databases". (see below). I think that particular
instance is required for things to work right.

I have also included directory listings of my
/usr/local/mysql directory so you can see that files
for the "mysql" instance really have been created,
with the proper permissions.
Has anyone ever run into this issue? If so do you know
how to get around it??

Thanks......



% mysql
Welcome to the MySQL monitor. Commands end with ; or
\g.
Your MySQL connection id is 7 to server version:
4.0.21-standard

Type 'help;' or '\h' for help. Type '\c' to clear the
buffer.

mysql> show databases;
+----------+
| Database |
+----------+
| test |
+----------+
1 row in set (0.00 sec)
mysql> quit;



[root@localhost data]# pwd
/usr/local/mysql/data
[root@localhost data]# ls -al
total 20576
drwxr-x--- 4 mysql users 4096 Sep 25 02:10 .
drwxr-xr-x 14 root root 4096 Sep 24 22:20 ..
-rw-rw---- 1 root mysql 25088 Sep 24 23:15
ib_arch_log_0000000000
-rw-rw---- 1 root mysql 10485760 Sep 25 02:10 ibdata1
-rw-rw---- 1 root mysql 5242880 Sep 25 02:10 ib_logfile0
-rw-rw---- 1 root mysql 5242880 Sep 24 23:15 ib_logfile1
-rw-rw---- 1 mysql root 5955 Sep 25 02:10
localhost.localdomain.err
-rw-rw---- 1 mysql mysql 6 Sep 25 02:10
localhost.localdomain.pid
drwxr-x--- 2 mysql mysql 4096 Sep 24 22:19 mysql
drwxr-x--- 2 mysql mysql 4096 Sep 6 23:23 test
[root@localhost data]# ls -alR mysql test
mysql:
total 112
drwxr-x--- 2 mysql mysql 4096 Sep 24 22:19 .
drwxr-x--- 4 mysql users 4096 Sep 25 02:10 ..
-rw-rw---- 1 mysql mysql 8778 Sep 24 22:19
columns_priv.frm
-rw-rw---- 1 mysql mysql 0 Sep 24 22:19
columns_priv.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 24 22:19
columns_priv.MYI
-rw-rw---- 1 mysql mysql 9088 Sep 24 22:19 db.frm
-rw-rw---- 1 mysql mysql 306 Sep 24 22:19 db.MYD
-rw-rw---- 1 mysql mysql 3072 Sep 24 22:19 db.MYI
-rw-rw---- 1 mysql mysql 8641 Sep 24 22:19 func.frm
-rw-rw---- 1 mysql mysql 0 Sep 24 22:19 func.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 24 22:19 func.MYI
-rw-rw---- 1 mysql mysql 9064 Sep 24 22:19 host.frm
-rw-rw---- 1 mysql mysql 0 Sep 24 22:19 host.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 24 22:19 host.MYI
-rw-rw---- 1 mysql mysql 8877 Sep 24 22:19
tables_priv.frm
-rw-rw---- 1 mysql mysql 0 Sep 24 22:19
tables_priv.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 24 22:19
tables_priv.MYI
-rw-rw---- 1 mysql mysql 9806 Sep 24 22:19 user.frm
-rw-rw---- 1 mysql mysql 248 Sep 24 23:55 user.MYD
-rw-rw---- 1 mysql mysql 2048 Sep 24 23:58 user.MYI

test:
total 8
drwxr-x--- 2 mysql mysql 4096 Sep 6 23:23 .
drwxr-x--- 4 mysql users 4096 Sep 25 02:10 ..
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Saqib Ali wrote:
% mysql
Welcome to the MySQL monitor. Commands end with ; or
\g.
Your MySQL connection id is 7 to server version:
4.0.21-standard

Type 'help;' or '\h' for help. Type '\c' to clear the
buffer.

mysql> show databases;


Try:

% mysql -u root

....

mysql> show databases;

And if that doesn't work, try also:
mysql> use mysql;
Jul 20 '05 #2

P: n/a
Saqib Ali wrote:
However, the other database instance that should
have been created, named "mysql" doesn't show up when
I do "show databases". (see below). I think that particular
instance is required for things to work right.


Indeed, that is correct.

Try running the mysql tool with specifying a user:

$ mysql -u root

Only the test database is set up with wide open privileges (I mean mysql
privileges, which are different from the Unix file permissions). Other
databases often require some user.

Bill K.
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.