Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Database Server
  • Search

adding new database error

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
Post Reply
  • Print view
Advanced search
9 posts • Page 1 of 1
Teo
Posts: 97
Joined: Mon May 11, 2015 9:17 am

Os: CentOS 6x
Web: apache + nginx
adding new database error
  • Quote

Post by Teo » Tue Jun 23, 2015 9:17 am

Hello,

i cannot add any database because it doesn't set localhost as host automatically anymore from 2day. In the scroll down menu there is no option as well..

thanks.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: adding new database error
  • Quote

Post by skurudo » Wed Jun 24, 2015 2:52 pm

It's sad to hear this. But give more info about what you do and your system.
Top

Teo
Posts: 97
Joined: Mon May 11, 2015 9:17 am

Os: CentOS 6x
Web: apache + nginx
Re: adding new database error
  • Quote

Post by Teo » Thu Jun 25, 2015 10:49 am

OS: Centos 6.6

system is a Xen VPS 2 Gb RAM - 2 Core

just it stoped working since your last update it was working fine b4.


here a screenshot:

Image

Thank you.
Top

joem
Posts: 378
Joined: Thu Nov 13, 2014 8:33 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: adding new database error
  • Quote

Post by joem » Fri Jun 26, 2015 12:40 am

What I found to work is to make a copy of /usr/local/vesta/conf/mysql.conf and name it mysqld.conf.
Top

Teo
Posts: 97
Joined: Mon May 11, 2015 9:17 am

Os: CentOS 6x
Web: apache + nginx
Re: adding new database error
  • Quote

Post by Teo » Fri Jun 26, 2015 11:06 am

woo that did the trick thanks m8! but i think is a bug since the upgrade they have to look at.
Top

joem
Posts: 378
Joined: Thu Nov 13, 2014 8:33 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: adding new database error
  • Quote

Post by joem » Sat Jun 27, 2015 8:20 am

Teo wrote:woo that did the trick thanks m8! but i think is a bug since the upgrade they have to look at.
Your right there is a bug the developers made some changes which you can see here.

Code: Select all

nano $VESTA/conf/vesta.conf
Change
DB_SYSTEM='mysqld'
To
DB_SYSTEM='mysql'
Remove or rename to mysql.conf

Code: Select all

/usr/local/vesta/conf/mysqld.conf

Code: Select all

nano $VESTA/bin/v-list-sys-services
Find

Code: Select all

# DB
service=$DB_SYSTEM
if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then
    for db in ${DB_SYSTEM//,/ }; do
        service="$db"
        if [ "$service" == 'mysql' ]; then
            db_proc_name='mysqld'
        fi
        if [ "$service" == 'pgsql' ]; then
            service='postgresql'
            db_proc_name='postmaster'
            if [ ! -e "/etc/redhat-release" ]; then
                db_proc_name='postgres'
            fi
        fi
        get_srv_state $service $db_proc_name
        str="$str\nNAME='$service' SYSTEM='database server' STATE='$state'"
        str="$str CPU='$cpu' MEM='$mem' RTIME='$rtime'"
    done
fi

Change to

Code: Select all

# DB
service=$DB_SYSTEM
if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then
    for db in ${DB_SYSTEM//,/ }; do
        service="$db"
        if [ "$service" == 'mysql' ]; then
            if [ ! -e "/etc/init.d/$service" ]; then
                service='mysqld'
            fi
            if [ ! -e "/etc/redhat-release" ]; then
                db_proc_name='mysqld'
            fi
        fi
        if [ "$service" == 'pgsql' ]; then
            service='postgresql'
            db_proc_name='postmaster'
            if [ ! -e "/etc/redhat-release" ]; then
                db_proc_name='postgres'
            fi
        fi
        get_srv_state $service $db_proc_name
        str="$str\nNAME='$service' SYSTEM='database server' STATE='$state'"
        str="$str CPU='$cpu' MEM='$mem' RTIME='$rtime'"
    done
fi
Top

Teo
Posts: 97
Joined: Mon May 11, 2015 9:17 am

Os: CentOS 6x
Web: apache + nginx
Re: adding new database error
  • Quote

Post by Teo » Tue Jul 07, 2015 2:02 pm

hello this doesn't work. i applied the edits but nothing, localhost disappeared again. is there a way to come back to the previous version?? i cannot add database neither now seems everything fucked.
Top

joem
Posts: 378
Joined: Thu Nov 13, 2014 8:33 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: adding new database error
  • Quote

Post by joem » Tue Jul 07, 2015 9:45 pm

Teo wrote:hello this doesn't work. i applied the edits but nothing, localhost disappeared again. is there a way to come back to the previous version?? i cannot add database neither now seems everything fucked.

Once you apply the fix you must logout then log back in.
Top

Teo
Posts: 97
Joined: Mon May 11, 2015 9:17 am

Os: CentOS 6x
Web: apache + nginx
Re: adding new database error
  • Quote

Post by Teo » Mon Oct 19, 2015 9:02 am

i cannot add any database because localhost is blank, can you please help me fixing this bug? thanks.
Top


Post Reply
  • Print view

9 posts • Page 1 of 1

Return to “Database Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password