MySQL databases are an important aspect of your web server. With Vesta CP is very easy to create databases and users.
How to create a MySQL database and a user for it:
1. Access VestaCP at yourdomain.com:8083
2. From the top menu choose DB
3. You will see a list of active databases. To add a new database, click the ADD DATABASE button
4. Enter your Database name, the User, Password (the system can generate a strong password for you), Charset (uft8 is the default).
5. Click the Add button. The new database and user will be created and you will see a confirmation message Database user_dbname has been created successfully.
Also, you will see a link open phpMyAdmin . If you click on it the VestaCP will open the phpMyAdmin interface. To access it you will need to enter the username and the password for the database you want to work with.
4. Now enter:
– Action: Drop if you want to block traffic; Accept if you want to allow traffic
– Protocol: TCP, UDP or ICMP
– Port: the port(s) you want to block/allow. Example: 80 ; 80-120.
– IP: the IP(s) you want to block/allow.
– Comment: any comment for the rule.
When done, click the Add button.
5. You will see the new rule in the firewall rules list:
6. Also, you can EDIT, SUSPEND or DELETE rules. Just click the button for your desired action.
Many times, you will need to change the PHP settings on your web server. For example you may want to change the values for memory_limit, upload_max_filesize etc.
To change the PHP settings in Vesta CP:
1. Log into VestaCP
2. From the top menu click on Server
3. On the page that opens, look for httpd entry and click the CONFIGURE button on that row.
4. Click the CONFIGURE PHP.INI link
5. You will see the basic interface for PHP settings. Here you can change the most used PHP settings like: max_execution_time, max_input_time, memory_limit, error_reporting, display_errors, post_max_size, upload_max_filesize.
6. At the bottom of the page there is a link to Advanced Options. Click it if you want to alter other PHP settings.
7. Another page will open.
8. When done editing basic or advanced PHP options, click the Save button.
If you prefer you can change the PHP settings from the command line. Just edit the /etc/php.ini file in your preferred text editor (vi, nano etc). For example: