Page 1 of 1

adding new database error

Posted: Tue Jun 23, 2015 9:17 am
by Teo
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.

Re: adding new database error

Posted: Wed Jun 24, 2015 2:52 pm
by skurudo
It's sad to hear this. But give more info about what you do and your system.

Re: adding new database error

Posted: Thu Jun 25, 2015 10:49 am
by Teo
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.

Re: adding new database error

Posted: Fri Jun 26, 2015 12:40 am
by joem
What I found to work is to make a copy of /usr/local/vesta/conf/mysql.conf and name it mysqld.conf.

Re: adding new database error

Posted: Fri Jun 26, 2015 11:06 am
by Teo
woo that did the trick thanks m8! but i think is a bug since the upgrade they have to look at.

Re: adding new database error

Posted: Sat Jun 27, 2015 8:20 am
by joem
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

Re: adding new database error

Posted: Tue Jul 07, 2015 2:02 pm
by Teo
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.

Re: adding new database error

Posted: Tue Jul 07, 2015 9:45 pm
by joem
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.

Re: adding new database error

Posted: Mon Oct 19, 2015 9:02 am
by Teo
i cannot add any database because localhost is blank, can you please help me fixing this bug? thanks.