fix mysql length in xpanel

From WebHostingNeeds.com
Jump to: navigation, search

amanager.cgi

vi /var/www/xpanel/public_html/cgi-bin/amanager.cgi

Find

    $mysql_id =~ s/\-/\_/g; # change hyphen - to underscore _
    $mysql_id =~ s/\./\_/g; # change dot . to underscore _

Add ABOVE

    $mysql_id =~ s/\.YOURDOMAIN\.com//g; # remove main domain

Do 3 times in following functions

sub create_delete_db
sub create_button_database
sub phpmyadmin


sub home

in sub home, it is mysql_db_id

Add above

$mysql_db_id =~ s/\.YOURDOMAIN\.com//g; # remove main domain


mysql.pl

vi /usr/local/xpanel/mysql.pl

All 3 functions need to change

sub create_mysql_database {
sub modify_mysql_password {
sub delete_mysql_database {

Find

    $mysql_id =~ s/\-/\_/g;
    $mysql_id =~ s/\./\_/g;

Add Above

    $mysql_id =~ s/\.YOURDOMAIN\.com//g; # remove main domain



xpanel