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 database → Error: db_user .. is not valid

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
Locked
  • Print view
Advanced search
14 posts
  • Previous
  • 1
  • 2
Rebbu
Posts: 1
Joined: Wed Apr 01, 2015 12:08 am

Re: Adding database → Error: db_user .. is not valid

Post by Rebbu » Wed Apr 01, 2015 12:12 am

I had this same issue - I had an account with a username that was 15 characters long, and then the "_" made it 16 so I couldn't add any users.

I modified the code differently however - I reduced the prefix to 8 characters with the underscore by modifying the v-add-database script as follows:

shortuser=${user:0:7}
database="$shortuser"_"$2"
dbuser="$shortuser"_"$3"

This works fine for me. I also modified the add/db/index.php so it would display the correct prefix on the frontend.
Top

worldspicejason
Posts: 1
Joined: Mon Apr 27, 2015 3:24 pm

Re: Adding database → Error: db_user .. is not valid

Post by worldspicejason » Mon Apr 27, 2015 3:50 pm

Thanks Rebbu. This is exactly what I was looking for. What did you change in add/db/index.php to make it display correctly?

Thanks.
Top

Pong
Posts: 4
Joined: Thu Nov 12, 2015 3:27 pm
Contact:
Contact Pong
Website

Re: Adding database → Error: db_user .. is not valid

Post by Pong » Thu Nov 12, 2015 3:32 pm

Mihanja80 wrote: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? :)
True, but this is a limitation imposed by mysql afaik.
Other control panels suffer the same fate.

It would be nice to allow the user to override the default in case the domain name is too long.
I love the auto-mode, but with a long domain name I still need this to work and it would be nice to shorten it myself (it would require an additional test I suppose to prevent collisions).
Top

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

Re: Adding database → Error: db_user .. is not valid

Post by skurudo » Fri Jun 10, 2016 12:48 pm

Added idea on bugtracker:
https://bugs.vestacp.com/issues/258

Please vote for this feature.

Discussion topic:
viewtopic.php?f=14&t=11522
Top


Locked
  • Print view

14 posts
  • Previous
  • 1
  • 2

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
 

 

Login  •  Register

I forgot my password