MySQL - Creation and management of database

MySQL is fast and stable database system. It offers rich and very useful package of function and is supported by PHP and CGI scripts. Database MySQL can be used by virtual servers running on platform Linux and Microsoft Windows Server.

It's possible to create it on hosting package Complete and in multi hosting packages Firm and Expert or on VMS virtual servers.

What version of database are we offering at the moment can be found, together with other technical specifications on address versions.active24.com.

 

How to create new database? 
 

  1. Log in to Control panel.
  2. Choose virtual server, where you want the database to be created (Services/Servers and hosting/details).
  3. In Details of server click in category Databases MySQL on button Create.
  4. Edit the name of database and fill out password. By clicking on Create the database will start to create. 

Detailed walk through:

  1. Using your login information log in to Control panel. Or you can ask for a new password.
  2. After you are logged in, choose virtual server, where you want the database to be created (Services/Servers and hosting/details). 
  3. In Details of server click in category  Databases MySQL on Create button.
  4. Edit name of database (1) and fill out password (2). Login information can be send by e-mail (3). By clicking on Create(4) the database will begin to create.
  5. Database is now creating, as soon as it's created and ready to use you'll see it in Details of server  in database list (within 30 minutes).


Password change


Password for databases are encrypted, so it's not possible to simply show the currently used ones. New password can be set up easily from control panel using our walk through.
 
  1. Log in to Control panel.
  2. Choose hosting, where you want the database to be created (Services/Servers and hosting/details).
  3. In Details of server  click in category  Databases MySQL on Settings button.
  4. Click on option Password change and the form for new password will be shown.
  5. Changes will be made right after confirmation (don't forget to apply changes to your website code)
     

Detailed walk through:

  1. Using your login information log in to Control panel. Or you can ask for a new password.
  2. After you are logged in, choose a virtual server on which you want the database password to change (Services/Servers and hosting/details).
  3. In Details of server  click in category Databases MySQL on Settings button.
  4. Choose Change password(1) and in next step fill out new password(2), we recommend to use generated password(3), change needs to be confirmed by button Set (4).
     
    NOTE: After change of database password its necessary to change the config file or code of your website so it doesn't stop working.
  5. Changes will be working immediately.
     

 

How can I insert data to database?


Database can be accessed through web administration or by remote access

For connection to MySQL database you can also use ASP script (example):

User "domena_cz" with password "hesloxxx":

ConnString = "driver={MySQL};server=uvdb1.globe.cz;uid=domena_cz;pwd=hesloxxx;database=domena_cz"
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.open ConnString
SQL = "SELECT * FROM tabulka WHERE id=1" 
Set RS = Conn.Execute(SQL,,1)

In MySQL database the tables can be also locked (MySQL Lock) and created temporary tables (Temp tables).
 

NOTE: Database can be used only for services at company Active24.

 

Remote access to databases - adding IP address  

If you plan to manage database from your own computer by remote access and not through web administration, it's necessary to allow your IP address at chosen MySQL  - the IP address has to be public(static). This requirement ensures the proper function of connection to database. Your IP address has to be set up using this walk through:
 

  1. Log in to Control panel.
  2. Choose hosting, where you want the database to be created (Services/Servers and hosting/details).
  3. In Details of server  click in category  Databases MySQL on Set button.
  4. On the page you can see already Allowed IP addresses for remote access, other addresses can be added by clicking on button Add IP address.

Detailed walk through:

  1. Using your login information log in to Control panel. Or you can ask for a new password.
  2. After you are logged in, choose virtual server, where you want to manage the database (Services/Servers and hosting/details).
  3. In Details of server click in category Databases MySQL on Settings button.
  4. Table  Allowed IP addresses for remote access contain already allowed IP addresses, another address can be added by clicking on button Add IP address.
     
    NOTE: Remote access to database is possible to create for administration only.
  5. Using form add a new IP(1)and Description (2) of connection, which serve only for better orientation in settings, for function itself the description is not important.
  6. Correctly added IP address will be shown in overview Allowed IP addresses in MySQL settings.

 

MySQL optimalization - long requests  


Repeated calls of SQL processes that are performed too long or too frequently, can overload hosting or VMS server. Too long and too frequently called database requests are recommended to prevent.. 
 

How to prevent long requests to database:

  • Use indexes properly, you can learn more about using index files on database on specialized websites.
  • Give command explain before the suspect SQL query.
  • Make sure the request don't create huge temporary tables.
  • For SQL requests use cache. Where is it possible, save results to static file, from where the website can load it.
     

List of long requests

Longest lasting processes using the database are in evidence of the control panel. In a review of long-lasting queries you can stopped immediately the selected processes.

  1. Log in to Control panel.
  2. Choose hosting, where the database is created ((Services/Servers and hosting/details).
  3. In Details of server click in category  Databases MySQL on Settings button.
  4. Click on option Processes 
  5. In List of database processes you can observe or stop the processes immediately.

Detailed walk through:

  1. Using your login information log in to Control panel. Or you can ask for a new password.
  2. Choose hosting, where the database is created (Services/Servers and hosting/details).
  3. In Details of server  click in category Databases MySQL on Set button.
  4. Click on option Processes.
  5. In List of database processes you can observe or stop the processes immediately.
     

 

Database backups  

On all databases of customers are daily backups. You can create also your own manual backup. Overview of all created backups can be found in control panel. Lower in this article we describe where you can find backups overview of MySQL database. 
 
  1. Log in to control panel.
  2. Choose hosting, where you want the database to be created (Services/Servers and hosting/details). 
  3. In Details of server  click in category  Databases MySQL on Settings and then Backups button.
  4. In category Available regular automatic daily backups you can choose backup by date.
  5. In category Own manual backups you can immediately backup current data - manual backup can be downloaded from FTP of server. 
 

Detailed walk through:

  1. Using your login information log in to control panel. Or you can ask for a new password.
  2. After you are logged in, choose virtual server, where you want to find the MySQL backup (Services/Servers and hosting/details).
  3. In Details of server  click in category  Databases MySQL on Settings button.
  4. Click on Backups option.
  5. In category Available regular automatic daily backups  you can choose backup by date of creation(1). Backup can be download to your local PC by button Download backup(2).

Backup restore of database (data import)

  1. Download backup to your local PC from backup overview, more info here: Database backups.  
  2. Log in to MySQL administration.
  3. Click on Import option.
  4. Choose a backup file from your PC and start the upload by clicking on Go.

Detailed walk through:

  1. In backup overview of chosen database download the archive of needed backup. How to find backup overview is described in Database backups (3 - 5).
  2. When you have archive of backup ready in your local PC, log in to MySQL administration(1). Fill out username(2)and password(3)- log in by clicking Go(4). Login information were send on your contact e-mail, when the database was created, or you can ask for a new password.
  3. Click on Import option.
  4. Choose file (1), that has to be imported, upload of backup will start after clicking on Go((2)
  5. If the upload of backup was successful this information will be shown:
    NOTE: In case the database you are trying to import is too big, upload it on FTP and send us authorized request. We will import it for you.