Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all, I have spent just about all day trying to connect a windows 2000 pc via Mysql control centre to my Redhat linux 9.0 box, running mysql. I can ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2003
    Posts
    15

    Accessing MySQL (Running on RH9) via MySQL control centre


    Hi all,

    I have spent just about all day trying to connect a windows 2000 pc via Mysql control centre to my Redhat linux 9.0 box, running mysql.

    I can view the tables from the linux boxes command shell, I have set a temp password "password".

    When I try to access the mysql database / server from windows via the mysql control centre, it returns a message "[mysqlcctmp_1] ERROR 1045: Access denied for user: 'root@192.168.2.15' (using password: YES).

    I am using the root account + its admin password (the same username / password that I use to access Mysql in the command shell on the linux box.

    I have read about granting permissions to the root password on other domains than localhost, I have done alot of searching around the net and I cant seem to find anything relivant.

    Its MySQL v. 3.23.54 running on the RH9.0 linux box, the MySQL control centre is v.0.9.3-beta running on my windows 2000 machine.

    The linux box has no firewall and I can access shares on it via samba and copy files etc.

    Any input would be appreciated.

    Thanks for reading.

  2. #2
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    You could use the cmd based client if you have shell access or do you need to get this running?

  3. #3
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    Mysql (at least v4+) IIRC 3.23x controls access based on 3 items:
    1) username
    2) password
    3) Hostname/IP address.

    By Default, the root user (with or without password) can only connect from localhost by default. Dont use the root user to connect remotely.

    Create a new user/pass specifically for what you need to do..

    ssh to your box, run:
    Code:
    user@localhost# mysql -h localhost -u root -ppassword
    mysql> GRANT ALL PRIVILEGES ON *.* TO <USERNAME>@192.168.2.15 IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
    This will create an equivilant "root" user called <USERNAME> (change this to what you want), with access to all databases/tables on the mysql server. The user will only be able to connect from 192.168.2.15, and will have a password of "some_pass". If you include "WITH GRANT OPTION" this user IIRC will be able to add new users.

    For safety purposes, if this user only needs to access one database, and is a "proper" user, this might be more appropriate:
    Code:
    user@localhost# mysql -h localhost -u root -ppassword
    mysql> GRANT ALL PRIVILEGES ON <DATABASE>.* TO <USERNAME>@192.168.2.15 IDENTIFIED BY 'some_pass';
    (Replace <USERNAME> and <DATABASE> with your own values).

    See also: http://www.mysql.com/doc/en/Adding_users.html

    Jason

Posting Permissions

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