Hi, So I tried to connect to SkyWeather Table on localhost from other computer in LAN. I am not able to login as admin. Anybody has any ideas what is going wrong. How to properly run MySQL server which is MariaDB, but I guess that connecting is exactly the same as with MySQL.
You will need to put a remote user in the user database. The default user creation uses host 'localhost' which is the system where the database resides
From my mysql MariaDB [mysql]> select user, host from user; +------------+-----------+ | user | host | +------------+-----------+ | phpmyadmin | localhost | | root | localhost | | weather | localhost | +------------+-----------+ 3 rows in set (0.001 sec) You can see that for all 3 users the host is localhost.
You will need to create another user with the host that you are trying to connect from.
mysql> create user 'username'@'somehost' identified by 'somepassword';
The remote host name/ip needs to be in the /etc/host file or you could use the IP instead of the host name in the above command
you would then need to grant privileges to that user so they can read/modify the tables
The following will give all privileges to the user - you may or may not want that - see the docs for granting privileges.
mysql> grant all privileges on SkyWeather2.* to 'username'@'somehost;
The remote host's name/ip needs to be in the /etc/host file or you can use the ip address in the create instead of the host name.