SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    Nottingham England
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    New MySQL user..Need Advice

    I have just started using MySQL and am making my first attempts to get a small trial database established.

    I am using a Cobalt Raq4 server and have installed MySQL and PHP4 but I seem to be encountering a problem to which I cannot find a solution.

    I log in to my server via Telnet, navigate to MySQL and login as root giving the password I set after installation.....and I get the mysql> command prompt.

    When I try and perform any Commands I get the following error mesage "ignoring query to other database" and it doesn't seem to matter what I do, the error message is always the same, even if I switch to the "test" database.

    Consequently I can neither CREATE, SHOW or DROP anything......does anyone have any idea what the problem might be?

    Thanks and regards
    netkwake
    Last edited by netkwake; Mar 17, 2002 at 11:10.

  2. #2
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you have the database selected that you're intending to use? Once you login, type this:
    Code:
    mysql> USE [databasename];
    Thus, if the name of my database was site_point, I would use:
    Code:
    mysql> USE site_point;
    After doing this, it should return a line saying something to the effect of "database changed."

    On an additional note, you may set the database to use before logging in by using the following format:
    Code:
    mysql -h [hostname] -u [username] -p[password] [database_to_use];
    Hope this helps -- I'm not familiar with Cobalt servers specifically or what server environment they use. However, if this is not the problem, post back and let us know.

    -Colin
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    Nottingham England
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply to my despairing

    The cobalt is Unix based and runs Apache web server.

    I log on ok but not if I specify the database name, I type my host info followed by the username and then -p, I am prompted for my password which is seemingly accepted and then I get the command prompt.

    The stuff below is taken straight from my Telnet session and shows the Commands and responses I get.

    [root mysql]# mysql -h localhost -root -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 63 to server version: 3.23.36

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

    mysql> use netkwake
    Database changed
    mysql> CREATE DATABASE netkwake2;
    Ignoring query to other database
    mysql>

    The respnse is always the same even if I request info via SHOW TABLES or SHOW DATABASES.

    I haven't physically created the Netkwake database yet but the responses are still the same if I use the Test database installed with MySql......"the problem is of course that I cannot create the netkwake database because it won't let me".

    Any help would be much appreciated.

    thanks
    netkwake

  4. #4
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    Nottingham England
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Gulp: sorry

    I have just solved the problem............I hadn't created the netkwake database therefore I couldn't log into it.........I therefore logged straight into test and then created the netkwake database.

    Everything now appears to be ok.......sorry if I have wasted any of your time..

    cheers
    Ken


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •