MYSQL

SQL Remote Login in JustHost/Add your IP

Justhost lets you remote login into your database so you can manage your database remotely. All you have to do is go to “Remote MySQL” Under “Databases” in CPanel. Enter your IP to allow remote access. Add this IP in your client software, username and password and it should work. But there are some problems

  • Justhost might show your a wrong IP Address! Simpley by clicking Add button provided on the page, will not work. Find your public IP using google search and then add that IP
  • DNS Name like your domain might not work for some reason. May the client accepts only IP address. So use IP address instead.
  • In Sequel Pro, use the standard option to connect

Passing Parameters to MySQL Stored Procedure

MySQL Stored Procedure parameter does not take @ sign. The variables are declared using identifier name (without the @sign). In some editors like PHPMYADMIn, you might declare a variable with @ sign and may not get any error but your code will not work correctly. To fix this issue, simply remove @sign.

This also leads to an interesting scenario. If your parameter name is same as one of your table field, you will have to use alias to different the two. For example

My variable name is ID, but that is also the field inside my student table. To fix the issue, use this syntax

 

Passing Parameters to SQL Stored Procedure