Page 1 of 1

Unable to create database from control panel

Posted: Mon Jul 03, 2023 6:57 pm
by Ending7654
Hello

When I try to create the database in the Control Panel the database shows it's added, but when I log into mysql on the server and do SHOW DATABASES; it is not actually there. I have tried a bunch of stuff, so it looks easier to me to just show the config I have below.

Any hints towards the right direction are greatly appreciated.

I have confirmed the MySQL/MariaDB creds are correct this way:

Code: Select all

[root@vestacp conf]# mysql -h localhost -u root -p<correctPW>
Welcome to the MariaDB monitor.  Commands end with ; or \g.

[root@vestacp conf]# mysql -h localhost -u root -pPassWordWrong
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
This is the error log in vestacp log directory

Code: Select all

[root@vestacp vesta]# tail -f error.log
2023-07-02 15:19:12 v-add-database  'admin' 'db' 'user' '******' 'mariadb' 'localhost' 'utf8' [Error 2]
2023-07-02 15:44:06 v-add-database  'admin' 'db' 'user' '******' 'mariadb' 'localhost' 'utf8' [Error 2]
And it looks like I am using MariaDB

Code: Select all

[root@vestacp vesta]# service mysql status
Redirecting to /bin/systemctl status mysql.service
● mariadb.service - MariaDB 10.6.13 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Sun 2023-07-02 15:40:53 CEST; 29min ago
v-list-database-types

Code: Select all

[root@vestacp ~]# v-list-database-types
TYPE
----
mariadb
v-list-database-hosts

Code: Select all

[root@vestacp ~]# v-list-database-hosts
HOST       TYPE     MAX_DB  DB_USED  SPND  TIME      DATE
----       ----     ------  -------  ----  ----      ----
localhost  mariadb  500     5        no    22:39:10  2021-01-25
my.cnf.d server.cnf

Code: Select all

[root@vestacp my.cnf.d]# cat server.cnf
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#

# this is read by the standalone daemon and embedded servers
[server]

# this is only for the mysqld standalone daemon
[mysqld]

#
# * Galera-related settings
#
[galera]
# Mandatory settings
#wsrep_on=ON
#wsrep_provider=
#wsrep_cluster_address=
#binlog_format=row
#default_storage_engine=InnoDB
#innodb_autoinc_lock_mode=2
#
# Allow server to accept connections on all interfaces.
#
#bind-address=0.0.0.0
#
# Optional setting
#wsrep_slave_threads=1
#innodb_flush_log_at_trx_commit=0

# this is only for embedded server
[embedded]

# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]

# This group is only read by MariaDB-10.6 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.6]
vestaCP config dir vesta.conf

Code: Select all

[root@vestacp conf]# cat vesta.conf
WEB_SYSTEM='httpd'
WEB_RGROUPS='apache'
WEB_PORT='80'
WEB_SSL_PORT='443'
WEB_SSL='mod_ssl'
STATS_SYSTEM='webalizer,awstats'
FTP_SYSTEM='vsftpd'
CRON_SYSTEM='crond'
BACKUP_SYSTEM='local'
LANGUAGE='en'
VERSION='0.9.8'
DB_SYSTEM='mariadb'
mariadb.conf

Code: Select all

[root@vestacp conf]# cat mariadb.conf
HOST='localhost' USER='root' PASSWORD='<private>' CHARSETS='UTF8,LATIN1,WIN1250,WIN1251,WIN1252,WIN1256,WIN1258,KOI8' MAX_DB='500' U_SYS_USERS='admin' U_DB_BASES='5' SUSPENDED='no' TIME='22:39:10' DATE='2021-01-25'
.mariadb.localhost

Code: Select all

[root@vestacp conf]# cat .mariadb.localhost
[client]
host='localhost'
user='root'
password='<private>'