You can write this code in any sql tools with little differences:
Here is the example for phpMyAdmin:
create procedure getStudentById(varId int)
begin
select * from student where student_id=varId;
end$$
Note: for phpMyAdmin do not forget to change the Delimiter to what you have use in the sql script. In the above case, the Delimiter must be $$.