How to use MySQL stored procedures and routines?

MySQL stored procedures and stored routines are supported after MySQL 5.

All SiteGround clients can use MySQL stored procedures and routines  on their web hosting accounts.

To use stored procedures, you should first create a database and add a database user to it. Make sure that you select the "ALL PRIVILEGES" option when you add the user to the database.

Then you should open cPanel > PhpMyAdmin, navigate to your database, open the SQL tag and paste the stored procedure code.

Comprehensive details on MySQL stored procedures and their syntax can be found in the MySQL5 official documentation:

http://dev.mysql.com/doc/refman/5.1/en/stored-routines.html

cPanel is easy to work with when you have the right host to support you. If you need a reliable partner to help you manage your website with cPanel, check out our cPanel hosting services!

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to export/import a MySQL database via SSH

In this article we will show you how to export and import a MySQL database via SSH. Managing your...

Error about legacy type authentication (old-style) when connecting remotely to MySQL

This particular error can occur in some MySQL clients. The reason for it is that our servers...

How to change the password of a Mysql user in cPanel?

If you have already created a MySQL user through the cPanel -> Mysql Databases tool you may...

How to reset the password for a MySQL database?

You may need to change the password of your database in order to improve the security of your...

I cannot create views in MySQL

Regular MySQL users do not have privileges to create views in MySQL. If you try to execute CREATE...