We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Adding database → Error: db_user .. is not valid
-
- Posts: 2
- Joined: Mon Apr 14, 2014 12:57 pm
Adding database → Error: db_user .. is not valid
Hi,
Is anyone experiencing an error when adding a database? I have created one on another user fine, but for some reason every time I enter a db user when creating one it gives me an error saying that db_user is not valid.
Any ideas?
Thanks
Dan Williams
Is anyone experiencing an error when adding a database? I have created one on another user fine, but for some reason every time I enter a db user when creating one it gives me an error saying that db_user is not valid.
Any ideas?
Thanks
Dan Williams
Re: Adding database → Error: db_user .. is not valid
I too am having this issue.
I've read it has something to do with the length of the values entered (including the name of the account) being too long for MySQL. Bit of a pain if it is that because I was planning on setting the name of the account to the domain name for that account, and some of them can be quite long.
I've read it has something to do with the length of the values entered (including the name of the account) being too long for MySQL. Bit of a pain if it is that because I was planning on setting the name of the account to the domain name for that account, and some of them can be quite long.
-
- Posts: 14
- Joined: Sun Apr 06, 2014 2:13 pm
Re: Adding database → Error: db_user .. is not valid
Hi
Im also experience the same issue, have you manage to resolve this?
Thanks for your help
Br
Mike
Im also experience the same issue, have you manage to resolve this?
Thanks for your help
Br
Mike
Re: Adding database → Error: db_user .. is not valid
Hi,
write more about your problem
the database user should be not longer than 16 characters (together with the prefix of user)
write more about your problem
the database user should be not longer than 16 characters (together with the prefix of user)
Re: Adding database → Error: db_user .. is not valid
Hi imperio,
my prefix has 15 characters, plus "_".. total 16 characters. So I can't add nothing but I can't leave blank the field...
¿Any solution, please?
Thank you in advance.
my prefix has 15 characters, plus "_".. total 16 characters. So I can't add nothing but I can't leave blank the field...
¿Any solution, please?
Thank you in advance.
Re: Adding database → Error: db_user .. is not valid
Hiya
What I did was edit main.sh ( /usr/local/vesta/func ) line 811 to This:
dbuser) validate_format_dbuser "${arg:0:16}" 'db_user';;
AND
in v-add-database (/usr/local/vesta/bin/) line 77 to This:
str="DB='$database' DBUSER='${dbuser:0:16}' MD5='$md5' clear=$dbpass HOST='$host' TYPE='$type'"
That takes care of the validation and shortens the username to the MAX for mysql of 16 chars whilst keeping inline with naming convention as I understand it (username_DBuser) to keep tabs on users DBs...
Probably the best solution would be to edit the front end and make the validation there.. but this works just fine it will shorten the name by latter part if to long to 16 chars.
Cheers :)
What I did was edit main.sh ( /usr/local/vesta/func ) line 811 to This:
dbuser) validate_format_dbuser "${arg:0:16}" 'db_user';;
AND
in v-add-database (/usr/local/vesta/bin/) line 77 to This:
str="DB='$database' DBUSER='${dbuser:0:16}' MD5='$md5' clear=$dbpass HOST='$host' TYPE='$type'"
That takes care of the validation and shortens the username to the MAX for mysql of 16 chars whilst keeping inline with naming convention as I understand it (username_DBuser) to keep tabs on users DBs...
Probably the best solution would be to edit the front end and make the validation there.. but this works just fine it will shorten the name by latter part if to long to 16 chars.
Cheers :)
Re: Adding database → Error: db_user .. is not valid
What if i have prefix of db name and user length of 16 symbols? How to change principal of creating prefixes?
And without any symbol of current db it wont create.
I am still can not create database. Thank you.
And without any symbol of current db it wont create.
I am still can not create database. Thank you.
Re: Adding database → Error: db_user .. is not valid
I don't see the problem in your caseizum wrote:What if i have prefix of db name and user length of 16 symbols? How to change principal of creating prefixes?
And without any symbol of current db it wont create.
I am still can not create database. Thank you.
you can create any short user name
Re: Adding database → Error: db_user .. is not valid
Error: db_user Mihanja80_Mihanja80 is not valid.
Put the panel for the test, the same problem!
I do not understand why you made a limit of 16 characters and does not show this warning in the panel? Simply print the warning on the entry form.
And if the user login will be 16 characters long, what to do then? :)
Put the panel for the test, the same problem!
I do not understand why you made a limit of 16 characters and does not show this warning in the panel? Simply print the warning on the entry form.
And if the user login will be 16 characters long, what to do then? :)
Re: Adding database → Error: db_user .. is not valid
That works like a charm! Thanks for that! One thing: In my version of vestacp it was line 883 of main.sh.lookup wrote:Hiya
What I did was edit main.sh ( /usr/local/vesta/func ) line 811 to This:
dbuser) validate_format_dbuser "${arg:0:16}" 'db_user';;
AND
in v-add-database (/usr/local/vesta/bin/) line 77 to This:
str="DB='$database' DBUSER='${dbuser:0:16}' MD5='$md5' clear=$dbpass HOST='$host' TYPE='$type'"
That takes care of the validation and shortens the username to the MAX for mysql of 16 chars whilst keeping inline with naming convention as I understand it (username_DBuser) to keep tabs on users DBs...
Probably the best solution would be to edit the front end and make the validation there.. but this works just fine it will shorten the name by latter part if to long to 16 chars.
Cheers :)