Artikel weiterleiten
Print version
FAQ #567

This is how you can use our MySQL database


MySQL is currently the most popular open source database management system. In order to manage, process and access large data quantities, MySQL databases are important tools for efficient usage. MySQL databases are particularly important for websites with dynamic content.
 

Content
Your database at STRATO
Useful background knowledge
PHP-Access to the MySQL database

SSH access to the MySQL database

Number of available databases in your package


 
Your database at STRATO
 
In order to be able to work with your database, first create it in the password-protected Customer Service Area. Please log in with your customer number and your customer password first and then select the desired package in the bottom right window via the Go to package button.

You will then see the menu structure on the left side. Now select the menu options Administration and Database Administration. Click on Create database , in order to create a database.
 
 
 
The database is created immediately. You will receive an overview illustration which shows which names and which MySQL version your database has. This is structured according to the pattern DBxxxxxx whereby "xxxxxx" is replaced with a number. Remember this number. You need it to access your database.
 
AchtungNow assign a password for the database, because otherwise you will not be able to access the database. Click on the Change password link. You can change the password again at a later point in time as desired. In addition to your password selection, the security strength is displayed in a bar diagram. Please also read the following:
 

 

If you no longer need a database, you can remove it again with the Delete button.
 
AchtungPlease remember that when deleting a database, all content and any existing automatic backups are lost as well.
 
For the most common Content Management Systems (CMS ), you will usually always need the following basic information:
 
Datenbank(name): DBxxxxxx
Benutzername: Uxxxxxx
Passwort: ihr selbst vergebenes Passwort in der Datenbankverwaltung (s.o.)
Datenbanktyp: MySQL
Server(name): rdbms.strato.de
 
Useful background knowledge

MySQL currently supports a part of the SQL standard. Limitations exist with regard to the following points:

  • Interleaved queries according to the "SELECT * FROM table1 WHERE id IN (SELECT id FROM table2);" pattern are not possible.
  • SELECT... INTO TABLE is not possible

Also refer to:

Beachte auch How can I access the database with phpMyAdmin?

PHP access to the MySQL database
 
For a connect via PHP, you need to enter the MySQL server. At STRATO this is rdbms.strato.de (instead of "localhost").

As a password, enter the password that you assigned after creating the database in the customer service area.

An example script showing what a connection establishment may look like in PHP can be found here. Please enter the corresponding information on your database between the quotation marks after db_user, db_password and db_name.
 
# Access data
$db_server = 'rdbms.strato.de';
$db_user = '';
$db_passwort = '';
$db_name = '';

# Connection establishment
if(mysql_connect($db_server, $db_user, $db_password)) {
echo 'Server connection successful, select database...
';
if(mysql_select_db($db_name)) {
echo 'Server connection successful, select database ...
}
else {
echo 'The specified database could not be selected, please check the information you have entered!';

}
}
else {
echo 'Connection not possible, please check data!

';
echo 'MYSQL-error: '.mysql_error();
}
?>

 
When specifying the database and user name, please pay attention to the capitalization of the letters DB in DBxxxxxx and U in Uxxxxxx. A connection using lower case letters will fail.
 

SSH-access to the MySQL database

Through the command prompt interpreter "MySQL Monitor", you can access your MySQL database with an SSH client such as PuTTY. To do this, establish a connection with the internet and start your SSH program.
 
 

Please enter ssh.strato.de as your host name.

When the connection to the server has been established, your login name and password will be requested.

Enter a domain from your package as the login name, for example desiredname.de. Confirm the input by pressing the return key. Enter your master password that you assigned in the customer service area as the password. The password is not displayed during input.

 

What is the master password and what is it needed for?

 

Note
If you received an error message while logging in through SSH or the PuTTY program window simply closes, please check if you entered your access data correctly.

If the data is correct and the login still does not work, please check the SiteGuard settings as well in your password-protected customer service area.

 

What is STRATO SiteGuard and how do I set it up?

If you have successfully logged in, your domain name will appear in the next line, followed by an "angle bracket", which means that you can execute "commands".Enter the following command after it to call up the MySQL monitor:

Enter the following command after it to call up the MySQL monitor:
 
mysql -h rdbms -u Uxxxxxx -p DBxxxxxx
 
Please replace each Uxxxxxx and DBxxxxxx with the data from your database that was assigned to you when you created it.

Confirm the input by pressing the return key. It will ask for your password. This is the database password you chose in the customer login. After pressing return, you will receive a notification that you are now in the MySQL monitor and will see the following prompt: mysql>.

You can now execute the desired MySQL commands, for example: "SELECT * FROM addresses", in order to display the entire "Addresses" table. The first time you open it, however, you have to first create tables for the database.
 
The official homepage from MySQL with comprehensive information can be found under http://dev.mysql.com/doc/


Also refer to:
How can I access the database with phpMyAdmin?

 

Available databases in your hosting package

 

The number of MySQL databases contained in your package can be viewed directly in your customer service area. To do this, open the menu option Your Package auf. In the Information about your technical features area, you will have an overview of the available databases and databases in use from your package.
 
 
 
×
Was this article helpful?    yes / no