Skip to main content

Connecting to external MySQL db: "ERROR 1045 (28000): Access denied for user"

Comments

5 comments

  • sktest123
    Seems you have mysql remote server settings all ok in cpanel server, it might be privileges issue in remote server. In remote mysql server, run mysql> GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'1.2.3.4' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION; Replace it with needed db (db name), user and ip ,passwd Then flush privileges
    0
  • qtriangle
    Seems you have mysql remote server settings all ok in cpanel server, it might be privileges issue in remote server. In remote mysql server, run mysql> GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'1.2.3.4' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION; Replace it with needed db (db name), user and ip ,passwd Then flush privileges

    That's not the case. I have allowed connections for user@*, and I had already mentioned: However, I am able to connect to the external DB from a third server using shell. It means something on the cpanel server stops external mysql connctions.
    0
  • cPanelMichael
    Hello, Do you have any firewall rules restricting outgoing traffic over port 3306? What rules exist in your system's /etc/my.cnf file? Thank you.
    0
  • qtriangle
    Hello, Do you have any firewall rules restricting outgoing traffic over port 3306? What rules exist in your system's /etc/my.cnf file? Thank you.

    I have csf with status: "Firewall Status: Disabled and Stopped" my.cnf has following values:
    [mysqld] innodb_file_per_table=1 default-storage-engine=MyISAM performance-schema=0 max_allowed_packet=268435456 open_files_limit=10000 query_cache_size=64M query_cache_limit=1M join_buffer_size=8M sort_buffer_size = 8M read_buffer_size = 8M read_rnd_buffer_size = 4M max_heap_table_size = 50M innodb_buffer_pool_size = 1G table_open_cache = 4000 key_buffer_size = 128M tmp_table_size = 128M myisam_sort_buffer_size = 64M
    0
  • cPanelMichael
    Hello, Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you.
    0

Please sign in to leave a comment.