MySQL Database improperly setup?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Saqib Ali

    MySQL Database improperly setup?

    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:


    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_000 0000000
    -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.local domain.err
    -rw-rw---- 1 mysql mysql 6 Sep 25 02:10
    localhost.local domain.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.fr m
    -rw-rw---- 1 mysql mysql 0 Sep 24 22:19
    columns_priv.MY D
    -rw-rw---- 1 mysql mysql 1024 Sep 24 22:19
    columns_priv.MY I
    -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 ..
  • Aggro

    #2
    Re: MySQL Database improperly setup?

    Saqib Ali wrote:
    [color=blue]
    > % 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;[/color]

    Try:

    % mysql -u root

    ....

    mysql> show databases;

    And if that doesn't work, try also:
    mysql> use mysql;

    Comment

    • Bill Karwin

      #3
      Re: MySQL Database improperly setup?

      Saqib Ali wrote:[color=blue]
      > 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.[/color]

      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.

      Comment

      Working...