Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2013
    Posts
    23

    Unanswered: Connecting to MySQL - as a USER I created

    I am new to MySQL not to DBMS.

    MySQL 5.5 on Ubuntu 13.04/64.

    I have the MySQL instance running, I log in as root:
    mysql -u root

    And create a user and database and grant access to the database to the user:

    mysql> create user 'import_dbms_user' identified by 'import_dbms';
    Query OK, 0 rows affected (0.00 sec)
    mysql> create database import_dbms_db;
    Query OK, 1 row affected (0.00 sec)
    mysql> grant ALL on import_dbms_db.* to import_dbms_user;
    Query OK, 0 rows affected (0.00 sec)

    Then I log out as root and try to log in from terminal as:

    mysql -h 127.0.0.1 -u import_dbms_user -D import_dbms_db -p
    Enter password:
    ERROR 1045 (28000): Access denied for user 'import_dbms_user'@'localhost' (using password: YES)

    mysql -h localhost -u import_dbms_user -D import_dbms_db -p
    Enter password:
    ERROR 1045 (28000): Access denied for user 'import_dbms_user'@'localhost' (using password: YES)

    I even tried the -P port option.

    I am trying to understand what I may be doing wrong?

    I am logging in from localhost by I do have my allow_external.cnf as:
    [mysqld]
    bind-address = 0.0.0.0

    Are there any other params or such to have any user log in from localhost or any machine in network.

    I am trying to set up a database to run some Python scripts to load some data so I need to be able to connect from the Python script.

    Thank you for your suggestions and help.

    Mono

  2. #2
    Join Date
    Jun 2013
    Posts
    23
    Please ignore. I have sorted it out.

    Running FLUSH PRIVILEGES worked.

Posting Permissions

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