Skip to main content

Connecting to MySql Server Remotely


When you get an error message like this:

javax.security.sasl.AuthenticationException:  Database Error: java.sql.SQLException: null,  message from server: "Host 'xx.xx.xx.xx' is not allowed to connect to this MySQL server"

It show that you are not configured the MySql Server correctly. To configure a MySql Server for accessing remotely you need to grant permission for the client in the Server. Here is the Linux command line codes:

root@server:~#  mysql -u<username> -p<password>       - log in to MySql
> grant all on cheque_alert.* to '<user>'@'<IP address of remote system>';

This will grant all permission to the client machine from the IP:xxx.xxx.xx.xxx

To view the permission for any client:
> SHOW GRANTS FOR '<user>'@'xxx.xxx.xx.xxx';
  eg.: SHOW GRANTS FOR 'root'@'11.111.105.111';

To remove the Grant/permission :
 > DROP USER '<user>'@'xxx.xxx.xx.xxx';
  eg.:  DROP USER 'root'@'11.111.105.111';


The SQL commands can also be used in Windows System.

Comments

Popular posts from this blog

How to Connect mysql through JDBC connector through Tomcat or externally.

Solution: This can happen for a variety of reasons. I just saw it myself a few weeks ago but I can't remember what the fix was for me. 1) Verify the address mysql is bound to, it's probably 127.0.0.1 (only) which I believe is the default (at least on standard Ubuntu server). You'll have to comment out the bind-address parameter in my.cnf to bind to all available addresses (you can't choose multiple, it's one or all). 2) If it is bound to 127.0.0.1 and you can't connect using "localhost", make sure it's not resolving to the IPv6 localhost address instead of IPv4. (or just use the IP address) 3) Double and triple-check the port that mysql is listening on. 4) Make sure you're using the right JDBC connector for your JDK. 5) Make sure you're not doing something really silly like starting mysql with --skip-networking.

Re-programming Ubislate 7C+

Re-Programming / Flashing Ubislate 7c+ This procedure of flashing / re-programming will help you to solve many problems as below... Tablet Stuck at home screen, Freezed Any Software related bug, developed later on which can't be solved with Factory reset. Since this is the procedure from Datawind itself, so you don't need to worry before doing any step. You need 1 tool & 1 image file before starting the process. Phoenix Card SW Any Micro SD Memory Card Image file - SW for Ubislate, 281 Mb  Steps:- 1)    Kindly download the Phoenix card software from here.         https://mega.co.nz/#!coc0HTQJ!WpZmCGRdGwXnzCOaUInqpBzMfDtFjCwEqVWfPg16N20 2)    Extract PhoenixCard.rar by using Winzip or Winrar. 3)    Then download the image file which is SW for your tablet from below link (281 Mb) https://mega.co.nz/#!Iwt1SLhL!eSTrg0vtswcZBUszaeSSmyHjt6QlD2U1LJE0MDV5qOc 4)    And ...

Enable Wifi (if not working) in Ubislate / Aakash Tablet

After doing below commands the wifi works in Ubislate 7c+: a)  Install "terminal emulator" in the device (copy the apk to device using memory card or data cable connection). b) Open terminal emulator type the following two commands & press enter after each > su > insmod /vendor/modules/8192cu.ko c) Open wifi in the settings and on/off wifi d) It works!!! WiFi will be worked till reboot. After reboot/restart device you need to run the command again Terminal Emulator.