---
title: 'VestaCP: Database without user prefix | Zomro'
description: 'Sometimes we need to create a database without a user prefix, for example when migrating a project from another server.'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a43@server-panel.net/2022/06/01/1656137641_1656137612623.png'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [FAQ](https://zomro.com/blog/faq/)
  * VestaCP: Database without user prefix. 



# VestaCP: Database without user prefix.

25-06-2022

In the VestaCP panel, when creating a new database, the user prefix is automatically added.  
![VestaCP: Database without user prefix. - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a43@server-panel.net/2022/06/01/1656137641_1656137612623.png)The database prefix is useful, it helps to better navigate when viewing all the created databases and slightly improves the security of the site, since attackers will have to guess not only the mysql user, but also the panel user under which the database was created.  
We highly discourage using simple usernames and passwords on the server as this puts your data at risk.  
  
We connect to the server via ssh using the data from the root user;  
  
Copy the vesta script file, which is responsible for creating databases;
    
    
    # cp /usr/local/vesta/bin/v-add-database /usr/local/vesta/bin/v-add-database-no_prefix

  
Open a new file (for example using: vi, vim, nano);
    
    
    # vi /usr/local/vesta/bin/v-add-database-no_prefix

  
We are interested in lines 20 and 21; they need to be edited and saved;  
Before:
    
    
    database="$user"_"$2"
    dbuser="$user"_"$3"

After:
    
    
    database=$2
    dbuser=$3

  
Now we can execute it by specifying the necessary parameters;
    
    
    # v-add-database-no_prefix USER DATABASE DBUSER DBPASS

  * **USER** \- VestaCP panel user
  * **DATABASE** \- database name
  * **DBUSER** \- mysql user for database
  * **DBPASS** is the password of the specified mysql user



If you specify an existing database user, then the password for that user will be changed.  
![VestaCP: Database without user prefix. - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a43@server-panel.net/2022/06/01/1656137513_1656137460832.png)  
Done. Now we can create databases and users without a prefix when needed.

Similar articles:

[How to connect to a server via FTP, SFTP, and SCP](https://zomro.com/blog/faq/144-kak-podkljuchitsja-k-serveru-po-ftp-sftp-i-scp) [How to set up a Samba server on Linux and connect to it from Windows Server 2019](https://zomro.com/blog/faq/334-how-to-set-up-a-samba-server-on-linux-and-connect-to-it-from-windows-server-2019) [How to install MariaDB 10.8 on CentOS 7 or upgrade from mysql 5.7](https://zomro.com/blog/faq/255-kak-ustanovit-mariadb-108-v-centos-7-ili-sdelat-upgrade-s-mysql-57) [Migration of trading terminals from Forex‑Box to Zomro](https://zomro.com/blog/faq/647-transferring-trading-terminals-from-forexbox-to-zomro) [How to install and configure MySQL on Windows Server](https://zomro.com/blog/faq/364-how-to-install-and-configure-mysql-on-windows-server)

[ Dedicated servers from €88.80/mon ](/dedicated-servers)
