I tired to set up the MySQL Server for remote connections on database created via Virtualmin but to no avail, I search for documentations, my 3306 port is open (I checked), I have user permissions and database permissions set up normally but nothing seems to make me able to make it work.
I need this remote connection for development purposes
When trying to set up that connection I realise it seems I canât even run a simple âmysql -u root -pâ as it says âEnter password: ERROR 1045 (28000): Access denied for user ârootâ@âlocalhostâ (using password: NO)â Just running âmysql -u rootâ as the same effect, as it seems my root donât have access to it, tho I do have access to the MySQL Database module in Webmin and can change the config as I see fit.
Now the second issue wouldnât be an issue tbh, but I have the feeling itâs in correlation or needed to be fixed to resolve the first issue.
If anyone could help, itâd be appreciated I donât seem to find anything to help me and I am starting to go crazy. I can provide screenshots or whatever information on the current config as needed.
did you set the database server to listen on all interfaces (0.0.0.0) ? TBH using such an old version of webmin & an unsupported OS you may start to develop all sorts of issues, this may be the time to update both.
Iâve tried with âAnyâ but not a manual â0.0.0.0â inputted. Would that make any difference?
I may try to update both, but I have things running on it so having a downtime is a bit of an issue for me. Iâd rather find a solution on the current solution if possible âŠ
have you allowed root access in the Database permissions?
Ok Iâm getting the same issue, I think the root password is not the password used for the system root.
Maybe reset the root password in the mysql user root via User Permissions in Mysql.
Worked for me
root@server:~# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 46
Server version: 10.5.22-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type âhelp;â or â\hâ for help. Type â\câ to clear the current input statement.
Just to be clear you are entering a password as it should say YES if the password fails if you just hit enter it will say NO
like this
root@server:~# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user ârootâ@âlocalhostâ (using password: YES)
root@server:~# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user ârootâ@âlocalhostâ (using password: NO)
root@server:~#
The first line is with a incorrect password therefore response is (using password: YES)
Second line I just hit enter with no password therefore (using password: NO)
This might seem a silly approach to the problem but
Why not start a new VM clean with spanking new up-to-date OS and GPL Virtualmin with everything up-to-date and use that as a test environment to resolve the problem. Then at least you will know what is at fault.